CLAM-Development  1.4.0
Public Member Functions | Protected Member Functions | Protected Attributes
CLAM::SMSTransformationChaineeConfig Class Reference

Special Processing config that can be used inside a SMSTransformationChainConfig. More...

#include <SMSTransformationChainConfig.hxx>

List of all members.

Public Member Functions

 DYNAMIC_TYPE_USING_INTERFACE (SMSTransformationChaineeConfig, 1, ProcessingConfig)
 DYN_ATTRIBUTE (0, public, std::string, ConcreteClassName)
 Name of concrete Config class.
void DefaultInit ()
 Initialization for default constructor.
void CopyInit (const SMSTransformationChaineeConfig &originalConfig)
 Initialization for copy constructor.
void StoreOn (Storage &s) const
 Overriding virtual method in base class to store concrete configuration by hand as it is not a dynamic attribute.
void LoadFrom (Storage &s)
 Overriding virtual method in base class to load concrete configuration by hand as it is not a dynamic attribute.
ProcessingConfigGetConcreteConfig () const
 Returns the concrete configuration as a reference to the base class.
void SetConcreteConfig (const ProcessingConfig &cfg)
 Sets the concrete configuration, passing a reference to the base class.
virtual ~SMSTransformationChaineeConfig ()
 Virtual destructor.
void AddConcreteConfig ()
 Adds a new instantiated concrete configuration using the Concrete Class name as a type selector (ConcreteClassName must be set in advanced) deleting any previously existing concrete configuration.
- Public Member Functions inherited from CLAM::ProcessingConfig
 ProcessingConfig (const int n)
 Constructor.
 ProcessingConfig (const ProcessingConfig &prototype, bool shareData=false, bool deep=true)
 Copy constructor.
virtual ~ProcessingConfig ()
virtual const char * GetClassName () const
 Return the class name.
- Public Member Functions inherited from CLAM::DynamicType
 DynamicType (const int nAttr)
 Constructs a DynamicType object that can hold.
 DynamicType (const DynamicType &prototype, const bool shareData, const bool deepCopy)
 Copy constructor of a dynamic Type.
 DynamicType (const DynamicType &prototype)
virtual ~DynamicType ()
void CopyInit (const DynamicType &dt)
 This method allows custom code for the copy-constructor of a dynamic type, since the copy-constructor is macro expanded and can not be overwritted.
bool UpdateData ()
 Method used to resize the data space of the dynamic type, necessary when some AddXXX() / RemoveXXX() (where XXX is an attribute name) has been done.
unsigned GetNDynamicAttributes () const
const char * GetDynamicAttributeName (unsigned i)
virtual const std::type_info & GetTypeId (unsigned i) const =0
bool AttributeIsComponent (unsigned i) const
bool AttributeIsDynamictype (unsigned i) const
bool IsAttributeInstantiated (unsigned i) const
const void * GetAttributeAsVoidPtr (unsigned i) const
const ComponentGetAttributeAsComponent (unsigned i) const
ComponentGetAttributeAsComponent (unsigned i)
void FullfilsInvariant () const
virtual ComponentDeepCopy () const
void Debug () const
- Public Member Functions inherited from CLAM::Component
virtual ~Component ()

Protected Member Functions

ProcessingConfigInstantiateConcreteConfig (const std::string &type)
 Instantiates a concrete configuration using input string as a type selector.
ProcessingConfigInstantiateConcreteConfig ()
 Instantiates a concrete configuration using the ConcreteClassName attribute as a type selector (ConcreteClassName must be set in advanced)

Protected Attributes

ProcessingConfigmpConcreteConfig
 Actual pointer to the concrete configuration.

Detailed Description

Special Processing config that can be used inside a SMSTransformationChainConfig.

It is a polymorphic configuration that delegates this polymorphism to one of its members (

See also:
mpConcreteConfig) and has access to the concrete class through its name stored in a dynamic attribute (ConcreteClassName)

Definition at line 43 of file SMSTransformationChainConfig.hxx.


Constructor & Destructor Documentation

CLAM::SMSTransformationChaineeConfig::~SMSTransformationChaineeConfig ( )
virtual

Virtual destructor.

Deletes pointer to concrete configuration

Definition at line 34 of file SMSTransformationChainConfig.cxx.

References mpConcreteConfig.


Member Function Documentation

