The IMacroResolver interface provides methods for resolving macros in strings.
More...
|
| ~IObject ()=default |
| Protected destructor --> Use implemented Destroy() instead of delete!
|
|
The IMacroResolver interface provides methods for resolving macros in strings.
Macros must have following layout:
- See also
- adtf_resolve_macros, adtf_register_macro.
-
Macros.
Definition at line 74 of file macroresolver_intf.h.
◆ tMacroResolverFlags
Enumerations used for the Macro Resolver (see RegisterMacro function).
Enumerator |
---|
MRF_None | no flag
|
MRF_Overwrite | overwrites an existing macro
|
Definition at line 85 of file macroresolver_intf.h.
◆ Clear()
Clears all registered macros.
- Returns
- void
◆ RegisterMacro()
virtual tResult RegisterMacro |
( |
const char * |
strMacro, |
|
|
const char * |
strMacroSol, |
|
|
uint32_t |
ui32Flags = 0 |
|
) |
| |
|
pure virtual |
Register a new macro.
- Parameters
-
[in] | strMacro | new macro expression |
[in] | strMacroSol | complete expression |
[in] | ui32Flags | Flags to adjust the behavior (see tMacroResolverFlags) |
- Return values
-
OK | macro is now registered |
◆ ResolveMacros()
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
◆ UnregisterMacro()
virtual tResult UnregisterMacro |
( |
const char * |
strMacro | ) |
|
|
pure virtual |
Unregisters an existing macro.
- Parameters
-
[in] | strMacro | macro to be unregistered |
- Return values
-
OK | macro is now unregistered |