Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Mar 23, 2013, 4:34:14 PM (11 years ago)
Author:
landauf
Message:

fabricate() should return OrxonoxClass*

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/core6/src/libraries/core/Identifier.h

    r8858 r9556  
    5656    object->getIdentifier()->getName();                                         // returns "MyClass"
    5757
    58     BaseObject* other = object->getIdentifier()->fabricate(0);                  // fabricates a new instance of MyClass
     58    OrxonoxClass* other = object->getIdentifier()->fabricate(0);                // fabricates a new instance of MyClass
    5959
    6060
     
    6262    ObjectListBase* objects = object->getIdentifier()->getObjects();            // get a pointer to the object-list
    6363    int count;
    64     for (Iterator<BaseObject> it = objects.begin(); it != objects.end(); ++it)  // iterate through the objects
     64    for (Iterator<MyClass> it = objects.begin(); it != objects.end(); ++it)     // iterate through the objects
    6565        ++count;
    6666    orxout() << count << endl;                                                  // prints "2" because we created 2 instances of MyClass so far
     
    133133            inline bool hasFactory() const { return (this->factory_ != 0); }
    134134
    135             BaseObject* fabricate(BaseObject* creator);
     135            OrxonoxClass* fabricate(BaseObject* creator);
    136136
    137137            /// Returns true if the class can be loaded through XML.
Note: See TracChangeset for help on using the changeset viewer.