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

More...

#include <macroresolver_intf.h>

Inherits adtf::services::thor::IMacroResolver.

Inherited by adtf::services::zebra::IMacroResolver.

Public Member Functions

 ADTF_IID (IMacroResolver, "macroresolver.vision.base.adtf.iid")
 defintion of interace id
 
virtual tResult ResolveMacros (const base::IString &strSource, const ucom::ifunction< bool(const base::IString &strMacro, base::IString &&strReplacement)> &fnOverride, base::IString &&strResolvedString)=0
 
virtual tResult ResolveMacros (const char *strSource, base::IString &&strResolvedString)=0
 
- Public Member Functions inherited from adtf::services::thor::IMacroResolver
 ADTF_IID (IMacroResolver, "macroresolver.thor.base.adtf.iid")
 defintion of interace id
 
virtual void ListMacros (bool bIncludeEnvironmentVariables, const ucom::nitro::ifunction< void(const char *, const char *, bool)> &fnCallback) const =0
 
- Public Member Functions inherited from adtf::services::ant::IMacroResolver
 ADTF_IID (IMacroResolver, "macroresolver.ant.base.adtf.iid")
 defintion of interace id
 
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

- Public Types inherited from adtf::services::ant::IMacroResolver
enum  tMacroResolverFlags { MRF_None = 0x00 , MRF_Overwrite = 0x01 }
 
- 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 Function Documentation

◆ ResolveMacros() [1/2]

virtual tResult adtf::services::vision::IMacroResolver::ResolveMacros ( const base::IString & strSource,
const ucom::ifunction< bool(const base::IString &strMacro, base::IString &&strReplacement)> & fnOverride,
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.

Use this overload if specific macros need to be resolved in a non-standard way.

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.
fnOverride[in] Callback for overriding macro resolution for selected macros. Return true to signal that strMacro was accepted and strReplacement has been filled in. The callback must be idempotent, it's unspecified in which order or how often the callback is invoked.
strResolvedString[in] String where to copy the string with resolved macro expressions.
Returns
Standard Result Code

◆ ResolveMacros() [2/2]

virtual tResult adtf::services::ant::IMacroResolver::ResolveMacros ( const char * strSource,
base::IString && strResolvedString )
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

Implements adtf::services::ant::IMacroResolver.


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