20 #ifndef HURRICANE_TRANSFORMATION
21 #define HURRICANE_TRANSFORMATION
23 #include "hurricane/Box.h"
41 public:
enum Code {ID=0, R1=1, R2=2, R3=3, MX=4, XR=5, MY=6, YR=7};
51 public:
operator const Code&()
const {
return _code;};
53 public:
const Code& getCode()
const {
return _code;};
55 public:
string _getTypeName()
const {
return _TName(
"Transformation::Orientation"); };
56 public:
string _getString()
const;
57 public: Record* _getRecord()
const;
116 public:
bool isEven()
const {
return !(_orientation.getCode() & 1);};
117 public:
bool isOdd()
const {
return (_orientation.getCode() & 1);};
135 public:
string _getTypeName()
const {
return _TName(
"Transformation"); };
136 public:
string _getString()
const;
137 public: Record* _getRecord()
const;
138 public:
void toJson(JsonWriter*)
const;
142 class JsonTransformation :
public JsonObject {
145 public:
static void initialize();
146 public: JsonTransformation(
unsigned long);
147 public:
virtual string getTypeName()
const;
148 public:
virtual JsonTransformation* clone(
unsigned long)
const;
149 public:
virtual void toData(JsonStack&);
160 inline std::string getString<const Hurricane::Transformation::Orientation::Code*>
161 (
const Hurricane::Transformation::Orientation::Code*
object )
164 case Hurricane::Transformation::Orientation::ID:
return "ID";
165 case Hurricane::Transformation::Orientation::R1:
return "R1";
166 case Hurricane::Transformation::Orientation::R2:
return "R2";
167 case Hurricane::Transformation::Orientation::R3:
return "R3";
168 case Hurricane::Transformation::Orientation::MX:
return "MX";
169 case Hurricane::Transformation::Orientation::XR:
return "XR";
170 case Hurricane::Transformation::Orientation::MY:
return "MY";
171 case Hurricane::Transformation::Orientation::YR:
return "YR";
177 inline Hurricane::Record* getRecord<const Hurricane::Transformation::Orientation::Code*>
178 (
const Hurricane::Transformation::Orientation::Code*
object )
180 Hurricane::Record* record =
new Hurricane::Record(getString(
object));
181 record->add(getSlot(
"Code", (
unsigned int*)
object));
186 inline std::string getString<Hurricane::Transformation::Orientation::Code*>
187 ( Hurricane::Transformation::Orientation::Code*
object )
190 case Hurricane::Transformation::Orientation::ID:
return "ID";
191 case Hurricane::Transformation::Orientation::R1:
return "R1";
192 case Hurricane::Transformation::Orientation::R2:
return "R2";
193 case Hurricane::Transformation::Orientation::R3:
return "R3";
194 case Hurricane::Transformation::Orientation::MX:
return "MX";
195 case Hurricane::Transformation::Orientation::XR:
return "XR";
196 case Hurricane::Transformation::Orientation::MY:
return "MY";
197 case Hurricane::Transformation::Orientation::YR:
return "YR";
203 inline Hurricane::Record* getRecord<Hurricane::Transformation::Orientation::Code*>
204 ( Hurricane::Transformation::Orientation::Code*
object )
206 Hurricane::Record* record =
new Hurricane::Record(getString(
object));
207 record->add(getSlot(
"Code", (
unsigned int*)
object));
214 IOSTREAM_POINTER_SUPPORT(Hurricane::Transformation::Orientation::Code);
Box description (API)
Definition: Box.h:31
std::int64_t Unit
Definition: DbU.h:67
Point description (API)
Definition: Point.h:32
The namespace dedicated to Hurricane.
Definition: Generalities.dox:5