Last change
on this file since 3941 was
3651,
checked in by patrick, 20 years ago
|
orxonox/trunk: now got the trick with inline functions. they have to be placed at the same place as the header files are. modified BaseObject to be more performant, now isFinalized needs only 0.5 cycles! next stop, vector class
|
File size:
1.1 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 | |
---|
23 | using namespace std; |
---|
24 | |
---|
25 | |
---|
26 | /** |
---|
27 | \brief standard constructor |
---|
28 | */ |
---|
29 | BaseObject::BaseObject () |
---|
30 | { |
---|
31 | this->className = NULL; |
---|
32 | this->finalized = false; |
---|
33 | } |
---|
34 | |
---|
35 | |
---|
36 | /** |
---|
37 | \brief standard deconstructor |
---|
38 | */ |
---|
39 | BaseObject::~BaseObject () |
---|
40 | { |
---|
41 | delete []this->className; |
---|
42 | } |
---|
43 | |
---|
44 | void BaseObject::setClassName (char* className) |
---|
45 | { |
---|
46 | this->className = new char[strlen(className)+1]; |
---|
47 | strcpy(this->className, className); |
---|
48 | } |
---|
49 | |
---|
50 | char* BaseObject::getClassName(void) const |
---|
51 | { |
---|
52 | return className; |
---|
53 | } |
---|
54 | |
---|
55 | bool BaseObject::isA (char* className) |
---|
56 | { |
---|
57 | if( this->className == className) |
---|
58 | return false; |
---|
59 | return true; |
---|
60 | } |
---|
61 | |
---|
62 | /* |
---|
63 | bool BaseObject::isFinalized() |
---|
64 | { |
---|
65 | |
---|
66 | } |
---|
67 | */ |
---|
68 | |
---|
69 | void BaseObject::finalize() |
---|
70 | { |
---|
71 | this->finalized = true; |
---|
72 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.