1 /*---------------------------------------------------------------------\
3 | |__ / \ / / . \ . \ |
8 \---------------------------------------------------------------------*/
9 /** \file zypp/solver/detail/Testcase.h
13 #ifndef ZYPP_SOLVER_DETAIL_TESTCASE_H
14 #define ZYPP_SOLVER_DETAIL_TESTCASE_H
18 #include "zypp/base/ReferenceCounted.h"
19 #include "zypp/base/NonCopyable.h"
20 #include "zypp/base/PtrTypes.h"
21 #include "zypp/solver/detail/Resolver.h"
24 /////////////////////////////////////////////////////////////////////////
26 { ///////////////////////////////////////////////////////////////////////
27 ///////////////////////////////////////////////////////////////////////
29 { /////////////////////////////////////////////////////////////////////
30 /////////////////////////////////////////////////////////////////////
32 { ///////////////////////////////////////////////////////////////////
36 std::string helixXML( const T &obj ); //undefined
39 std::string helixXML( const Edition &edition );
42 std::string helixXML( const Arch &arch );
45 std::string helixXML( const Capability &cap );
48 std::string helixXML( const CapSet &caps );
51 std::string helixXML( const Dependencies &dep );
54 std::string helixXML( const Resolvable::constPtr &resolvable );
57 ///////////////////////////////////////////////////////////////////
59 // CLASS NAME : HelixResolvable
61 * Creates a file in helix format which includes all available
62 * or installed packages,patches,selections.....
64 class HelixResolvable : public base::ReferenceCounted, private base::NonCopyable{
67 std::string dumpFile; // Path of the generated testcase
71 HelixResolvable (const std::string & path);
74 void addResolvable (const Resolvable::constPtr &resolvable);
75 std::string filename () { return dumpFile; }
78 DEFINE_PTR_TYPE(HelixResolvable);
79 typedef std::map<Source_Ref, HelixResolvable_Ptr> SourceTable;
81 ///////////////////////////////////////////////////////////////////
83 // CLASS NAME : HelixControl
85 * Creates a file in helix format which contains all controll
86 * action of a testcase ( file is known as *-test.xml)
91 std::string dumpFile; // Path of the generated testcase
95 HelixControl (const std::string & controlPath,
96 const SourceTable & sourceTable,
97 const std::string & systemPath = "solver-system.xml");
101 void installResolvable (const ResObject::constPtr &resObject);
102 void deleteResolvable (const ResObject::constPtr &resObject);
103 std::string filename () { return dumpFile; }
109 ///////////////////////////////////////////////////////////////////
111 // CLASS NAME : Testcase
113 * Generating a testcase of the current pool and solver state
118 std::string dumpPath; // Path of the generated testcase
121 Testcase (const std::string & path);
125 bool createTestcase (Resolver & resolver);
130 ///////////////////////////////////////////////////////////////////
131 };// namespace detail
132 /////////////////////////////////////////////////////////////////////
133 /////////////////////////////////////////////////////////////////////
134 };// namespace solver
135 ///////////////////////////////////////////////////////////////////////
136 ///////////////////////////////////////////////////////////////////////
138 /////////////////////////////////////////////////////////////////////////
140 #endif // ZYPP_SOLVER_DETAIL_TESTCASE_H