ADTF  3.18.2
macroresolver_impl.h
Go to the documentation of this file.
1 
7 #pragma once
8 #include "string_intf.h"
9 #include "macroresolver_intf.h"
10 #include <adtf_utils.h>
11 #include <adtfucom3/adtf_ucom3.h>
12 
13 #include <string>
14 #include <tuple>
15 
16 namespace adtf
17 {
18 namespace base
19 {
20 namespace ant
21 {
22 
23 class cADTFMacroResolver : public ucom::catwo::object<util::cMacroResolver,
24  services::ant::IMacroResolver>
25 {
26  private:
27  std::mutex m_oSynchronizer;
28 
29  public:
30  tResult ResolveMacros(const char* strSource,
31  IString&& strResolvedString) override;
32  tResult RegisterMacro(const char* strMacro,
33  const char* strMacroSol,
34  uint32_t ui32Flags = 0) override;
35  tResult UnregisterMacro(const char* strMacro) override;
36 
37  void Clear() override;
38 };
39 
40 } //ant
41 
42 namespace joker
43 {
44 
45 std::string replace_macros(const std::string& strInput,
46  std::function<std::tuple<std::string, bool>(const std::string&)> fnMacros);
47 
48 }
49 
50 using ant::cADTFMacroResolver;
51 using joker::replace_macros;
52 
53 } //base
54 } //adtf
Copyright © Audi Electronics Venture GmbH.
Copyright © Audi Electronics Venture GmbH.
The IString interface provides methods for getting and setting strings through abstract interfaces.
Definition: string_intf.h:28
Use this template if you want to implement an ucom::ant::IObject based Interface and/or subclass an e...
Definition: object.h:379
Copyright © Audi Electronics Venture GmbH.
Namespace for entire ADTF SDK.
Copyright © Audi Electronics Venture GmbH.