void setParent (ACMEElement *parent);
};
ACME.Elements.Component
An ACME Component.
class Component : public Constituent {
Component (char *name, ComponentType *type);
//Component (ACMEStream *stream);
void setName (char *name);
ElementType* getConstituentType ();
CategoryT getCategory ();
char* getClassname ();
void exportACME (ACMEOutputStream *s);
void setType (ComponentType *type);
ComponentType* getType ();
void setPort (char *name, Port *p);
void addPort (char *name, Port *p);
Port* getPort (char *name);
void removePort (char *name);
PortEnumeration* getPorts ();
void doRemovePort (char *name);
void doSetPort (char *name, Port *p);
void doAddPort (char *name, Port *p);
void setInstantiation (ComponentTypeInstantiation *inst);
};
ACME.Elements.Connector
An ACME Connector
class Connector : public Constituent {
Connector (char *name, ConnectorType *t);
void setName (char *name);
CategoryT getCategory ();
void setType (ConnectorType *type);
ConnectorType* getType ();
ElementType* getConstituentType ();
void exportACME (ACMEOutputStream *s);
char* getClassname ();
void setRole (char *name, Role *p);
void addRole (char *name, Role *p);
Role* getRole (char *name);
void removeRole (char *name);
RoleEnumeration* getRoles ();
void doRemoveRole (char *name);
void doSetRole (char *name, Role *p);
void doAddRole (char *name, Role *p);
void setInstantiation (ConnectorTypeInstantiation *inst);
};
ACME.Elements.Port
An ACME Port
class Port : public Constituent {
Port* copy ();
Port (char *name, PortType *t);
// Port (ACMEStream *stream);
void setName (char *name);
void exportACME (ACMEOutputStream *s);
char* getClassname ();
CategoryT getCategory ();
void setType (PortType *type);
PortType* getType ();
ElementType* getConstituentType ();
void setInstantiation (PortTypeInstantiation *inst);
};
ACME.Elements.Role
An ACME Role
class Role : public Constituent {
Role (char *name, RoleType *type);
// Role (ACMEStream *stream);
void setName (char *name);
Role* copy ();
ElementType* getConstituentType ();
CategoryT getCategory ();
void exportACME (ACMEOutputStream *s);
char* getClassname ();
void setType (RoleType *type);
RoleType* getType ();
void setInstantiation (RoleTypeInstantiation *inst);
};
ACME.ConstituentTypes.ACMETypeManager
Manages type define in a design. Includes methods for looking up types based upon the scope. Makes use of local/family and global typespace.
class ACMETypeManager : public ACMEObject {
ACMETypeManager ();
void setDesign (Design *d { design d };);
Design* getDesign ( { return design };);
ElementType* getType (CategoryT cat, System *context, char *name);
// Type lookup by name
PropertyType* getPropertyType (System *context, char *name);
ComponentType* getComponentType (System *context, char *name);
ConnectorType* getConnectorType (System *context, char *name);
PortType* getPortType (System *context, char *name);
RoleType* getRoleType (System *context, char *name);
char* getClassname ();
};
ACME.ConstituentTypes.ACMETypespace
A lookup-table for types. Corresponds to a set of types defined in scope. Bascically, a symbol table for types.
class ACMETypespace : public ACMEObject {
// This should probably be moved to a separate type-manager class
// Types
// Manipulation of type lists
PropertyTypeEnumeration* getPropertyTypes ();
ComponentTypeEnumeration* getComponentTypes ();
ConnectorTypeEnumeration* getConnectorTypes ();
RoleTypeEnumeration* getRoleTypes ();
PortTypeEnumeration* getPortTypes ();
void addPropertyType (PropertyType *t);
void addComponentType (ComponentType *t);
void addConnectorType (ConnectorType *t);
void addPortType (PortType *t);
void addRoleType (RoleType *t);
// Generic type lookup
ElementType* getType (CategoryT cat, char *name);
void addType (ElementType *type);
// Type lookup by name
PropertyType* getPropertyType (char *name);
ComponentType* getComponentType (char *name);
ConnectorType* getConnectorType (char *name);
PortType* getPortType (char *name);
RoleType* getRoleType (char *name);
char* getClassname ();
// Type instantiation by name. These methods call the corresponding
// instantiate ( methods of the specific type classes.);
/*
Component* instantiateComp (char *comp_type_name);
Component* instantiateComp (char *name, Component *extension);
Component* instantiateCompFromPrototype (char *name, Component *prototype);
Connector* instantiateConn (char *name);
Connector* instantiateConn (char *name, Connector *extension);
Connector* instantiateConnFromPrototype (char *name, Connector *prototype);
Port* instantiatePort (char *name);
Port* instantiatePort (char *name, Port *extension);
Port* instantiatePortFromPrototype (char *name, Port *prototype);
Role* instantiateRole (char *name);
Role* instantiateRole (char *name, Role *extension);
Role* instantiateRoleFromPrototype (char *name, Role *prototype);
*/
};
ACME.ConstituentTypes.Family
This is an ACME Family definition. A Family has a collection of of global types defined for that family that can be used within a System in that Family.
class Family : public ACMEDesignObject {
// Name
Family (char *name);
char* getName ();
void setName (char *name);
ACMETypespace* getTypespace ();
void exportACME (ACMEOutputStream *s);
ACMEDesignObject* getScope ();
char* getClassname ();
};
ACME.ConstituentTypes.PropertyDescription
A PropertyDescription defines a set of Properties. Used as Part of an ElementType definition.
class PropertyDescription : public ACMEDesignObject {
char* getTypeName ();
PropertyDescription (char *n, PropertyType *t, PropertyValue *val);
PropertyValue* getValue ();
PropertyType* getType ();
char* getName ();
};
ACME.ConstituentTypes.ElementType
ElementType is an abstract base class which corresponds to an ACME constituent type. Has concrete derived classes PortType, RoleType, ConnectorType and ComponentType.
class ElementType : public ACMEDesignObject {
void init_instance (Constituent *e );
void init_instance_properties (ACMEElement *e);
bool typeCheck (Constituent *obj);
bool typeCheckProperties (Constituent *obj);
void exportChildDescriptions (ACMEOutputStream *s, char *label, ACMEMap *map);
void exportPropertyDescriptions (ACMEOutputStream *s);
void exportMetaProperties (ACMEOutputStream *s);
bool chkDeleteProperty (Constituent *c, char *name);
bool chkSetProperty (Constituent *c, char *name, PropertyValue *val);
bool chkAddProperty (Constituent *c, char *name, PropertyValue *val);
bool chkSetProperty (Constituent *c, PropertyValue *val);
bool chkDeleteProperty (Constituent *c, Property *p);
bool chkAddProperty (Constituent *c, Property *p);
void setMetaProperty (char *name, PropertyValue *val);
void addMetaProperty (Property *p);
void addMetaProperty (char *name, PropertyValue *val);
PropertyValue* getMetaProperty (char *name);
PropertyEnumeration* getMetaProperties ();
void exportACME (ACMEOutputStream *s );
// Name of type
void setName (char *name);
char* getName ();
PropertyDescriptionEnumeration* getPropertyDescriptions ();
void addPropertyDescription (char *prop_name, PropertyType *t, PropertyValue *value);
void addPropertyDescription (PropertyDescription *t);
void deletePropertyDescription (char *name);
void addSuperType (ElementType *type);
char* getCategoryName ();
CategoryT getCategory ();
ACMEDesignObject* getScope ();
};
ACME.ConstituentTypes.ConstituentDescription
ConstituentDescription is an abstract base class describes a child constituent. Its subclasses, PortDescription and RoleDescription are used to describe valid ports/roles in ComponentTypes/ConnectorTypes.
class ConstituentDescription : public ACMEDesignObject {
ConstituentDescription (char *n);
Constituent* getBody ();
char* getTypeName ();
char* getName ();
};
ACME.ConstituentTypes.PortDescription
Defines a set of Ports. Used in ComponentType.
class PortDescription : public ConstituentDescription {
PortDescription (char *n, PortType *t, Port *body);
Constituent* getBody ();
char* getTypeName ();
PortType* getType ();
};