/simpletypesystem/trunk

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/simpletypesystem/trunk

« back to all changes in this revision

Viewing changes to libsstsmm/baseobject.hxx

  • Committer: Gustav Hartvigsson
  • Date: 2015-10-05 12:16:32 UTC
  • Revision ID: gustav.hartvigsson@gmail.com-20151005121632-hxtiemkswfq5ahch
* Added skeleton for cxx binding. This is not a priotity, and never will be.
* Added CXX_README for information on libsstsmm.

* Moved src to libssts

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
 
 
2
#include "../libssts/baseobject.h"
 
3
 
 
4
/*
 
5
 * I have a distaste C++. So this is not a priority, and may not even
 
6
 * work at all.
 
7
 */
 
8
namespace SSTS {
 
9
  class SObject {
 
10
    struct SObject self;
 
11
    
 
12
    inline SObject () {
 
13
      this.self = s_object_new ();
 
14
    }
 
15
    
 
16
    inline ~SObject () {
 
17
      s_object_free (this.self);
 
18
    }
 
19
    
 
20
    inline void
 
21
    initialize (const schar * name) {
 
22
      s_object_initialize (this.self, name);
 
23
    }
 
24
    
 
25
    inline void
 
26
    initialize (const std::string name) {
 
27
      s_object_initialize (this.self, name.c_str);
 
28
    }
 
29
    
 
30
    inline void
 
31
    ref () {
 
32
      s_object_ref (this.self);
 
33
    }
 
34
    
 
35
    inline void
 
36
    unref () {
 
37
      s_object_unref (this.self);
 
38
    }
 
39
    
 
40
  }
 
41
  
 
42
}