Last change
on this file since 4168 was
3647,
checked in by patrick, 20 years ago
|
orxonox/trunk: definlty a problem with the list, now stable again
|
File size:
1.2 KB
|
Rev | Line | |
---|
[3647] | 1 | /*! |
---|
| 2 | \file proto_class.h |
---|
| 3 | \brief Definition of the proto class template, used quickly start work |
---|
| 4 | \todo Example: this shows how to use simply add a Marker that here has to be done something. |
---|
| 5 | |
---|
| 6 | The Protoclass exists, to help you quikly getting the run for how to develop in orxonox. |
---|
| 7 | It is an example for the CODING-CONVENTION, and a starting-point for every class. |
---|
| 8 | */ |
---|
| 9 | |
---|
| 10 | #ifndef _GARBAGE_COLLECTOR_H |
---|
| 11 | #define _GARBAGE_COLLECTOR_H |
---|
| 12 | |
---|
| 13 | #include "base_object.h" |
---|
| 14 | |
---|
| 15 | |
---|
| 16 | //! this class maintains the garbage collection. |
---|
| 17 | /** |
---|
| 18 | the class is been ticked by the world.cc and goes through the |
---|
| 19 | world_entity list to clean out all unused entities. |
---|
| 20 | */ |
---|
| 21 | class GarbageCollector : public BaseObject { |
---|
| 22 | |
---|
| 23 | public: |
---|
| 24 | GarbageCollector(); |
---|
| 25 | virtual ~GarbageCollector(); |
---|
| 26 | static GarbageCollector* getInstance(); |
---|
| 27 | |
---|
| 28 | void setCollectionDelay(float delay); |
---|
| 29 | |
---|
| 30 | void forceCollection(); |
---|
| 31 | |
---|
| 32 | void tick(float time); |
---|
| 33 | void update(); |
---|
| 34 | |
---|
| 35 | private: |
---|
| 36 | static GarbageCollector* singletonRef; |
---|
| 37 | float delay; //!< this is the delay to wait until collection |
---|
| 38 | float time; //!< the current time |
---|
| 39 | |
---|
| 40 | }; |
---|
| 41 | |
---|
| 42 | #endif /* _GARBAGE_COLLECTOR_H */ |
---|
Note: See
TracBrowser
for help on using the repository browser.