Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: orxonox.OLD/orxonox/trunk/src/lib/coord/null_parent.cc @ 4498

Last change on this file since 4498 was 4448, checked in by bensch, 20 years ago

orxonox/trunk: doxygen-tags, and cleanup of NullParent

File size: 1.2 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#define DEBUG_SPECIAL_MODULE DEBUG_MODULE_NULL_PARENT
19
20#include "null_parent.h"
21
22using namespace std;
23
24NullParent* NullParent::singletonRef = 0;
25
26/**
27   \returns the Reference to the NullParent
28*/
29NullParent* NullParent::getInstance ()
30{
31  if(!NullParent::singletonRef)
32    NullParent::singletonRef = new NullParent ();
33  return NullParent::singletonRef;
34}
35
36/**
37   \brief creates the one and only NullParent
38   \param absCoordinate the cordinate of the Parent (normally Vector(0,0,0))
39*/
40NullParent::NullParent (const Vector& absCoordinate) : PNode (absCoordinate, NULL)
41{
42  this->setClassID(CL_NULL_PARENT, "NullParent");
43  this->setName("NullParent");
44
45  this->setParentMode(PNODE_ALL);
46  NullParent::singletonRef = this;
47}
48
49
50/**
51   \brief standard deconstructor
52*/
53NullParent::~NullParent () 
54{
55  //delete singletonRef;
56  NullParent::singletonRef = NULL;
57}
Note: See TracBrowser for help on using the repository browser.