TDME2  1.9.200
GUILayoutNode_Alignment.cpp
Go to the documentation of this file.
2 
3 #include <string>
4 
5 #include <tdme/tdme.h>
6 #include <tdme/utilities/Enum.h>
7 
8 using std::string;
9 
12 
13 GUILayoutNode_Alignment::GUILayoutNode_Alignment(const string& name, int ordinal)
14  : Enum(name, ordinal)
15 {
16 }
17 
21 
23 {
24  if (HORIZONTAL->getName() == name) return HORIZONTAL;
25  if (NONE->getName() == name) return NONE;
26  if (VERTICAL->getName() == name) return VERTICAL;
27  // TODO: throw exception here maybe
28  return nullptr;
29 }
static STATIC_DLL_IMPEXT GUILayoutNode_Alignment * VERTICAL
static GUILayoutNode_Alignment * valueOf(const string &name)
Returns enum object given by name.
static STATIC_DLL_IMPEXT GUILayoutNode_Alignment * HORIZONTAL
static STATIC_DLL_IMPEXT GUILayoutNode_Alignment * NONE
Enum base class.
Definition: Enum.h:14
const string & getName() const
Definition: Enum.h:37