7 #ifndef MYGUI_FLOW_DIRECTION_H_ 8 #define MYGUI_FLOW_DIRECTION_H_ 38 const char* name = type.getValueName(value);
39 if (strcmp(name,
"") == 0 || name == _value)
break;
42 type.mValue = (
Enum)value;
48 return mValue == LeftToRight || mValue == RightToLeft;
53 return !isHorizontal();
58 return a.mValue == b.mValue;
63 return a.mValue != b.mValue;
66 friend std::ostream& operator << ( std::ostream& _stream,
const FlowDirection& _value )
68 _stream << _value.getValueName(_value.mValue);
72 friend std::istream& operator >> ( std::istream& _stream,
FlowDirection& _value )
76 _value = parse(value);
82 return getValueName(mValue);
91 const char* getValueName(
int _index)
const 93 static const char* values[MAX + 1] = {
"LeftToRight",
"RightToLeft",
"TopToBottom",
"BottomToTop",
"" };
94 return values[(_index < MAX && _index >= 0) ? _index : MAX];
103 #endif // MYGUI_FLOW_DIRECTION_H_
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)
FlowDirection(Enum _value=LeftToRight)
static FlowDirection parse(const std::string &_value)
bool isHorizontal() const
std::string print() const