VPTissue Reference Manual
PTreeComparison.h
Go to the documentation of this file.
1 #ifndef PTREE_COMPARISON_H_INCLUDED
2 #define PTREE_COMPARISON_H_INCLUDED
3 /*
4  * Copyright 2011-2016 Universiteit Antwerpen
5  *
6  * Licensed under the EUPL, Version 1.1 or as soon they will be approved by
7  * the European Commission - subsequent versions of the EUPL (the "Licence");
8  * You may not use this work except in compliance with the Licence.
9  * You may obtain a copy of the Licence at: http://ec.europa.eu/idabc/eupl5
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the Licence is distributed on an "AS IS" basis,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the Licence for the specific language governing
15  * permissions and limitations under the Licence.
16  */
22 #include "util/misc/Exception.h"
23 
24 #include <boost/property_tree/ptree_fwd.hpp>
25 #include <utility>
26 
27 namespace SimPT_Shell {
28 
29 using boost::property_tree::ptree;
30 
44 {
45 public:
59  static bool CompareRootValues(ptree const& pt1, ptree const& pt2, double acceptable_diff);
60 
77  static bool CompareArray(ptree const& pt1, ptree const& pt2, double acceptable_diff);
78 
91  static bool CompareNonArray(ptree const& pt1, ptree const& pt2, double acceptable_diff);
92 };
93 
94 } // namespace
95 
96 #endif // end-of-include-guard
Namespace for SimPT shell package.
Definition: Client.cpp:50
static bool CompareRootValues(ptree const &pt1, ptree const &pt2, double acceptable_diff)
Test if root values of both ptrees are equal, with the possibility of having some tolerance for small...
static bool CompareArray(ptree const &pt1, ptree const &pt2, double acceptable_diff)
Test if ordered list of children of both ptrees are equal, i.e.
Collection of functions for recursively comparing ptrees, with some 'array' semantics applied...
Header file for Exception class.
static bool CompareNonArray(ptree const &pt1, ptree const &pt2, double acceptable_diff)
Test if every child in first ptree with certain key can also be found in second ptree under the same ...