ADTF  3.18.2
Versioned namespaces

One of the main basic agreements in ADTF is code and binary compatibility in a major version.

This is not very easy to handle in case we have to change or extend our API for your needs, bugfixes or feature requests.

Handling of versioned namespaces

For each ADTF minor release, there will be a minor version namespace. Each interface created in this minor version will be packed into the corresponding namespace. This means, we do not change interfaces, we extend or replace them by creating a same titled interface in the new namespace and set this as new default.

Remarks
This means each version provides, extend or enables a specific feature set.
Note
Please distinguish between interfaces and SDK classes in our API. Implementations may be extended with additional functionality but we ensure to keep them binary compatible.

Example for versioned namespaces

For example:

namespace adtf
{
namespace group
{
namespace ant
{
class IUsedInterface
{
public:
ADTF_IID(IUsedInterface, "usedinterface.ant.group.adtf");
public:
virtual tResult Set(const tChar* strFileNames) = 0;
virtual const tChar* Get() const = 0;
};
} // namespace ant
namespace bat
{
class IUsedInterface : public ant::IUsedInterface
{
public:
ADTF_IID(IUsedInterface, "usedinterface.bat.group.adtf");
public:
virtual const tChar* DoSomethingElse() const = 0;
};
} // namespace bat
using bat::IUsedInterface;
} // namespace group
} // namespace adtf
#define ADTF_IID(_interface, _striid)
Common macro to enable correct treatment of interface classes by the adtf::ucom::ucom_cast<>
Definition: adtf_iid.h:17
char tChar
The tChar defines the type for platform character set (platform and compiler dependent type).
Namespace for entire ADTF SDK.

This means we have two interfaces:

  • adtf::group::ant::IUsedInterface
  • adtf::group::bat::IUsedInterface

adtf::group::bat::IUsedInterface derives from adtf::group::ant::IUsedInterface and extend the functionality of adtf::ant::IUsedInterface with DoSomethingElse().

Finally we set the current version to adtf::group::bat::IUsedInterface, this means if you are implementing and deriving from adtf::group::IUsedInterface (without explicit versioned namespace), you will automatic use the current one, so in this case from namespace bat.

Note
Always use this way to receive the actual interface for your plugin implementation (e.g. Filter, System Service, Streaming Service). Please have a look at our Programming Examples how to use.

There is only one use case to explicit use an older interface:

  • when you are implementing an own library (API) to use or provide exactly this feature set
  • when you are implementing a tooling which has to differ between each function set of different interface implementations
Note
The binary itself (this means already compiled) does not matter about actual or current namespace. It will use the implementation given and defined at compilation time. It is guaranteed, that each and especially older namespaces and its interfaces are available in higher ADTF versions.

List of versioned namespaces

Here is an overview which versioned namespace belongs to which ADTF version:

list (APPEND ADTF_VERSION_NAMESPACES
"ant" # ADTF 3.0.x
"bat" # ADTF 3.1.x
"catwo" # ADTF 3.2.x
"devil" # ADTF 3.3.x
"elasto" # ADTF 3.4.x
"flash" # ADTF 3.5.x
"giant" # ADTF 3.6.x
"hollow" # ADTF 3.7.x
"iron" # ADTF 3.8.x
"joker" # ADTF 3.9.x
"kiwi" # ADTF 3.10.x
"lucky" # ADTF 3.11.x
"mega" # ADTF 3.12.x
"nitro" # ADTF 3.13.x
"osborn" # ADTF 3.14.x
"penguin" # ADTF 3.15.x
"quiet" # ADTF 3.16.x
"riddler" # ADTF 3.17.x
"spider" # ADTF 3.18.x
)

How to use within your adtfplugins

If you are using these interfaces within your components (Filter, System Service, Streaming Service), which are packed into a adtfplugin for delivery, the ADTF Plugin Description Generator requires some information for dependency handling (Setup dependencies between components).

This means you have to specify which interfaces you are using / must be loaded (REQUIRE_INTERFACE) and which are implemented / delivered within your component (PROVIDE_INTERFACE). These information are exported to the corresponding plugindescription of your adtfplugin, usually for use within ADTF Configuration Editor as you might already know.

As mentioned above you will primary use the actual interface without explicit versioned namespace (adtf::group::IUsedInterface) within your implementation. You will follow this coding rule also
for set up the adtfplugin dependency using REQUIRE_INTERFACE. But if you want to tell the ADTF Plugin Description Generator which kind of interfaces you are implementing, you have to list them explicit and with full version namespace for each by using PROVIDE_INTERFACE - as well as you will derive and override within your code. For example:

ADTF_CLASS_DEPENDENCIES(REQUIRE_INTERFACE(adtf::group::IUsedInterface),
PROVIDE_INTERFACE(adtf::mygroup::ant::ISomeImplementedInterface),
PROVIDE_INTERFACE(adtf::mygroup::bat::ISomeImplementedInterface));
#define REQUIRE_INTERFACE(_interface)
Macro usable with ADTF_CLASS_DEPENDENCIES() to require mandatory interfaces.
#define PROVIDE_INTERFACE(_interface)
Macro usable with ADTF_CLASS_DEPENDENCIES() to provide interfaces by defining class.
#define ADTF_CLASS_DEPENDENCIES(...)
Add interface ids (string literals,.