File: structs.meta.h

package info (click to toggle)
mysql-workbench 6.3.8%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 113,932 kB
  • ctags: 87,814
  • sloc: ansic: 955,521; cpp: 427,465; python: 59,728; yacc: 59,129; xml: 54,204; sql: 7,091; objc: 965; makefile: 638; sh: 613; java: 237; perl: 30; ruby: 6; php: 1
file content (290 lines) | stat: -rw-r--r-- 7,599 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
#pragma once

#include <grtpp.h>

#ifdef _WIN32
  #pragma warning(disable: 4355) // 'this' : used in base member initializer list
  #ifdef GRT_STRUCTS_META_EXPORT
  #define GRT_STRUCTS_META_PUBLIC __declspec(dllexport)
#else
  #define GRT_STRUCTS_META_PUBLIC __declspec(dllimport)
#endif
#else
  #define GRT_STRUCTS_META_PUBLIC
#endif

#include <grts/structs.h>
#include <grts/structs.db.h>


class meta_TaggedObject;
typedef grt::Ref<meta_TaggedObject> meta_TaggedObjectRef;
class meta_Tag;
typedef grt::Ref<meta_Tag> meta_TagRef;


namespace mforms { 
  class Object;
}; 

namespace grt { 
  class AutoPyObject;
}; 

class  meta_TaggedObject : public GrtObject
{
  typedef GrtObject super;
public:
  meta_TaggedObject(grt::GRT *grt, grt::MetaClass *meta=0)
  : GrtObject(grt, meta ? meta : grt->get_metaclass(static_class_name())),
     _description("")

  {
  }

  static std::string static_class_name() { return "meta.TaggedObject"; }

  /** Getter for attribute description
   
    
   \par In Python:
value = obj.description
   */
  grt::StringRef description() const { return _description; }
  /** Setter for attribute description
   
    
    \par In Python:
obj.description = value
   */
  virtual void description(const grt::StringRef &value)
  {
    grt::ValueRef ovalue(_description);
   _description= value;
    member_changed("description", ovalue, value);
  }

  /** Getter for attribute object
   
    
   \par In Python:
value = obj.object
   */
  db_DatabaseObjectRef object() const { return _object; }
  /** Setter for attribute object
   
    
    \par In Python:
obj.object = value
   */
  virtual void object(const db_DatabaseObjectRef &value)
  {
    grt::ValueRef ovalue(_object);
   _object= value;
    member_changed("object", ovalue, value);
  }

protected:

  grt::StringRef _description;
  db_DatabaseObjectRef _object;
private: // wrapper methods for use by grt
  static grt::ObjectRef create(grt::GRT *grt)
  {
    return grt::ObjectRef(new meta_TaggedObject(grt));
  }


public:
  static void grt_register(grt::GRT *grt)
  {
    grt::MetaClass *meta= grt->get_metaclass(static_class_name());
    if (!meta) throw std::runtime_error("error initializing grt object class, metaclass not found");
    meta->bind_allocator(&meta_TaggedObject::create);
    {
      void (meta_TaggedObject::*setter)(const grt::StringRef &)= &meta_TaggedObject::description;
      grt::StringRef (meta_TaggedObject::*getter)() const= &meta_TaggedObject::description;
      meta->bind_member("description", new grt::MetaClass::Property<meta_TaggedObject,grt::StringRef >(getter,setter));
    }
    {
      void (meta_TaggedObject::*setter)(const db_DatabaseObjectRef &)= &meta_TaggedObject::object;
      db_DatabaseObjectRef (meta_TaggedObject::*getter)() const= &meta_TaggedObject::object;
      meta->bind_member("object", new grt::MetaClass::Property<meta_TaggedObject,db_DatabaseObjectRef >(getter,setter));
    }
  }
};


class  meta_Tag : public GrtObject
{
  typedef GrtObject super;
public:
  meta_Tag(grt::GRT *grt, grt::MetaClass *meta=0)
  : GrtObject(grt, meta ? meta : grt->get_metaclass(static_class_name())),
     _color(""),
     _description(""),
     _label(""),
    _objects(grt, this, false)

  {
  }

  static std::string static_class_name() { return "meta.Tag"; }

  /** Getter for attribute category
   
    
   \par In Python:
value = obj.category
   */
  GrtObjectRef category() const { return _category; }
  /** Setter for attribute category
   
    
    \par In Python:
obj.category = value
   */
  virtual void category(const GrtObjectRef &value)
  {
    grt::ValueRef ovalue(_category);
   _category= value;
    member_changed("category", ovalue, value);
  }

