コード例 #1
0
ファイル: range.cpp プロジェクト: brennane/gridpot
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);
}
コード例 #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);
}
コード例 #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);
}
コード例 #4
0
ファイル: solar_service.cpp プロジェクト: am546/wis_project
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);
}
コード例 #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);
}
コード例 #6
0
ファイル: metrics.cpp プロジェクト: SanjayaDeSilva/GridLAB-D
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);
}
コード例 #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);
}
コード例 #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);
}
コード例 #9
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_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);
}
コード例 #10
0
ファイル: voltdump.cpp プロジェクト: SanjayaDeSilva/GridLAB-D
/**
* 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);
}
コード例 #11
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_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);
}
コード例 #12
0
ファイル: windturb_dg.cpp プロジェクト: ryuever/sgrid
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);
}
コード例 #13
0
ファイル: plugload.cpp プロジェクト: SanjayaDeSilva/GridLAB-D
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);
}
コード例 #14
0
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);
}
コード例 #15
0
ファイル: house_a.cpp プロジェクト: brennane/gridpot
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);
}
コード例 #16
0
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);
}
コード例 #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);
}