Exemplo n.º 1
0
EXPORT int create_range(OBJECT **obj, OBJECT *parent)
{
	try {
		*obj = gl_create_object(range::oclass);
		if (*obj!=NULL)
		{
			range *my = OBJECTDATA(*obj,range);;
			gl_set_parent(*obj,parent);
			my->create();
			return 1;
		}
		return 0;
	}
	CREATE_CATCHALL(range);
}
Exemplo n.º 2
0
EXPORT int create_microturbine(OBJECT **obj, OBJECT *parent) 
{
	try 
	{
		*obj = gl_create_object(microturbine::oclass);
		if (*obj!=NULL)
		{
			microturbine *my = OBJECTDATA(*obj,microturbine);
			gl_set_parent(*obj,parent);
			return my->create();
		}
		else
			return 0;
	} 
	CREATE_CATCHALL(microturbine);
}
Exemplo n.º 3
0
EXPORT int create_series_reactor(OBJECT **obj, OBJECT *parent)
{
	try
	{
		*obj = gl_create_object(series_reactor::oclass);
		if (*obj!=NULL)
		{
			series_reactor *my = OBJECTDATA(*obj,series_reactor);
			gl_set_parent(*obj,parent);
			return my->create();
		}
		else
			return 0;
	}
	CREATE_CATCHALL(series_reactor);
}
Exemplo n.º 4
0
EXPORT int create_solar_service(OBJECT **obj, OBJECT *parent) 
{
	try 
	{
		*obj = gl_create_object(solar_service::oclass);
		if (*obj!=NULL)
		{
			solar_service *my = OBJECTDATA(*obj,solar_service);
			gl_set_parent(*obj,parent);
			return my->create();
		}
		else
			return 0;
	} 
	CREATE_CATCHALL(solar_service);
}
Exemplo n.º 5
0
EXPORT int create_inverter(OBJECT **obj, OBJECT *parent) 
{
	try 
	{
		*obj = gl_create_object(inverter::oclass);
		if (*obj!=NULL)
		{
			inverter *my = OBJECTDATA(*obj,inverter);
			gl_set_parent(*obj,parent);
			return my->create();
		}
		else
			return 0;
	}
	CREATE_CATCHALL(inverter);
}
Exemplo n.º 6
0
EXPORT int create_metrics(OBJECT **obj, OBJECT *parent)
{
	try
	{
		*obj = gl_create_object(metrics::oclass);
		if (*obj!=NULL)
		{
			metrics *my = OBJECTDATA(*obj,metrics);
			gl_set_parent(*obj,parent);
			return my->create();
		}
		else
			return 0;
	}
	CREATE_CATCHALL(metrics);
}
Exemplo n.º 7
0
/**
* REQUIRED: allocate and initialize an object.
*
* @param obj a pointer to a pointer of the last object in the list
* @param parent a pointer to the parent of this object
* @return 1 for a successfully created object, 0 for error
*/
EXPORT int create_relay(OBJECT **obj, OBJECT *parent)
{
	try
	{
		*obj = gl_create_object(relay::oclass);
		if (*obj!=NULL)
		{
			relay *my = OBJECTDATA(*obj,relay);
			gl_set_parent(*obj,parent);
			return my->create();
		}
		else
			return 0;
	}
	CREATE_CATCHALL(relay);
}
Exemplo n.º 8
0
EXPORT int create_substation(OBJECT **obj, OBJECT *parent)
{
	try
	{
		*obj = gl_create_object(substation::oclass);
		if (*obj!=NULL)
		{
			substation *my = OBJECTDATA(*obj,substation);
			gl_set_parent(*obj,parent);
			return my->create();
		}
		else
			return 0;
	}
	CREATE_CATCHALL(substation);
}
/**
* REQUIRED: allocate and initialize an object.
*
* @param obj a pointer to a pointer of the last object in the list
* @param parent a pointer to the parent of this object
* @return 1 for a successfully created object, 0 for error
*/
EXPORT int create_powerflow_library(OBJECT **obj, OBJECT *parent)
{
	try
	{
		*obj = gl_create_object(powerflow_library::oclass);
		if (*obj!=NULL)
		{
			powerflow_library *my = OBJECTDATA(*obj,powerflow_library);
			gl_set_parent(*obj,parent);
			return my->create();
		}
		else
			return 0;
	}
	CREATE_CATCHALL(powerflow_library);
}
Exemplo n.º 10
0
/**
* REQUIRED: allocate and initialize an object.
*
* @param obj a pointer to a pointer of the last object in the list
* @param parent a pointer to the parent of this object
* @return 1 for a successfully created object, 0 for error
*/
EXPORT int create_voltdump(OBJECT **obj, OBJECT *parent)
{
	try
	{
		*obj = gl_create_object(voltdump::oclass);
		if (*obj!=NULL)
		{
			voltdump *my = OBJECTDATA(*obj,voltdump);
			gl_set_parent(*obj,parent);
			return my->create();
		}
		else
			return 0;
	}
	CREATE_CATCHALL(voltdump);
}
/**
* REQUIRED: allocate and initialize an object.
*
* @param obj a pointer to a pointer of the last object in the list
* @param parent a pointer to the parent of this object
* @return 1 for a successfully created object, 0 for error
*/
EXPORT int create_triplex_load(OBJECT **obj, OBJECT *parent)
{
	try
	{
		*obj = gl_create_object(triplex_load::oclass);
		if (*obj!=NULL)
		{
			triplex_load *my = OBJECTDATA(*obj,triplex_load);
			gl_set_parent(*obj,parent);
			return my->create();
		}
		else
			return 0;
	}
	CREATE_CATCHALL(triplex_load);
}
Exemplo n.º 12
0
EXPORT int create_windturb_dg(OBJECT **obj, OBJECT *parent)
{
	try
	{
		*obj = gl_create_object(windturb_dg::oclass);
		if (*obj!=NULL)
		{
			windturb_dg *my = OBJECTDATA(*obj,windturb_dg);
			gl_set_parent(*obj,parent);
			return my->create();
		}
		else 
			return 0;
	}
	CREATE_CATCHALL(windturb_dg);
}
Exemplo n.º 13
0
EXPORT int create_plugload(OBJECT **obj, OBJECT *parent)
{
	try
	{
		*obj = gl_create_object(plugload::oclass);
		if (*obj!=NULL)
		{
			plugload *my = OBJECTDATA(*obj,plugload);;
			gl_set_parent(*obj,parent);
			my->create();
			return 1;
		}
		else
			return 0;
	}
	CREATE_CATCHALL(plugload);
}
EXPORT int create_waterheater(OBJECT **obj, OBJECT *parent)
{
	try
	{
		*obj = gl_create_object(waterheater::oclass);
		if (*obj!=NULL)
		{
			waterheater *my = OBJECTDATA(*obj,waterheater);;
			gl_set_parent(*obj,parent);
			my->create();
			return 1;
		}
		else
			return 0;
	}
	CREATE_CATCHALL(waterheater);
}
Exemplo n.º 15
0
EXPORT int create_house_a(OBJECT **obj, OBJECT *parent)
{
	try
	{
		*obj = gl_create_object(house::oclass);
		if (*obj!=NULL)
		{
			house *my = OBJECTDATA(*obj,house);;
			gl_set_parent(*obj,parent);
			my->create();
			return 1;
		}
		else
			return 0;
	}
	CREATE_CATCHALL(house_a);
}
EXPORT int create_virtual_battery(OBJECT **obj, OBJECT *parent)
{
	try
	{
		*obj = gl_create_object(virtual_battery::oclass);
		if (*obj!=NULL)
		{
			virtual_battery *my = OBJECTDATA(*obj,virtual_battery);;
			gl_set_parent(*obj,parent);
			my->create();
			return 1;
		}
		else
			return 0;
	}
	CREATE_CATCHALL(virtual_battery);
}
Exemplo n.º 17
0
//////////////////////////////////////////////////////////////////////////
// IMPLEMENTATION OF CORE LINKAGE
//////////////////////////////////////////////////////////////////////////
EXPORT int create_refrigerator(OBJECT **obj, OBJECT *parent)
{
	try
	{
		*obj = gl_create_object(refrigerator::oclass);
		if (*obj!=NULL)
		{
			refrigerator *my = OBJECTDATA(*obj,refrigerator);;
			gl_set_parent(*obj,parent);
			my->create();
			return 1;
		}
		else
			return 0;
	}
	CREATE_CATCHALL(refrigerator);
}