Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: orxonox.OLD/orxonox/trunk/src/lib/lang/base_object.h @ 4320

Last change on this file since 4320 was 4320, checked in by patrick, 19 years ago

orxonox/trunk: now string name of a class works parallel to the int id representation and is only used for documentation purposes

File size: 730 bytes
Line 
1/*!
2    \file proto_class.h
3    \brief Definition of the proto class template, used quickly start work
4*/
5
6
7#ifndef _BASE_OBJECT_H
8#define _BASE_OBJECT_H
9
10#include "stdincl.h"
11#include "class_list.h"
12
13class BaseObject {
14
15 public:
16  BaseObject ();
17  virtual ~BaseObject ();
18
19  void setClassID(int id);
20  void setClassName(const char* className);
21  void setClassID(int id, const char* className);
22
23  inline const char* getClassName(void) const { return this->className;};
24  inline int getClassID(void) const { return this->id; }
25  bool isA (char* className);
26
27  inline bool isFinalized() { return this->finalized; }
28  void finalize();
29
30 private:
31  const char* className;
32  int id;
33  bool finalized;
34};
35
36#endif /* _BASE_OBJECT_H */
Note: See TracBrowser for help on using the repository browser.