Changeset 1586 for trunk/src/objects


Ignore:
Timestamp:
Oct 23, 2009, 7:56:25 AM (15 years ago)
Author:
dkearney
Message:

updating potential apis for c cpp and python. adding random() and diff()
functions to the rappture objects. objects should be able to generate a random
value for itself based on how it was configured. objects should be able to
compare itself with another object and tell us what the differences are.

Location:
trunk/src/objects
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/objects/RpObject.cc

    r1581 r1586  
    318318
    319319void
     320Object::random()
     321{
     322    // bland objects cannot make random values
     323    return;
     324}
     325
     326Rp_Chain *
     327Object::diff(const Object &o)
     328{
     329    return NULL;
     330}
     331
     332void
    320333Object::__init()
    321334{
  • trunk/src/objects/RpObject.h

    r1581 r1586  
    6363
    6464        // get/set void* property
    65         const void *property (const char *key) const;
    66         void property (const char *key, const void *val, size_t nbytes);
     65        const void *property(const char *key) const;
     66        void property(const char *key, const void *val, size_t nbytes);
    6767
    6868        // get/set const char * property
    69         const char *propstr (const char *key) const;
    70         void propstr (const char *key, const char *val);
     69        const char *propstr(const char *key) const;
     70        void propstr(const char *key, const char *val);
    7171
    7272        // remove property from hash table
     
    7474
    7575        // return the value of object based on provided hints
    76         virtual void vvalue (void *storage, size_t numHints, va_list arg) const;
     76        virtual void vvalue(void *storage, size_t numHints, va_list arg) const;
     77        // populate the object with a random value
     78        virtual void random();
     79        // return the difference between this object and o
     80        virtual Rp_Chain *diff(const Object& o);
    7781
    7882        // get the Rappture1.1 xml text for this object
Note: See TracChangeset for help on using the changeset viewer.