source:
orxonox.OLD/trunk/src/lib/util/multi_type.cc
@
5536
Last change on this file since 5536 was 5536, checked in by bensch, 19 years ago | |
---|---|
File size: 1.0 KB |
Rev | Line | |
---|---|---|
[4744] | 1 | /* |
[1853] | 2 | orxonox - the future of 3D-vertical-scrollers |
3 | ||
4 | Copyright (C) 2004 orx | |
5 | ||
6 | This program is free software; you can redistribute it and/or modify | |
7 | it under the terms of the GNU General Public License as published by | |
8 | the Free Software Foundation; either version 2, or (at your option) | |
9 | any later version. | |
[1855] | 10 | |
11 | ### File Specific: | |
12 | main-programmer: ... | |
13 | co-programmer: ... | |
[1853] | 14 | */ |
15 | ||
[3955] | 16 | //#define DEBUG_SPECIAL_MODULE DEBUG_MODULE_ |
[1853] | 17 | |
[5536] | 18 | #include "multi_type.h" |
19 | #include "stdincl.h" | |
[1853] | 20 | |
[1856] | 21 | using namespace std; |
[1853] | 22 | |
[5536] | 23 | MultiType::MultiType(int value) |
24 | { | |
25 | this->type = M_Int; | |
26 | this->value.typeInt = value; | |
27 | } | |
[1856] | 28 | |
[5536] | 29 | |
30 | MultiType::MultiType(float value) | |
[3365] | 31 | { |
[5536] | 32 | this->type = M_Float; |
33 | this->value.typeFloat = value; | |
34 | } | |
[4320] | 35 | |
36 | ||
[5536] | 37 | MultiType::MultiType(char value) |
38 | { | |
39 | this->type = M_Char; | |
40 | this->value.typeChar = value; | |
[3365] | 41 | } |
[1853] | 42 | |
43 | ||
[5536] | 44 | MultiType::MultiType(const char* value) |
45 | { | |
46 | this->type = M_String; | |
47 | this->value.typeString = new char[strlen(value)+1]; | |
48 | strcpy(this->value.typeString, value); | |
49 | } | |
50 | ||
[3245] | 51 | /** |
[4838] | 52 | * standard deconstructor |
[3245] | 53 | */ |
[5536] | 54 | MultiType::~MultiType () |
[3543] | 55 | { |
56 | // delete what has to be deleted here | |
57 | } |
Note: See TracBrowser
for help on using the repository browser.