7#ifndef MYGUI_FLOW_DIRECTION_H_
8#define MYGUI_FLOW_DIRECTION_H_
40 const char* name = type.getValueName(value);
41 if (strcmp(name,
"") == 0 || name == _value)
break;
44 type.mValue = (
Enum)value;
50 return mValue == LeftToRight || mValue == RightToLeft;
55 return !isHorizontal();
60 return a.mValue == b.mValue;
65 return a.mValue != b.mValue;
68 friend std::ostream& operator << ( std::ostream& _stream,
const FlowDirection& _value )
70 _stream << _value.getValueName(_value.mValue);
74 friend std::istream& operator >> ( std::istream& _stream,
FlowDirection& _value )
78 _value = parse(value);
84 return getValueName(mValue);
93 const char* getValueName(
int _index)
const
95 static const char* values[MAX + 1] = {
"LeftToRight",
"RightToLeft",
"TopToBottom",
"BottomToTop",
"" };
96 return values[(_index < MAX && _index >= 0) ? _index : MAX];
bool operator==(const UString::_const_fwd_iterator &left, const UString::_const_fwd_iterator &right)
bool operator!=(const UString::_const_fwd_iterator &left, const UString::_const_fwd_iterator &right)
std::string print() const
static FlowDirection parse(const std::string &_value)
FlowDirection(Enum _value=LeftToRight)
bool isHorizontal() const