1
/* Copyright (C) 2000-2004 Thomas Bopp, Thorsten Hampel, Ludger Merkens
1
/* Copyright (C) 2000-2005 Thomas Bopp, Thorsten Hampel, Ludger Merkens
3
3
* This program is free software; you can redistribute it and/or modify
4
4
* it under the terms of the GNU General Public License as published by
14
14
* along with this program; if not, write to the Free Software
15
15
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17
* $Id: ContainerFactory.pike,v 1.1.1.1 2005/02/23 14:47:21 cvs Exp $
17
* $Id: ContainerFactory.pike,v 1.1.1.1 2006/03/27 12:40:08 exodusd Exp $
20
constant cvs_version="$Id: ContainerFactory.pike,v 1.1.1.1 2005/02/23 14:47:21 cvs Exp $";
20
constant cvs_version="$Id: ContainerFactory.pike,v 1.1.1.1 2006/03/27 12:40:08 exodusd Exp $";
22
22
inherit "/factories/ObjectFactory";
40
register_attribute(Attribute(CONT_SIZE_X, "x-size", CMD_TYPE_FLOAT,
41
0.0, 0, CONTROL_ATTR_CLIENT));
42
register_attribute(Attribute(CONT_SIZE_Y, "y-size", CMD_TYPE_FLOAT,
43
0.0, 0, CONTROL_ATTR_CLIENT));
44
register_attribute(Attribute(CONT_SIZE_Z, "z-size", CMD_TYPE_FLOAT,
45
0.0, 0, CONTROL_ATTR_CLIENT));
46
register_attribute(Attribute(CONT_EXCHANGE_LINKS, "exchange links",
40
register_class_attribute(Attribute(
41
CONT_SIZE_X, "x-size", CMD_TYPE_FLOAT,
42
0.0, 0, CONTROL_ATTR_CLIENT));
43
register_class_attribute(Attribute(
44
CONT_SIZE_Y, "y-size", CMD_TYPE_FLOAT,
45
0.0, 0, CONTROL_ATTR_CLIENT));
46
register_class_attribute(Attribute(
47
CONT_SIZE_Z, "z-size", CMD_TYPE_FLOAT,
48
0.0, 0, CONTROL_ATTR_CLIENT));
49
register_class_attribute(Attribute(
50
CONT_EXCHANGE_LINKS, "exchange links",
47
51
CMD_TYPE_INT, 0, // link exchange turned off
48
52
REG_ACQ_ENVIRONMENT, CONTROL_ATTR_USER));
53
register_class_attribute(Attribute(
54
CONT_WSDL, "Container WSDL Description",
56
REG_ACQ_ENVIRONMENT, CONTROL_ATTR_USER));
56
64
* @param mapping vars - execute vars, especially the containers name.
57
65
* @return proxy of the newly created container.
58
* @author <a href="mailto:astra@upb.de">Thomas Bopp</a>)
60
67
object execute(mapping vars)
63
70
string name = vars["name"];
64
71
try_event(EVENT_EXECUTE, CALLER, obj);
72
if ( vars->transient ) {
73
if ( mappingp(vars->attributes) )
74
vars->attributes[OBJ_TEMP] = 1;
76
vars->attributes = ([ OBJ_TEMP : 1 ]);
65
79
obj = ::object_create(
66
80
name, CLASS_NAME_CONTAINER, 0, vars["attributes"],
67
81
vars["attributesAcquired"], vars["attributesLocked"]);