- Timestamp:
- Nov 2, 2008, 12:54:17 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/objecthierarchy/src/network/Synchronisable.cc
r2062 r2112 50 50 // #include "core/Identifier.h" 51 51 52 namespace network52 namespace orxonox 53 53 { 54 54 … … 63 63 * Initializes all Variables and sets the right objectID 64 64 */ 65 Synchronisable::Synchronisable( orxonox::BaseObject* creator){65 Synchronisable::Synchronisable(BaseObject* creator){ 66 66 RegisterRootObject(Synchronisable); 67 67 static uint32_t idCounter=0; … … 96 96 Synchronisable::~Synchronisable(){ 97 97 // delete callback function objects 98 if(! orxonox::Identifier::isCreatingHierarchy()){98 if(!Identifier::isCreatingHierarchy()){ 99 99 for(std::list<synchronisableVariable *>::iterator it = syncList->begin(); it!=syncList->end(); it++) 100 100 delete (*it)->callback; … … 155 155 COUT(4) << "fabricating object with id: " << header->objectID << std::endl; 156 156 157 orxonox::Identifier* id = ClassByID(header->classID);157 Identifier* id = ClassByID(header->classID); 158 158 assert(id); 159 orxonox::BaseObject* creator = 0;159 BaseObject* creator = 0; 160 160 if (header->creatorID != OBJECTID_UNKNOWN) 161 161 { … … 167 167 } 168 168 else 169 creator = dynamic_cast< orxonox::BaseObject*>(synchronisable_creator);170 } 171 orxonox::BaseObject *bo = id->fabricate(creator);169 creator = dynamic_cast<BaseObject*>(synchronisable_creator); 170 } 171 BaseObject *bo = id->fabricate(creator); 172 172 assert(bo); 173 173 Synchronisable *no = dynamic_cast<Synchronisable *>(bo); … … 214 214 */ 215 215 Synchronisable* Synchronisable::getSynchronisable(unsigned int objectID){ 216 orxonox::ObjectList<Synchronisable>::iterator it;217 for(it = orxonox::ObjectList<Synchronisable>::begin(); it; ++it){216 ObjectList<Synchronisable>::iterator it; 217 for(it = ObjectList<Synchronisable>::begin(); it; ++it){ 218 218 if( it->getObjectID()==objectID ) 219 219 return *it; … … 234 234 * @param var pointer to the variable 235 235 * @param size size of the datatype the variable consists of 236 * @param t the type of the variable ( network::DATA or network::STRING236 * @param t the type of the variable (DATA or STRING 237 237 * @param mode same as in getData 238 238 * @param cb callback object that should get called, if the value of the variable changes
Note: See TracChangeset
for help on using the changeset viewer.