Parasol Planning Library (PPL)
ValidityCheckerMethod.h
Go to the documentation of this file.
1 #ifndef PMPL_VALIDITY_CHECKER_METHOD_H_
2 #define PMPL_VALIDITY_CHECKER_METHOD_H_
3 
6 #include "Utilities/MPUtils.h"
7 
8 #include <string>
9 
10 
33 
34  public:
35 
38 
41 
45 
46  ValidityCheckerMethod() = default;
47 
49 
50  virtual ~ValidityCheckerMethod() = default;
51 
55 
57  bool GetValidity() const;
58 
60  void ToggleValidity();
61 
65 
71  bool IsValid(Cfg& _cfg, CDInfo& _cdInfo, const std::string& _caller);
74 
77  bool IsValid(Cfg& _cfg, const std::string& _caller);
78 
82 
88  bool IsValid(GroupCfgType& _cfg, CDInfo& _cdInfo, const std::string& _caller);
89 
92  bool IsValid(GroupCfgType& _cfg, const std::string& _caller);
93 
95 
96  protected:
97 
100 
107  virtual bool IsValidImpl(Cfg& _cfg, CDInfo& _cdInfo,
108  const std::string& _caller) = 0;
109 
115  virtual bool IsValidImpl(GroupCfgType& _cfg, CDInfo& _cdInfo,
116  const std::string& _caller);
117 
121 
122  bool m_validity{true};
123 
125 
126 };
127 
128 #endif
Definition: Cfg.h:38
Definition: GroupCfg.h:39
std::vector< size_t > Formation
Definition: GroupCfg.h:58
Definition: MPBaseObject.h:46
Definition: ValidityCheckerMethod.h:32
void ToggleValidity()
Switches the meaning of "valid" to "invalid" and vice versa.
Definition: ValidityCheckerMethod.cpp:16
ValidityCheckerMethod()=default
bool m_validity
Use standard validity? False indicates negation.
Definition: ValidityCheckerMethod.h:122
GroupCfgType::Formation Formation
Definition: ValidityCheckerMethod.h:40
MPBaseObject::GroupCfgType GroupCfgType
Definition: ValidityCheckerMethod.h:39
bool IsValid(Cfg &_cfg, CDInfo &_cdInfo, const std::string &_caller)
Definition: ValidityCheckerMethod.cpp:23
virtual ~ValidityCheckerMethod()=default
ValidityCheckerMethod(XMLNode &_node)
Definition: ValidityCheckerMethod.h:48
virtual bool IsValidImpl(Cfg &_cfg, CDInfo &_cdInfo, const std::string &_caller)=0
bool GetValidity() const
Get the current meaning of "valid" (true is default).
Definition: ValidityCheckerMethod.cpp:9
Definition: XMLNode.h:27
Definition: CDInfo.h:139