14 #ifndef PI_PythonResourceTypes_H
15 #define PI_PythonResourceTypes_H
20 namespace PI_PythonResource
127 myDataArray.
append(
Elem(key,value,
false,
false));
130 void add(
char const * key,
char const *
value,
bool double_quote)
148 add(
"state_type", value, double_quote);
153 add(
"state_label", value, double_quote);
158 add(
"handle_type", value, double_quote);
163 add(
"handle_label", value, double_quote);
168 add(
"package_name", value, double_quote);
173 add(
"package_filepath", value, double_quote);
178 add(
"event_message", value, double_quote);
179 addExpr(
"event_message_type",
"hou.severityType.Message");
184 add(
"event_message", value, double_quote);
185 addExpr(
"event_message_type",
"hou.severityType.ImportantMessage");
190 add(
"event_message", value, double_quote);
191 addExpr(
"event_message_type",
"hou.severityType.Warning");
196 add(
"event_message", value, double_quote);
197 addExpr(
"event_message_type",
"hou.severityType.Error");
202 add(
"event_message", value, double_quote);
203 addExpr(
"event_message_type",
"hou.severityType.Fatal");
208 myDeliveryMode =
mode;
213 return myDeliveryMode;
244 template <
typename T>
T
247 if (
typeid(
int) == any.type())
249 return static_cast<T>(hboost::any_cast<
int>(
any));
251 else if (
typeid(
double) == any.type())
253 return static_cast<T>(hboost::any_cast<
double>(
any));
255 else if (
typeid(
bool) == any.type())
257 return static_cast<T>(hboost::any_cast<
bool>(
any));
269 else if (
typeid(
int) == any.type())
273 else if (
typeid(
double) == any.type())
277 else if (
typeid(
bool) == any.type())
284 template <>
inline int
287 if (
typeid(
int) == any.type())
289 return hboost::any_cast<
int>(
any);
291 else if (
typeid(
bool) == any.type())
293 return (
int)hboost::any_cast<
bool>(
any);
301 #endif // PI_PythonResourceTypes_H
void addStateLabel(char const *value, bool double_quote=false)
void add(char const *key, Elem::Value const &value)
int substitute(const char *find, const char *replacement, int count=-1)
GLsizei const GLchar *const * string
GLsizei const GLfloat * value
Elem(char const *key, Value const &value, bool expr, bool double_quote)
const char * c_str() const
bool any(const vbool4 &v)
void setDeliveryMode(EventMessage::DeliveryMode mode)
void addMessage(char const *value, bool double_quote=false)
void addImportantMessage(char const *value, bool double_quote=false)
DeliveryMode deliveryMode() const
void addWarning(char const *value, bool double_quote=false)
void addFatal(char const *value, bool double_quote=false)
void addHandleType(char const *value, bool double_quote=false)
void addError(char const *value, bool double_quote=false)
void addPackageName(char const *value, bool double_quote=false)
T anyToType(hboost::any const &any)
Array const & values() const
void addStateType(char const *value, bool double_quote=false)
void add(char const *key, char const *value, bool double_quote)
void addExpr(char const *key, char const *value)
void addPackageFilepath(char const *value, bool double_quote=false)
void addHandleLabel(char const *value, bool double_quote=false)