2.7. The component factory class CASIFactory

The factory class in the ESL API provides a standardized mechanism for dynamic component creation and enables instantiating and creating a component without the need for access to its constructor.

Example 2.26. CASIFactory class

class CASIFactory
{
public:
    CASIFactory(const std::string& name);
    virtual ~CASIFactory() {};
    virtual CASIModuleIF *createInstance(CASIModuleIF *parent, 
            const std::string& instance_name) = 0;
};

Note

Typically the component factory not does require any changes. The factory class is not required if you are using the models in a pure SystemC environment.

Only two functions must be implemented in the CASIFactory class:

Copyright © 2007 ARM Limited. All rights reserved.ARM DUI 0359B
Non-Confidential