we were implementing instanceof with char*...
That was during the (golden) C age of SimGrid.
XBT_PUBLIC(msg_as_t) MSG_environment_as_get_by_name(const char * name);
XBT_PUBLIC(xbt_dict_t) MSG_environment_as_get_routing_sons(msg_as_t as);
XBT_PUBLIC(const char *) MSG_environment_as_get_property_value(msg_as_t as, const char *name);
-XBT_PUBLIC(const char *) MSG_environment_as_get_model(msg_as_t as);
XBT_PUBLIC(xbt_dynar_t) MSG_environment_as_get_hosts(msg_as_t as);
/************************** File handling ***********************************/
return jproperty;
}
-JNIEXPORT jobject JNICALL
-Java_org_simgrid_msg_As_getModel(JNIEnv * env, jobject jas) {
- msg_as_t as = jas_get_native(env, jas);
- return env->NewStringUTF(MSG_environment_as_get_model(as));
-}
-
JNIEXPORT jobjectArray JNICALL
Java_org_simgrid_msg_As_getHosts(JNIEnv * env, jobject jas)
{
JNIEXPORT jobject JNICALL
Java_org_simgrid_msg_As_getProperty(JNIEnv *env, jobject jhost, jobject jname);
-JNIEXPORT jobject JNICALL
-Java_org_simgrid_msg_As_getModel(JNIEnv * env, jobject jas);
-
JNIEXPORT jobjectArray JNICALL
Java_org_simgrid_msg_As_getHosts(JNIEnv * env, jobject jas);
public native String getProperty(String name);
- public native String getModel();
-
public native Host[] getHosts();
/**
XBT_PUBLIC_DATA(const char *) surf_AS_get_name(AS_t as);
XBT_PUBLIC_DATA(AS_t) surf_AS_get_by_name(const char * name);
XBT_PUBLIC_DATA(xbt_dict_t) surf_AS_get_routing_sons(AS_t as);
-XBT_PUBLIC_DATA(const char *) surf_AS_get_model(AS_t as);
XBT_PUBLIC_DATA(xbt_dynar_t) surf_AS_get_hosts(AS_t as);
XBT_PUBLIC_DATA(void) surf_AS_get_graph(AS_t as, xbt_graph_t graph, xbt_dict_t nodes, xbt_dict_t edges);
XBT_PUBLIC_DATA(AS_t) surf_platf_get_root(routing_platf_t platf);
return (char*) xbt_dict_get_or_null(dict, name);
}
-const char *MSG_environment_as_get_model(msg_as_t as) {
- return surf_AS_get_model(as);
-}
-
xbt_dynar_t MSG_environment_as_get_hosts(msg_as_t as) {
return surf_AS_get_hosts(as);
}
return as->p_routingSons;
}
-const char *surf_AS_get_model(simgrid::surf::As *as)
-{
- return as->p_modelDesc->name;
-}
-
xbt_dynar_t surf_AS_get_hosts(simgrid::surf::As *as)
{
xbt_dynar_t elms = as->p_indexNetworkElm;