MCPcopy Create free account
hub / github.com/HaxeFoundation/hxcpp / handler

Method handler

include/cpp/Pointer.h:102–121  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 3

toStringFunction · 0.85
__GetTypeMethod · 0.45
__ToIntMethod · 0.45

Tested by

no test coverage detected