38 enum JigsawType { kVanillaJigsaw, kInvisibleJigsaw,
39 kCombinatoricJigsaw };
46 Jigsaw(
const std::string& sname,
47 const std::string& stitle,
48 int Nchild,
int Ndependancy);
56 JigsawType GetType()
const {
return m_Type; }
58 virtual std::string GetLabel()
const {
return "Jigsaw"; }
61 virtual std::string
PrintString(LogType type)
const;
63 bool IsInvisibleJigsaw()
const;
64 bool IsCombinatoricJigsaw()
const;
66 virtual void SetGroup(
Group& group = Group::Empty());
67 virtual Group& GetGroup()
const;
80 virtual bool IsSoundBody()
const;
82 virtual bool AnalyzeEvent() = 0;
84 bool CanResolve(
const State& state)
const;
86 bool DependsOnJigsaw(
const Jigsaw& jigsaw)
const;
88 virtual bool InitializeTree();
89 virtual bool InitializeAnalysis();
91 virtual bool InitializeDependancyJigsaws();
92 virtual bool InitializeJigsawExecutionList(
JigsawList& exec_jigsaws) = 0;
94 void AddChildFrame(
const RestFrame& frame,
int i = 0);
95 void AddDependancyFrame(
const RestFrame& frame,
int i = 0);
97 virtual int GetNChildren()
const;
98 virtual State& GetChildState(
int i)
const;
99 virtual StateList const& GetChildStates()
const;
101 int GetNDependancyStates()
const;
102 virtual StateList const& GetDependancyStates(
int i)
const;
104 void SetParentState();
105 virtual void SetParentState(
State& state);
106 virtual State const& GetParentState()
const;
108 virtual State& GetNewChildState() = 0;
110 virtual void FillGroupJigsawDependancies(
JigsawList& jigsaws)
const;
111 virtual void FillStateJigsawDependancies(
JigsawList& jigsaws)
const;
115 State* m_ParentStatePtr;
121 StateListList m_DependancyStates;
123 std::vector<ConstRestFrameList> m_ChildFrames;
124 std::vector<ConstRestFrameList> m_DependancyFrames;
128 static int m_class_key;
abstract base class for all Jigsaw objects
Base class for all RestFrame package objects.
abstract base class for all Group objects
virtual std::string PrintString(LogType type) const
String of information associated with Jigsaw.
abstract base class for all Frame objects
abstract base class for all State objects
virtual void Clear()
Clears Jigsaw of all connections to other objects.