Public Member Functions | List of all members
ARCSAbstractFamily Class Referenceabstract

Abstract class representing a family of components i.e. a factory of factories of components. More...

#include <arcsabstractfamily.h>

Inheritance diagram for ARCSAbstractFamily:
Inheritance graph
Collaboration diagram for ARCSAbstractFamily:
Collaboration graph

Public Member Functions

virtual QStringList factoryList ()=0
 Returns a list of available factories.
 
virtual bool addFactory (QString type, ARCSAbstractComponent *cmp)=0
 Adds a component factory to the family.
 
virtual void removeFactory (QString type)=0
 Removes a component factory to the family.
 
virtual ARCSAbstractComponentinstanciate (QString type)=0
 Returns a component.
 
virtual void destroy (ARCSAbstractComponent *component)=0
 Destroys a component.
 
virtual QString name () const =0
 name of the family
 
virtual bool isInternal () const
 Describes wether the family is internal to ARCS or not.
 

Detailed Description

Abstract class representing a family of components i.e. a factory of factories of components.

This class must be used when introducing a new family of components inside ARCS. To implement a new family following this guideline, you should have a header like this :

#ifndef __MYFAMILY_H__
#define __MYFAMILY_H__
#include <arcs/arcsabstractfamily.h>
class MyFamily : public ARCSAbstractFamily
{
public:
MyFamily();
virtual ~MyFamily();
virtual QStringList factoryList();
virtual bool addFactory(QString type, ARCSAbstractComponent* cmp);
virtual bool removeFactory(QString type);
virtual ARCSAbstractComponent* instanciante(QString type);
virtual void destroy(ARCSAbstractComponent* component);
virtual QString name() const;
};
#endif //__MYFAMILY__
Author
Jean-Yves Didier
Date
November, 2008

Definition at line 68 of file arcsabstractfamily.h.


The documentation for this class was generated from the following files: