ADTF
Loading...
Searching...
No Matches
adtf::services::ant::IMacroResolver Class Referenceabstract

#include <macroresolver_intf.h>

Inherits adtf::ucom::ant::IObject.

Inherited by adtf::services::thor::IMacroResolver.

Public Types

enum  tMacroResolverFlags { MRF_None = 0x00 , MRF_Overwrite = 0x01 }
 

Public Member Functions

 ADTF_IID (IMacroResolver, "macroresolver.ant.base.adtf.iid")
 defintion of interace id
 
virtual tResult ResolveMacros (const char *strSource, base::IString &&strResolvedString)=0
 
virtual tResult RegisterMacro (const char *strMacro, const char *strReplacement, uint32_t ui32Flags=0)=0
 
virtual tResult UnregisterMacro (const char *strMacro)=0
 
virtual void Clear ()=0
 
- Public Member Functions inherited from adtf::ucom::ant::IObject
 ADTF_IID (IObject, "object.ant.ucom.adtf.iid")
 

Additional Inherited Members

- Protected Member Functions inherited from adtf::ucom::ant::IObject
 ~IObject ()=default
 Protected destructor --> Only the final implementation can be destroyed!
 

Detailed Description

The IMacroResolver interface provides methods for resolving macros in strings.

Macros must have following layout:

  • $MACRO$
See also
adtf_resolve_macros, adtf_register_macro.

Member Enumeration Documentation

◆ tMacroResolverFlags

Enumerations used for the Macro Resolver (see RegisterMacro function).

Enumerator
MRF_None 

no flag

MRF_Overwrite 

overwrites an existing macro

Member Function Documentation

◆ Clear()

virtual void adtf::services::ant::IMacroResolver::Clear ( )
pure virtual

Clears all registered macros

◆ RegisterMacro()

virtual tResult adtf::services::ant::IMacroResolver::RegisterMacro ( const char * strMacro,
const char * strReplacement,
uint32_t ui32Flags = 0 )
pure virtual

Register a new macro

Parameters
[in]strMacronew macro expression
[in]strReplacementcomplete expression
[in]ui32FlagsFlags to adjust the behavior (see tMacroResolverFlags)
Return values
OKmacro is now registered

◆ ResolveMacros()

virtual tResult adtf::services::ant::IMacroResolver::ResolveMacros ( const char * strSource,
base::IString && strResolvedString )
pure virtual

Resolve macros. The method resolves the internal macros to real values. If the resolved Macro string is an existing filesystem path, it will be parsed for regular expressions

Note
the regular expresseion will only be parsed, if the path exists and is absolute
a path string may only contain a regex for a filename
Parameters
strSource[in] String using macro expressions.
strResolvedString[in] String where to copy the string with resolved macro expressions.
Returns
Standard Result Code

Implemented in adtf::services::vision::IMacroResolver.

◆ UnregisterMacro()

virtual tResult adtf::services::ant::IMacroResolver::UnregisterMacro ( const char * strMacro)
pure virtual

Unregisters an existing macro

Parameters
[in]strMacromacro to be unregistered
Return values
OKmacro is now unregistered

The documentation for this class was generated from the following file: