MCPcopy Create free account
hub / github.com/Norbyte/ositools / RegisterHelperFunctions

Method RegisterHelperFunctions

OsiInterface/Functions/UtilityFunctions.cpp:113–214  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

111 }
112
113 void CustomFunctionLibrary::RegisterHelperFunctions()
114 {
115 auto & functionMgr = osiris_.GetCustomFunctionManager();
116
117 auto debugLog = std::make_unique<CustomCall>(
118 "NRD_DebugLog",
119 std::vector<CustomFunctionParam>{ { "Message", ValueType::None, FunctionArgumentDirection::In } },
120 &func::DebugLog
121 );
122 functionMgr.Register(std::move(debugLog));
123
124 auto stringCompare = std::make_unique<CustomQuery>(
125 "NRD_StringCompare",
126 std::vector<CustomFunctionParam>{
127 { "A", ValueType::String, FunctionArgumentDirection::In },
128 { "B", ValueType::String, FunctionArgumentDirection::In },
129 { "Result", ValueType::Integer, FunctionArgumentDirection::Out }
130 },
131 &func::StringCompare
132 );
133 functionMgr.Register(std::move(stringCompare));
134
135 auto stringLength = std::make_unique<CustomQuery>(
136 "NRD_StringLength",
137 std::vector<CustomFunctionParam>{
138 { "String", ValueType::String, FunctionArgumentDirection::In },
139 { "Length", ValueType::Integer, FunctionArgumentDirection::Out }
140 },
141 &func::StringLength
142 );
143 functionMgr.Register(std::move(stringLength));
144
145 auto stringToInt = std::make_unique<CustomQuery>(
146 "NRD_StringToInt",
147 std::vector<CustomFunctionParam>{
148 { "String", ValueType::String, FunctionArgumentDirection::In },
149 { "Result", ValueType::Integer, FunctionArgumentDirection::Out }
150 },
151 &func::StringToInt
152 );
153 functionMgr.Register(std::move(stringToInt));
154
155 auto stringToReal = std::make_unique<CustomQuery>(
156 "NRD_StringToReal",
157 std::vector<CustomFunctionParam>{
158 { "String", ValueType::String, FunctionArgumentDirection::In },
159 { "Result", ValueType::Real, FunctionArgumentDirection::Out }
160 },
161 &func::StringToReal
162 );
163 functionMgr.Register(std::move(stringToReal));
164
165 auto realToString = std::make_unique<CustomQuery>(
166 "NRD_RealToString",
167 std::vector<CustomFunctionParam>{
168 { "Real", ValueType::Real, FunctionArgumentDirection::In },
169 { "Result", ValueType::String, FunctionArgumentDirection::Out }
170 },

Callers

nothing calls this directly

Calls 1

RegisterMethod · 0.45

Tested by

no test coverage detected