Last change
on this file since 3920 was
3590,
checked in by bensch, 19 years ago
|
orxonox/trunk: updated debug.h: now possibility to log per module (compile-time)
- write in the cc-file at the beginnig !!BEFORE ANY INCLUDES!!
#define DEBUG_SPECIAL_MODULE DEBUG_MODULE_[MODULENAME]
where [MODULNAME] is a name of a module that can be defined in debug.h
- define a new MODULE: easy just write a new one under the other ones in DEBUG.h
- if you do not wish special loggin everything stays as is, and you do not have to worry. (then de verbose will be set from orxonox.cc: int verbose)
|
File size:
1.2 KB
|
Rev | Line | |
---|
[2842] | 1 | /*! |
---|
| 2 | \file array.h |
---|
| 3 | \brief Contains the Array Class that handles float arrays. |
---|
| 4 | this class creates a Array of a semi-Dynamic length. |
---|
| 5 | beware, that after finalizing the array may not be resized again. |
---|
| 6 | */ |
---|
| 7 | |
---|
[2776] | 8 | #ifndef _ARRAY_H |
---|
| 9 | #define _ARRAY_H |
---|
| 10 | |
---|
[3475] | 11 | #include "stdincl.h" |
---|
[2842] | 12 | |
---|
| 13 | //! Array Class that handles dynamic-float arrays. |
---|
[2754] | 14 | class Array |
---|
| 15 | { |
---|
| 16 | public: |
---|
| 17 | Array (); |
---|
[2847] | 18 | ~Array(); |
---|
[2754] | 19 | |
---|
[2842] | 20 | void initializeArray (); |
---|
[2754] | 21 | void finalizeArray (void); |
---|
| 22 | void addEntry (GLfloat entry); |
---|
| 23 | void addEntry(GLfloat entry0, GLfloat entry1, GLfloat entry2); |
---|
| 24 | |
---|
| 25 | GLfloat* getArray (); |
---|
[2760] | 26 | int getCount(); |
---|
[2758] | 27 | void debug(void); |
---|
[2754] | 28 | private: |
---|
[3186] | 29 | //! One entry of the Array |
---|
[2807] | 30 | struct Entry |
---|
| 31 | { |
---|
[3186] | 32 | GLfloat value; //!< The value of this Entry. |
---|
| 33 | Entry* next; //!< Pointer to the Next entry. |
---|
[2807] | 34 | }; |
---|
| 35 | |
---|
[3186] | 36 | GLfloat* array; //!< The array that will be produced when finalizing the Array. |
---|
| 37 | int entryCount; //!< The count of Entries in this Array. |
---|
| 38 | bool finalized; //!< If this variable is set to true, the Array can not be changed anymore. true if finalized, false else (initially). |
---|
| 39 | Entry* firstEntry; //!< Pointer to the first Entry of this Array |
---|
| 40 | Entry* currentEntry; //!< Pointer to the current Entry of this Array. The one Entry we are working with. |
---|
[2807] | 41 | |
---|
| 42 | |
---|
[2754] | 43 | }; |
---|
[2776] | 44 | |
---|
| 45 | #endif |
---|
Note: See
TracBrowser
for help on using the repository browser.