Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

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

Last change on this file since 3610 was 3607, checked in by patrick, 20 years ago

orxonox/trunk: stdincl was still included everywhere. removed it out of the stdincl.h file to enable the possibility of compile-speedup. added some testclasses for vector/quaternion.

File size: 997 bytes
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}
33
34
35/**
36   \brief standard deconstructor
37*/
38BaseObject::~BaseObject () 
39{
40  delete []this->className;
41}
42
43void BaseObject::setClassName (char* className)
44{
45  this->className = new char[strlen(className)+1];
46  strcpy(this->className, className);
47}
48
49char* BaseObject::getClassName(void) const
50{
51  return className;
52}
53
54bool BaseObject::isA (char* className)
55{
56  if( this->className == className)
57    return false;
58  return true;
59}
Note: See TracBrowser for help on using the repository browser.