Changeset 1528 for trunk/src/objects/RpObject.h
- Timestamp:
- Jun 22, 2009, 3:16:39 PM (15 years ago)
- File:
-
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/objects/RpObject.h
r1428 r1528 9 9 */ 10 10 11 #ifndef RAPPTURE_ VARIABLE_H12 #define RAPPTURE_ VARIABLE_H11 #ifndef RAPPTURE_OBJECT_H 12 #define RAPPTURE_OBJECT_H 13 13 14 14 #include "RpInt.h" … … 16 16 #include "RpAccessor.h" 17 17 #include "RpBuffer.h" 18 #include "RpPath.h" 18 19 19 20 namespace Rappture { 20 21 21 class Variable22 class Object 22 23 { 23 24 public: 24 Variable();25 Variable (const char *path,26 27 28 29 const char *color);30 Variable (const Variable& o);31 virtual ~ Variable();25 Object (); 26 Object (const char *path, 27 const char *label, 28 const char *desc, 29 const char *hints, 30 const char *color); 31 Object (const Object& o); 32 virtual ~Object(); 32 33 33 Accessor<const char *> path; 34 Accessor<const char *> label; 35 Accessor<const char *> desc; 36 Accessor<const char *> hints; 37 Accessor<const char *> color; 38 Accessor<Buffer> icon; 34 const char *path(void) const; 35 void path(const char *p); 36 37 const char *label(void) const; 38 void label(const char *p); 39 40 const char *desc(void) const; 41 void desc(const char *p); 42 43 const char *hints(void) const; 44 void hints(const char *p); 45 46 const char *color(void) const; 47 void color(const char *); 48 49 // void *icon(void) const; 50 // void icon(void *p, size_t nbytes); 39 51 40 52 // these functions are not completely improper use proof 41 53 // user is responsible for calling propremove() on any item 42 54 // they put into the hash table. 43 const void *property (const char *key, const void *val); 44 const char *propstr (const char *key, const char *val); 45 void *propremove (const char *key); 55 56 // get/set void* property 57 const void *property (const char *key) const; 58 void property (const char *key, const void *val, size_t nbytes); 59 60 // get/set const char * property 61 const char *propstr (const char *key) const; 62 void propstr (const char *key, const char *val); 63 64 // remove property from hash table 65 void propremove (const char *key); 66 67 // get the Rappture1.1 xml text for this object 68 virtual const char *xml() const; 69 70 // set the object properties based on Rappture1.1 xml text 71 virtual void xml(const char *xmltext); 72 73 virtual const int is() const; 74 75 protected: 76 77 /// temprorary buffer for returning text to the user 78 SimpleCharBuffer _tmpBuf; 46 79 47 80 private: … … 55 88 /// close out the object, freeing its memory 56 89 void __clear(); 90 57 91 }; 58 92 59 } // RAPPTURE_ VARIABLE_H93 } // RAPPTURE_OBJECT_H 60 94 61 95 /*--------------------------------------------------------------------------*/
Note: See TracChangeset
for help on using the changeset viewer.