ADTF  3.15.1
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.

This means each version provides, extend or enables a specific feature set.
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
ADTF_IID(IUsedInterface, "");
virtual tResult Set(const tChar* strFileNames) = 0;
virtual const tChar* Get() const = 0;
} // namespace ant
namespace bat
class IUsedInterface : public ant::IUsedInterface
ADTF_IID(IUsedInterface, "");
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
A common result class usable as return value throughout.
Namespace for entire ADTF SDK.
char tChar
The tChar defines the type for platform character set (platform and compiler dependent type).

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.

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
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:

"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

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:

#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.
Add interface ids (string literals,.