Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: orxonox.OLD/orxonox/trunk/src/lib/lang/base_object.cc @ 4433

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

orxonox/trunk: added doxygen tags for the baseobject class

File size: 1.6 KB
Line 
1
2
3/*
4   orxonox - the future of 3D-vertical-scrollers
5
6   Copyright (C) 2004 orx
7
8   This program is free software; you can redistribute it and/or modify
9   it under the terms of the GNU General Public License as published by
10   the Free Software Foundation; either version 2, or (at your option)
11   any later version.
12
13   ### File Specific:
14   main-programmer: Patrick Boenzli
15   co-programmer: ...
16*/
17
18
19#include "base_object.h"
20#include "stdincl.h"
21
22
23using namespace std;
24
25
26/**
27   \brief standard constructor
28*/
29BaseObject::BaseObject () 
30{
31  this->className = NULL;
32  this->id = -1;
33  this->finalized = false;
34}
35
36
37/**
38   \brief standard deconstructor
39*/
40BaseObject::~BaseObject () 
41{
42  //  delete []this->className;
43}
44
45
46/**
47   \brief sets the class identifiers
48   \param a number for the class from class_list.h enumeration
49   \param the class name
50*/
51void BaseObject::setClassID(int id, const char* className)
52{
53  this->id = id;
54  this->className = className;
55}
56
57
58/**
59   \brief sets the class identifier
60   \param a number for the class from class_list.h enumeration
61*/
62void BaseObject::setClassID (int id)
63{
64  this->id = id;
65}
66
67
68/**
69   \brief sets the class identifiers
70   \param the class name
71*/
72void BaseObject::setClassName(const char* className)
73{
74  this->className = className;
75}
76
77
78/**
79   \brief sets the class identifiers
80   \param a number for the class from class_list.h enumeration
81   \param the class name
82*/
83bool BaseObject::isA (char* className)
84{
85  if( this->className == className)
86    return false;
87  return true;
88}
89
90
91/*
92  \brief this finalizes an object and makes it ready to be garbage collected
93*/
94void BaseObject::finalize()
95{
96  this->finalized = true;
97}
Note: See TracBrowser for help on using the repository browser.