ICF 3.1.1.10
Technical documentation of ICF Libraries
Component concept macros

This is a list of macros for defining component in component class.

Collaboration diagram for Component concept macros:

This is a list of macros for defining component in component class.

You shoud use the macro block encloses in I_BEGIN_COMPONENT and I_END_COMPONENT in public area of the class. Before this macro is used you will need definition of the base component class as BaseClass.

Example taken from component iauth::CUserLoginComp (ICF component name - IcfAuthorizationPck/UserLogin):

class CUserLoginComp:
(...)
{
public:
typedef icomp::CComponentBase BaseClass;
I_BEGIN_COMPONENT(CUserLoginComp);
I_REGISTER_INTERFACE(IRightsProvider);
I_REGISTER_INTERFACE(ILogin);
I_ASSIGN_MULTI_0(m_userLevelsCompPtr, "UserLevels", "User levels", true);
I_ASSIGN(m_usersManagerCompPtr, "UsersManager", "Users manager", true, "UsersManager");
I_ASSIGN(m_passwordChangerCompPtr, "PasswordChanger", "Passwort manager", false, "PasswordChanger");
I_ASSIGN(m_defaultUserNameAttrPtr, "DefaultUserName", "Name of user will be automatically logged in", false, "Default");
I_END_COMPONENT;
(...)
private:
I_MULTIREF(IRightsProvider, m_userLevelsCompPtr);
I_REF(IUsersManager, m_usersManagerCompPtr);
I_REF(IPasswordChanger, m_passwordChangerCompPtr);
I_ATTR(QByteArray, m_defaultUserNameAttrPtr);
(...)
};
Base class for component implementation.

In this example the component IcfAuthorizationPck/UserLogin implements interfaces iauth::IRightsProvider and iauth::ILogin. It needs a list of components implementing iauth::IRightsProvider. This list will be visible as "UserLevels" in Compositor. This list will be accessible in the implementation code using the variable m_userLevelsCompPtr (

See also
icomp::TMultiReferenceMember). It needs a component implementing iauth::IUsersManager. This will be visible as "UsersManager" in Compositor. This component will be accessible in the implementation code using the variable m_usersManagerCompPtr (
icomp::TReferenceMember). It allows to connect an optional component implementing iauth::IPasswordChanger. This will be visible as "PasswordChanger" in Compositor. It allows to set optional 8-bit coded text, will be visible as "DefaultUserName" in Compositor. This text will be accessible in the implementation code using the variable m_defaultUserNameAttrPtr (
icomp::TAttributeMember).

© Witold Gantzke and Kirill Lepskiy