Neo  0.5.0
Developer Documentation
PointerVariable.h
Go to the documentation of this file.
1 //========================================================================
2 // Copyright (c) 2003-2011 Anael Seghezzi <www.maratis3d.com>
3 //
4 // This software is provided 'as-is', without any express or implied
5 // warranty. In no event will the authors be held liable for any damages
6 // arising from the use of this software.
7 //
8 // Permission is granted to anyone to use this software for any purpose,
9 // including commercial applications, and to alter it and redistribute it
10 // freely, subject to the following restrictions:
11 //
12 // 1. The origin of this software must not be misrepresented; you must not
13 // claim that you wrote the original software. If you use this software
14 // in a product, an acknowledgment in the product documentation would
15 // be appreciated but is not required.
16 //
17 // 2. Altered source versions must be plainly marked as such, and must not
18 // be misrepresented as being the original software.
19 //
20 // 3. This notice may not be removed or altered from any source
21 // distribution.
22 //
23 //========================================================================
24 
25 
26 #ifndef __VARIABLE_H
27 #define __VARIABLE_H
28 
29 namespace Neo
30 {
31 
36 {
48 };
49 
55 class NEO_ENGINE_EXPORT NeoVariable
56 {
57 private:
58 
59  M_VARIABLE_TYPE m_type;
60 
61  const char * m_name;
62  void * m_pointer;
63 
64 public:
65 
67  m_name(NULL),
68  m_pointer(NULL),
69  m_type(M_VARIABLE_NULL)
70  {}
71 
80  NeoVariable(const char * name, void * pointer, M_VARIABLE_TYPE type):
81  m_name(name),
82  m_pointer(pointer),
83  m_type(type)
84  {}
85 
86 public:
87 
91  inline M_VARIABLE_TYPE getType(void){ return m_type; }
92 
96  inline const char * getName(void){ return m_name; }
97 
102  inline void * getPointer(void){ return m_pointer; }
103 };
104 }
105 
106 #endif
void * getPointer(void)
getPointer
Definition: PointerVariable.h:102
Definition: PointerVariable.h:45
M_VARIABLE_TYPE getType(void)
getType
Definition: PointerVariable.h:91
Definition: PointerVariable.h:44
Definition: PointerVariable.h:46
Definition: PointerVariable.h:37
const char * getName(void)
getName
Definition: PointerVariable.h:96
Definition: PointerVariable.h:47
Definition: PointerVariable.h:41
Definition: PointerVariable.h:38
Definition: PointerVariable.h:39
NeoVariable(const char *name, void *pointer, M_VARIABLE_TYPE type)
Definition: PointerVariable.h:80
NeoVariable()
Definition: PointerVariable.h:66
Definition: PointerVariable.h:43
Definition: Color.h:29
Definition: PointerVariable.h:42
The NeoVariable class defines a variable that can be of any type available in M_VARIABLE_TYPE.
Definition: PointerVariable.h:55
Definition: PointerVariable.h:40
M_VARIABLE_TYPE
The M_VARIABLE_TYPE enum defines all types that are storable in an MVariable object.
Definition: PointerVariable.h:35