void CLAM::SMSTransformationChaineeConfig::AddConcreteConfig ( )
inline

Adds a new instantiated concrete configuration using the Concrete Class name as a type selector (ConcreteClassName must be set in advanced) deleting any previously existing concrete configuration.

Definition at line 85 of file SMSTransformationChainConfig.hxx.

References InstantiateConcreteConfig(), and mpConcreteConfig.

Referenced by SetConcreteConfig().

void CLAM::SMSTransformationChaineeConfig::CopyInit ( const SMSTransformationChaineeConfig originalConfig)

Initialization for copy constructor.

All dynamic attributes are added and copied from original configuration. Concrete Configuration is set 'by hand'.

Definition at line 49 of file SMSTransformationChainConfig.cxx.

References mpConcreteConfig, NULL, SetConcreteConfig(), and CLAM::DynamicType::UpdateData().

void CLAM::SMSTransformationChaineeConfig::DefaultInit ( void  )

Initialization for default constructor.

All attributes are added, ConcreteClassName is set to "Unknown" and pointer to concrete configuration is set to null.

Reimplemented from CLAM::DynamicType.

Definition at line 41 of file SMSTransformationChainConfig.cxx.

References mpConcreteConfig, NULL, and CLAM::DynamicType::UpdateData().

CLAM::SMSTransformationChaineeConfig::DYN_ATTRIBUTE ( ,
public  ,
std::string  ,
ConcreteClassName   
)

Name of concrete Config class.

CLAM::SMSTransformationChaineeConfig::DYNAMIC_TYPE_USING_INTERFACE ( SMSTransformationChaineeConfig  ,
,
ProcessingConfig   
)
ProcessingConfig& CLAM::SMSTransformationChaineeConfig::GetConcreteConfig ( ) const
inline

Returns the concrete configuration as a reference to the base class.

Definition at line 67 of file SMSTransformationChainConfig.hxx.

References mpConcreteConfig.

ProcessingConfig * CLAM::SMSTransformationChaineeConfig::InstantiateConcreteConfig ( const std::string &  type)
protected

Instantiates a concrete configuration using input string as a type selector.

Definition at line 70 of file SMSTransformationChainConfig.cxx.

References CLAM_ASSERT.

ProcessingConfig* CLAM::SMSTransformationChaineeConfig::InstantiateConcreteConfig ( )
inlineprotected

Instantiates a concrete configuration using the ConcreteClassName attribute as a type selector (ConcreteClassName must be set in advanced)

Definition at line 100 of file SMSTransformationChainConfig.hxx.

Referenced by AddConcreteConfig(), and LoadFrom().

void CLAM::SMSTransformationChaineeConfig::LoadFrom ( Storage s)
virtual

Overriding virtual method in base class to load concrete configuration by hand as it is not a dynamic attribute.

Reimplemented from CLAM::DynamicType.

Definition at line 63 of file SMSTransformationChainConfig.cxx.

References InstantiateConcreteConfig(), and mpConcreteConfig.

void CLAM::SMSTransformationChaineeConfig::SetConcreteConfig ( const ProcessingConfig cfg)
inline

Sets the concrete configuration, passing a reference to the base class.

Note though, that the actual object referenced must be a concrete configuration of the same class indicated by the ConcreteClassName attribute.

Definition at line 72 of file SMSTransformationChainConfig.hxx.

References AddConcreteConfig(), and mpConcreteConfig.

Referenced by CLAM::SMSTransformationChainConfig::AddConfiguration(), and CopyInit().

void CLAM::SMSTransformationChaineeConfig::StoreOn ( Storage s) const
virtual

Overriding virtual method in base class to store concrete configuration by hand as it is not a dynamic attribute.

Reimplemented from CLAM::DynamicType.

Definition at line 57 of file SMSTransformationChainConfig.cxx.

References mpConcreteConfig, and CLAM::DynamicType::StoreOn().


Member Data Documentation

ProcessingConfig* CLAM::SMSTransformationChaineeConfig::mpConcreteConfig
protected

Actual pointer to the concrete configuration.

It is a pointer to base class but the object is always an instance of a concrete one.

Definition at line 108 of file SMSTransformationChainConfig.hxx.

Referenced by AddConcreteConfig(), CopyInit(), DefaultInit(), GetConcreteConfig(), LoadFrom(), SetConcreteConfig(), StoreOn(), and ~SMSTransformationChaineeConfig().


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