Changeset 7127 for code/branches/presentation3/src/libraries
- Timestamp:
- Jun 9, 2010, 9:32:58 PM (14 years ago)
- Location:
- code/branches/presentation3/src/libraries
- Files:
-
- 11 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/presentation3/src/libraries/core/BaseObject.cc
r7105 r7127 105 105 } 106 106 } 107 107 108 108 /** @brief Adds an object which listens to the events of this object. */ 109 109 void BaseObject::registerEventListener(BaseObject* object) … … 125 125 XMLPortParam(BaseObject, "mainstate", setMainStateName, getMainStateName, xmlelement, mode); 126 126 XMLPortParamTemplate(BaseObject, "template", addTemplate, getSingleTemplate, xmlelement, mode, const std::string&); 127 127 128 128 XMLPortObjectTemplate(BaseObject, Template, "templates", addTemplate, getTemplate, xmlelement, mode, Template*); 129 129 XMLPortObject(BaseObject, BaseObject, "eventlisteners", addEventListener, getEventListener, xmlelement, mode); … … 372 372 { 373 373 this->registerEventStates(); 374 374 375 375 COUT(4) << this->getIdentifier()->getName() << " (&" << this << ") processing event. originator: " << event.originator_->getIdentifier()->getName() << " (&" << event.originator_ << "), activate: " << event.activate_ << ", name: " << event.name_ << ", statename: " << event.statename_ << "." << std::endl; 376 376 -
code/branches/presentation3/src/libraries/core/BaseObject.h
r7105 r7127 154 154 inline Gametype* getOldGametype() const { return this->oldGametype_; } 155 155 virtual void changedGametype() {} 156 156 157 157 inline void setLevel(const SmartPtr<Level>& level) 158 158 { -
code/branches/presentation3/src/libraries/core/Event.cc
r6859 r7127 60 60 61 61 COUT(4) << "Processing event (EventState) : originator: " << event.originator_->getIdentifier()->getName() << " (&" << event.originator_ << "), activate: " << event.activate_ << ", name: " << event.name_ << ", statename: " << event.statename_ << ", object: " << object->getIdentifier()->getName() << " (&" << object << ")" << "." << std::endl; 62 62 63 63 // check if the originator is an instance of the requested class 64 64 if (event.originator_->isA(this->subclass_)) -
code/branches/presentation3/src/libraries/core/EventIncludes.h
r6800 r7127 52 52 } \ 53 53 XMLPortEventStateIntern(xmlportevent##function, classname, statename, xmlelement, mode) 54 54 55 55 #define XMLPortEventSink(classname, subclassname, statename, function, xmlelement, mode) \ 56 56 orxonox::EventState* containername##function = this->getEventState(statename); \ -
code/branches/presentation3/src/libraries/core/GUIManager.h
r7072 r7127 103 103 104 104 static GUIManager& getInstance() { return Singleton<GUIManager>::getInstance(); } // tolua_export 105 105 106 106 private: 107 107 GUIManager(const GUIManager& instance); //!< private and undefined copy c'tor (this is a singleton class) 108 108 void executeCode(const std::string& str); 109 109 110 110 template <typename FunctionType> 111 111 bool protectedCall(FunctionType function); -
code/branches/presentation3/src/libraries/core/OrxonoxClass.h
r7008 r7127 108 108 bool isParentOf(const OrxonoxClass* object); 109 109 bool isDirectParentOf(const OrxonoxClass* object); 110 110 111 111 virtual void clone(OrxonoxClass*& item) {} 112 112 … … 172 172 std::vector<std::pair<unsigned int, void*> > objectPointers_; 173 173 }; 174 174 175 175 SUPER_FUNCTION(11, OrxonoxClass, clone, false); 176 176 177 177 } 178 178 -
code/branches/presentation3/src/libraries/core/Super.h
r6524 r7127 267 267 #define SUPER_changedGametype(classname, functionname, ...) \ 268 268 SUPER_NOARGS(classname, functionname) 269 269 270 270 #define SUPER_changedUsed(classname, functionname, ...) \ 271 271 SUPER_NOARGS(classname, functionname) 272 272 273 273 #define SUPER_clone(classname, functionname, ...) \ 274 274 SUPER_ARGS(classname, functionname, __VA_ARGS__) 275 275 276 276 #define SUPER_changedCarrier(classname, functionname, ...) \ 277 277 SUPER_NOARGS(classname, functionname) 278 278 279 279 #define SUPER_changedPickedUp(classname, functionname, ...) \ 280 280 SUPER_NOARGS(classname, functionname) 281 281 282 282 // (1/3) --> HERE <-- --> HERE <-- --> HERE <-- --> HERE <-- --> HERE <-- --> HERE <-- --> HERE <-- 283 283 … … 530 530 () 531 531 SUPER_FUNCTION_GLOBAL_DECLARATION_PART2; 532 532 533 533 SUPER_FUNCTION_GLOBAL_DECLARATION_PART1(10, changedUsed, false) 534 534 () … … 538 538 (item) 539 539 SUPER_FUNCTION_GLOBAL_DECLARATION_PART2; 540 540 541 541 SUPER_FUNCTION_GLOBAL_DECLARATION_PART1(12, changedCarrier, false) 542 542 () 543 543 SUPER_FUNCTION_GLOBAL_DECLARATION_PART2; 544 544 545 545 SUPER_FUNCTION_GLOBAL_DECLARATION_PART1(13, changedPickedUp, false) 546 546 () -
code/branches/presentation3/src/libraries/core/Template.cc
r6938 r7127 107 107 { 108 108 this->bLoadDefaults_ = temp->bLoadDefaults_; 109 109 110 110 if (!temp->bIsReturningXMLElement_) 111 111 { -
code/branches/presentation3/src/libraries/network/packet/Chat.cc
r6928 r7127 60 60 *(unsigned int *)(data_ + _MESSAGELENGTH ) = messageLength_; 61 61 62 /* cast the hell out of the message string, and copy it into the 63 * data buffer. 62 /* cast the hell out of the message string, and copy it into the 63 * data buffer. 64 64 */ 65 65 memcpy( data_+_MESSAGE, static_cast<void*>(const_cast<char*>(message.c_str())), messageLength_ ); -
code/branches/presentation3/src/libraries/network/synchronisable/Synchronisable.h
r7105 r7127 183 183 } 184 184 } 185 185 186 186 template <class T> void Synchronisable::registerVariable( std::set<T>& variable, uint8_t mode, NetworkCallbackBase *cb, bool bidirectional) 187 187 { -
code/branches/presentation3/src/libraries/util/Serialise.h
r7105 r7127 636 636 return checkEquality( (unsigned char&)((mbool&)variable).getMemory(), mem ); 637 637 } 638 638 639 639 // =========== std::set 640 640 641 641 template <class T> inline uint32_t returnSize( const std::set<T>& variable ) 642 642 { 643 643 uint32_t tempsize = sizeof(uint32_t); // for the number of entries 644 644 for( typename std::set<T>::iterator it=((std::set<T>*)(&variable))->begin(); it!=((std::set<T>*)(&variable))->end(); ++it) 645 tempsize += returnSize( *it ); 646 return tempsize; 647 } 648 645 tempsize += returnSize( *it ); 646 return tempsize; 647 } 648 649 649 template <class T> inline void saveAndIncrease( const std::set<T>& variable, uint8_t*& mem ) 650 650 { … … 654 654 saveAndIncrease( *it, mem ); 655 655 } 656 656 657 657 template <class T> inline void loadAndIncrease( const std::set<T>& variable, uint8_t*& mem ) 658 658 { … … 675 675 } 676 676 } 677 677 678 678 template <class T> inline bool checkEquality( const std::set<T>& variable, uint8_t* mem ) 679 679 {
Note: See TracChangeset
for help on using the changeset viewer.