  /** Getter for attribute color
   
    
   \par In Python:
value = obj.color
   */
  grt::StringRef color() const { return _color; }
  /** Setter for attribute color
   
    
    \par In Python:
obj.color = value
   */
  virtual void color(const grt::StringRef &value)
  {
    grt::ValueRef ovalue(_color);
   _color= value;
    member_changed("color", ovalue, value);
  }

  /** Getter for attribute description
   
    
   \par In Python:
value = obj.description
   */
  grt::StringRef description() const { return _description; }
  /** Setter for attribute description
   
    
    \par In Python:
obj.description = value
   */
  virtual void description(const grt::StringRef &value)
  {
    grt::ValueRef ovalue(_description);
   _description= value;
    member_changed("description", ovalue, value);
  }

  /** Getter for attribute label
   
    
   \par In Python:
value = obj.label
   */
  grt::StringRef label() const { return _label; }
  /** Setter for attribute label
   
    
    \par In Python:
obj.label = value
   */
  virtual void label(const grt::StringRef &value)
  {
    grt::ValueRef ovalue(_label);
   _label= value;
    member_changed("label", ovalue, value);
  }

  /** Getter for attribute objects (read-only)
   
    
   \par In Python:
value = obj.objects
   */
  grt::ListRef<meta_TaggedObject> objects() const { return _objects; }
private: // the next attribute is read-only
  virtual void objects(const grt::ListRef<meta_TaggedObject> &value)
  {
    grt::ValueRef ovalue(_objects);
   _objects= value;
    member_changed("objects", ovalue, value);
  }
public:

protected:

  GrtObjectRef _category;
  grt::StringRef _color;
  grt::StringRef _description;
  grt::StringRef _label;
  grt::ListRef<meta_TaggedObject> _objects;
private: // wrapper methods for use by grt
  static grt::ObjectRef create(grt::GRT *grt)
  {
    return grt::ObjectRef(new meta_Tag(grt));
  }


public:
  static void grt_register(grt::GRT *grt)
  {
    grt::MetaClass *meta= grt->get_metaclass(static_class_name());
    if (!meta) throw std::runtime_error("error initializing grt object class, metaclass not found");
    meta->bind_allocator(&meta_Tag::create);
    {
      void (meta_Tag::*setter)(const GrtObjectRef &)= &meta_Tag::category;
      GrtObjectRef (meta_Tag::*getter)() const= &meta_Tag::category;
      meta->bind_member("category", new grt::MetaClass::Property<meta_Tag,GrtObjectRef >(getter,setter));
    }
    {
      void (meta_Tag::*setter)(const grt::StringRef &)= &meta_Tag::color;
      grt::StringRef (meta_Tag::*getter)() const= &meta_Tag::color;
      meta->bind_member("color", new grt::MetaClass::Property<meta_Tag,grt::StringRef >(getter,setter));
    }
    {
      void (meta_Tag::*setter)(const grt::StringRef &)= &meta_Tag::description;
      grt::StringRef (meta_Tag::*getter)() const= &meta_Tag::description;
      meta->bind_member("description", new grt::MetaClass::Property<meta_Tag,grt::StringRef >(getter,setter));
    }
    {
      void (meta_Tag::*setter)(const grt::StringRef &)= &meta_Tag::label;
      grt::StringRef (meta_Tag::*getter)() const= &meta_Tag::label;
      meta->bind_member("label", new grt::MetaClass::Property<meta_Tag,grt::StringRef >(getter,setter));
    }
    {
      void (meta_Tag::*setter)(const grt::ListRef<meta_TaggedObject> &)= &meta_Tag::objects;
      grt::ListRef<meta_TaggedObject> (meta_Tag::*getter)() const= &meta_Tag::objects;
      meta->bind_member("objects", new grt::MetaClass::Property<meta_Tag,grt::ListRef<meta_TaggedObject> >(getter,setter));
    }
  }
};




inline void register_structs_meta_xml()
{
  grt::internal::ClassRegistry::register_class<meta_TaggedObject>();
  grt::internal::ClassRegistry::register_class<meta_Tag>();
}

#ifdef AUTO_REGISTER_GRT_CLASSES
static struct _autoreg__structs_meta_xml { _autoreg__structs_meta_xml() { register_structs_meta_xml(); } } __autoreg__structs_meta_xml;
#endif