14 #ifndef PI_PythonResourceTypes_H
15 #define PI_PythonResourceTypes_H
20 namespace PI_PythonResource
128 myDataArray.
append(
Elem(key,value,
false,
false));
131 void add(
char const * key,
char const *
value,
bool double_quote)
150 add(
"state_type", value, double_quote);
155 add(
"state_label", value, double_quote);
160 add(
"handle_type", value, double_quote);
165 add(
"handle_label", value, double_quote);
170 add(
"package_name", value, double_quote);
175 add(
"package_filepath", value, double_quote);
180 add(
"event_message", value, double_quote);
181 addExpr(
"event_message_type",
"hou.severityType.Message");
186 add(
"event_message", value, double_quote);
187 addExpr(
"event_message_type",
"hou.severityType.ImportantMessage");
192 add(
"event_message", value, double_quote);
193 addExpr(
"event_message_type",
"hou.severityType.Warning");
198 add(
"event_message", value, double_quote);
199 addExpr(
"event_message_type",
"hou.severityType.Error");
204 add(
"event_message", value, double_quote);
205 addExpr(
"event_message_type",
"hou.severityType.Fatal");
210 myDeliveryMode =
mode;
215 return myDeliveryMode;
246 template <
typename T>
T
249 if (
typeid(
int) == any.type())
251 return static_cast<T>(hboost::any_cast<
int>(
any));
253 else if (
typeid(
double) == any.type())
255 return static_cast<T>(hboost::any_cast<
double>(
any));
257 else if (
typeid(
bool) == any.type())
259 return static_cast<T>(hboost::any_cast<
bool>(
any));
264 template <>
inline std::string
267 if (
typeid(std::string) == any.type())
269 return hboost::any_cast<std::string>(
any);
271 else if (
typeid(
int) == any.type())
275 else if (
typeid(
double) == any.type())
279 else if (
typeid(
bool) == any.type())
283 return std::string();
286 template <>
inline int
289 if (
typeid(
int) == any.type())
291 return hboost::any_cast<
int>(
any);
293 else if (
typeid(
bool) == any.type())
295 return (
int)hboost::any_cast<
bool>(
any);
303 #endif // PI_PythonResourceTypes_H
void addStateLabel(char const *value, bool double_quote=false)
void add(char const *key, Elem::Value const &value)
GLsizei const GLfloat * value
Elem(char const *key, Value const &value, bool expr, bool double_quote)
const char * c_str() const
int substitute(const char *find, const char *replacement, exint count=-1)
GLint GLint GLsizei GLint GLenum GLenum type
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)
std::pair< UT_StringHolder, UT_StringHolder > ActiveViewerPair
void addPackageFilepath(char const *value, bool double_quote=false)
void addHandleLabel(char const *value, bool double_quote=false)