jle_cpp_tk  0.0 2015-04-03 sh1:"d699093732dd5f321606d0ff7a6b63b229f1922c"
A small, safe, selft contained, soft-realtime C++ toolkit
ast.h
1 #ifndef JLE_AST__H
2 #define JLE_AST__H
3 
4 
5 #include <string>
6 #include "core/shared_ptr.hpp"
7 #include "core/cont/list.hpp"
8 #include "core/cont/map.hpp"
9 
10 
11 
12 
13 namespace jle { namespace hp {
14 
15 
16 
18 {
19 public:
20  std::string name ;
21  std::string value ;
22  std::string rule4replace;
23 
26 
27 
28 
29  AST_node_item(const std::string& _name, const std::string& _value="", const std::string& _rule4replace={})
30  : name(_name), value(_value), rule4replace(_rule4replace) {}
31 
32 
33  jle::shared_ptr<AST_node_item> add_next (const std::string& _name, const std::string& _value, const std::string& _rule4replace);
34  jle::shared_ptr<AST_node_item> add_child(const std::string& _name, const std::string& _value, const std::string& _rule4replace);
35 
36 
37  void exec_replace (const jle::map<std::string /*name*/, std::string>& templates,
39  jle::map<std::string, jle::shared_ptr<std::string>> mutable_vars);
40  void remove_nodes_manteining (const jle::list<std::string>& lmodes2mantein);
41 
42 };
43 
44 
45 std::string AST_get_string_nodes(const jle::shared_ptr<AST_node_item>& node);
46 
47 
48 
49 }; }; // namespace jle { namespace hp {
50 
51 
52 
53 #endif // JLE_AST__H
jle::shared_ptr< AST_node_item > add_next(const std::string &_name, const std::string &_value, const std::string &_rule4replace)
Definition: ast.cpp:17
Definition: map.hpp:20
A safe std smart pointer WRAPPER.
Definition: shared_ptr.hpp:39
Definition: ast.h:17
generic namespace
Definition: alarm.cpp:12
jle::shared_ptr< AST_node_item > add_child(const std::string &_name, const std::string &_value, const std::string &_rule4replace)
Definition: ast.cpp:26