2 * Copyright (c) 2018-2019 Samsung Electronics Co., Ltd All Rights Reserved
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
20 * \ingroup Implementation
31 namespace ldp_xml_parser
36 explicit TreeNode(const std::string &token);
37 void add(std::deque<std::string>& tokens, const DecisionItem& decision, const bool is_prefix);
38 void setDecisionItem(const DecisionItem& decision, const bool is_prefix);
39 const std::string &getToken() const;
40 const DecisionItem &getOwnPrefixDecisionItem() const;
41 const DecisionItem &getOwnDecisionItem() const;
42 const std::map<std::string, std::shared_ptr<TreeNode>> &getChildren() const;
44 DecisionItem prefixBasedDecision() const;
46 std::string __token; // element of dot-separated name
47 DecisionItem __own_prefix_decision_item;
48 DecisionItem __own_decision_item;
49 std::map<std::string, std::shared_ptr<TreeNode>> __children;
50 friend class OwnershipTree;
57 void addItem(const ItemOwn &item);
58 const std::shared_ptr<TreeNode> getRoot() const { return __root; };
60 std::shared_ptr<TreeNode> __root;