You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
if (pm != nullptr && _submodel_num < pm->n_models)
192
+
returntrue;
193
+
}
194
+
}
195
+
returnfalse;
196
+
}
197
+
198
+
199
+
ADE_FUNC(__eq, l_ModelInstance, "model_instance, model_instance", "Checks if two model instance handles refer to the same model instance", "boolean", "True if model instances are equal")
200
+
{
201
+
modelinstance_h* mih1;
202
+
modelinstance_h* mih2;
203
+
204
+
if (!ade_get_args(L, "oo", l_ModelInstance.GetPtr(&mih1), l_ModelInstance.GetPtr(&mih2)))
205
+
returnADE_RETURN_NIL;
206
+
207
+
if (mih1->GetID() == mih2->GetID())
208
+
returnADE_RETURN_TRUE;
209
+
210
+
returnADE_RETURN_FALSE;
171
211
}
172
212
213
+
ADE_FUNC(__eq, l_SubmodelInstance, "submodel_instance, submodel_instance", "Checks if two submodel instance handles refer to the same submodel instance", "boolean", "True if submodel instances are equal")
214
+
{
215
+
submodelinstance_h* smih1;
216
+
submodelinstance_h* smih2;
217
+
218
+
if (!ade_get_args(L, "oo", l_SubmodelInstance.GetPtr(&smih1), l_SubmodelInstance.GetPtr(&smih2)))
219
+
returnADE_RETURN_NIL;
220
+
221
+
if (smih1->GetModelInstanceID() == smih2->GetModelInstanceID() && smih1->GetSubmodelIndex() == smih2->GetSubmodelIndex())
222
+
returnADE_RETURN_TRUE;
223
+
224
+
returnADE_RETURN_FALSE;
225
+
}
173
226
174
227
ADE_FUNC(getModel, l_ModelInstance, nullptr, "Returns the model used by this instance", "model", "A model")
0 commit comments