ICF 3.1.1.10
Technical documentation of ICF Libraries
Packaging the concepts

To create the package you have to use set of mechanisms and macros in the separated project generating .arp file (physically it is a shared library, depending on the operating system).

Collaboration diagram for Packaging the concepts:

To create the package you have to use set of mechanisms and macros in the separated project generating .arp file (physically it is a shared library, depending on the operating system).

First step is to create a CMake project definition. Example of CMakeList.txt taken from package IcfAuthorizationPck:

project(IcfAuthorizationPck LANGUAGES CXX)
include(${ICF_CONFIG_DIR}/CMake/TargetComponent.cmake)
icf_use_lib_boundle(${PROJECT_NAME} IcfAll iauth icomp)
Contains implementations of interfaces and components related to right management.
Package with interfaces and class used for components concept.

The project name should be the same as a folder name and C++ namespace.

In the project C++ header you should use typedef to assign the class implementations to component names, as in file IcfAuthorizationPck.h:

#pragma once
// ICF includes
(...)
namespace IcfAuthorizationPck
{
(...)
typedef iauth::CUserLoginComp UserLogin;
(...)
} // namespace IcfAuthorizationPck
Implementation of user login allowing to get rights for current logged user.

In the project C++ implementation you should use macros to provide component meta information, as in file IcfAuthorizationPck.cpp:

#include "IcfAuthorizationPck.h"
#include <icomp/export.h>
namespace IcfAuthorizationPck
{
(...)
I_EXPORT_PACKAGE(
"Icf/IcfAuthorizationPck",
"Package for security and authorization components",
IM_PROJECT("ICF") IM_COMPANY("ICF") IM_TAG("Authorization") IM_AUTHOR("\"Witold Gantzke\" \"Kirill Lepskiy\""));
I_EXPORT_COMPONENT(
UserLogin,
"User login and authotization mechanism using user manager",
"Authentication User Rights User Manager" IM_TAG("\"User Management\""));
(...)
} // namespace IcfAuthorizationPck

After compiling it, you will get the file IcfAuthorizationPck.arp, this will be used by Compositor to show component functions.

© Witold Gantzke and Kirill Lepskiy