| 100 | } |
| 101 | |
| 102 | static inline void handler(DynamicHandlerOp op, void *ioValue, int inSize, void *outResult) |
| 103 | { |
| 104 | if (op==dhoToString) |
| 105 | *(String *)outResult = toString(ioValue); |
| 106 | else if (op==dhoGetClassName) |
| 107 | *(const char **)outResult = getName(); |
| 108 | else if (op==dhoFromDynamic) |
| 109 | { |
| 110 | StructHandlerDynamicParams *params = (StructHandlerDynamicParams *)outResult; |
| 111 | if (params->inData->__GetType()==vtInt) |
| 112 | { |
| 113 | *(int *)ioValue = params->inData->__ToInt(); |
| 114 | params->outProcessed = true; |
| 115 | } |
| 116 | else |
| 117 | DefaultStructHandler::handler(op,ioValue, inSize, outResult); |
| 118 | } |
| 119 | else |
| 120 | DefaultStructHandler::handler(op,ioValue, inSize, outResult); |
| 121 | } |
| 122 | }; |
| 123 | |
| 124 | |