Last change
on this file since 3519 was
3505,
checked in by bensch, 20 years ago
|
orxonox/branches/trackManager: added trackNode, but there is a segfault while deleting the pNodes
|
File size:
1.3 KB
|
Rev | Line | |
---|
[3276] | 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: |
---|
[3463] | 14 | main-programmer: Benjamin Grauer |
---|
[3276] | 15 | co-programmer: ... |
---|
| 16 | */ |
---|
| 17 | |
---|
| 18 | |
---|
[3463] | 19 | #include "track_node.h" |
---|
| 20 | |
---|
[3276] | 21 | #include "null_parent.h" |
---|
| 22 | |
---|
[3463] | 23 | #include "track_manager.h" |
---|
[3276] | 24 | |
---|
| 25 | using namespace std; |
---|
| 26 | |
---|
[3463] | 27 | TrackNode* TrackNode::singletonRef = 0; |
---|
[3276] | 28 | |
---|
[3463] | 29 | TrackNode* TrackNode::getInstance () |
---|
[3311] | 30 | { |
---|
[3463] | 31 | if (singletonRef == NULL) |
---|
| 32 | singletonRef = new TrackNode (); |
---|
[3311] | 33 | return singletonRef; |
---|
| 34 | } |
---|
| 35 | |
---|
[3276] | 36 | /** |
---|
| 37 | \brief standard constructor |
---|
| 38 | |
---|
| 39 | \todo this constructor is not jet implemented - do it |
---|
| 40 | */ |
---|
[3463] | 41 | TrackNode::TrackNode () |
---|
[3276] | 42 | { |
---|
[3505] | 43 | NullParent::getInstance()->addChild(this); |
---|
[3463] | 44 | this->trackManager = TrackManager::getInstance(); |
---|
[3276] | 45 | this->mode = ALL; |
---|
| 46 | } |
---|
| 47 | |
---|
| 48 | |
---|
[3463] | 49 | TrackNode::TrackNode (Vector* absCoordinate) |
---|
[3276] | 50 | { |
---|
[3463] | 51 | this->parent = NullParent::getInstance(); |
---|
| 52 | this->trackManager = TrackManager::getInstance(); |
---|
[3276] | 53 | this->mode = ALL; |
---|
| 54 | this->absCoordinate = *absCoordinate; |
---|
| 55 | } |
---|
| 56 | |
---|
| 57 | |
---|
| 58 | /** |
---|
| 59 | \brief standard deconstructor |
---|
| 60 | |
---|
| 61 | \todo this deconstructor is not jet implemented - do it |
---|
| 62 | */ |
---|
[3463] | 63 | TrackNode::~TrackNode () |
---|
[3311] | 64 | { |
---|
| 65 | singletonRef = NULL; |
---|
| 66 | } |
---|
[3276] | 67 | |
---|
Note: See
TracBrowser
for help on using the repository browser.