TDME2
1.9.121
src
tdme
gui
nodes
GUINode_AlignmentHorizontal.cpp
Go to the documentation of this file.
1
#include <
tdme/gui/nodes/GUINode_AlignmentHorizontal.h
>
2
3
#include <string>
4
5
#include <
tdme/tdme.h
>
6
#include <
tdme/utilities/Enum.h
>
7
8
using
std::string;
9
10
using
tdme::gui::nodes::GUINode_AlignmentHorizontal
;
11
using
tdme::utilities::Enum
;
12
13
GUINode_AlignmentHorizontal::GUINode_AlignmentHorizontal(
const
string
& name,
int
ordinal)
14
:
Enum
(name, ordinal)
15
{
16
}
17
18
GUINode_AlignmentHorizontal
*
tdme::gui::nodes::GUINode_AlignmentHorizontal::NONE
=
new
GUINode_AlignmentHorizontal
(
"NONE"
, 0);
19
GUINode_AlignmentHorizontal
*
tdme::gui::nodes::GUINode_AlignmentHorizontal::LEFT
=
new
GUINode_AlignmentHorizontal
(
"LEFT"
, 1);
20
GUINode_AlignmentHorizontal
*
tdme::gui::nodes::GUINode_AlignmentHorizontal::CENTER
=
new
GUINode_AlignmentHorizontal
(
"CENTER"
, 2);
21
GUINode_AlignmentHorizontal
*
tdme::gui::nodes::GUINode_AlignmentHorizontal::RIGHT
=
new
GUINode_AlignmentHorizontal
(
"RIGHT"
, 3);
22
23
GUINode_AlignmentHorizontal
*
GUINode_AlignmentHorizontal::valueOf
(
const
string
& name)
24
{
25
if
(
NONE
->
getName
() ==
name
)
return
NONE
;
26
if
(
LEFT
->
getName
() ==
name
)
return
LEFT
;
27
if
(
CENTER
->
getName
() ==
name
)
return
CENTER
;
28
if
(
RIGHT
->
getName
() ==
name
)
return
RIGHT
;
29
// TODO: throw exception here maybe
30
return
nullptr
;
31
}
Enum.h
GUINode_AlignmentHorizontal.h
tdme::gui::nodes::GUINode_AlignmentHorizontal
GUI node horizontal alignment enum.
Definition:
GUINode_AlignmentHorizontal.h:28
tdme::gui::nodes::GUINode_AlignmentHorizontal::RIGHT
static STATIC_DLL_IMPEXT GUINode_AlignmentHorizontal * RIGHT
Definition:
GUINode_AlignmentHorizontal.h:33
tdme::gui::nodes::GUINode_AlignmentHorizontal::valueOf
static GUINode_AlignmentHorizontal * valueOf(const string &name)
Returns enum object given by name.
Definition:
GUINode_AlignmentHorizontal.cpp:23
tdme::gui::nodes::GUINode_AlignmentHorizontal::CENTER
static STATIC_DLL_IMPEXT GUINode_AlignmentHorizontal * CENTER
Definition:
GUINode_AlignmentHorizontal.h:32
tdme::gui::nodes::GUINode_AlignmentHorizontal::LEFT
static STATIC_DLL_IMPEXT GUINode_AlignmentHorizontal * LEFT
Definition:
GUINode_AlignmentHorizontal.h:31
tdme::gui::nodes::GUINode_AlignmentHorizontal::NONE
static STATIC_DLL_IMPEXT GUINode_AlignmentHorizontal * NONE
Definition:
GUINode_AlignmentHorizontal.h:30
tdme::utilities::Enum
Enum base class.
Definition:
Enum.h:14
tdme::utilities::Enum::getName
const string & getName() const
Definition:
Enum.h:30
tdme::utilities::Enum::name
string name
Definition:
Enum.h:16
tdme.h
Generated by
1.9.3