Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

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

Last change on this file since 3607 was 3607, checked in by patrick, 19 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
RevLine 
[3302]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"
[3607]20#include "stdincl.h"
[3302]21
22
23using namespace std;
24
25
26/**
27   \brief standard constructor
28*/
[3531]29BaseObject::BaseObject () 
30{
31  this->className = NULL;
32}
[3302]33
34
35/**
36   \brief standard deconstructor
37*/
[3531]38BaseObject::~BaseObject () 
39{
[3552]40  delete []this->className;
[3531]41}
[3302]42
43void BaseObject::setClassName (char* className)
44{
[3552]45  this->className = new char[strlen(className)+1];
46  strcpy(this->className, className);
[3302]47}
48
[3442]49char* BaseObject::getClassName(void) const
50{
51  return className;
52}
[3302]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.