Testcase.h

Go to the documentation of this file.
00001 /*---------------------------------------------------------------------\
00002 |                          ____ _   __ __ ___                          |
00003 |                         |__  / \ / / . \ . \                         |
00004 |                           / / \ V /|  _/  _/                         |
00005 |                          / /__ | | | | | |                           |
00006 |                         /_____||_| |_| |_|                           |
00007 |                                                                      |
00008 \---------------------------------------------------------------------*/
00013 #ifndef ZYPP_SOLVER_DETAIL_TESTCASE_H
00014 #define ZYPP_SOLVER_DETAIL_TESTCASE_H
00015 
00016 #include <iosfwd>
00017 #include <string>
00018 #include "zypp/base/ReferenceCounted.h"
00019 #include "zypp/base/NonCopyable.h"
00020 #include "zypp/base/PtrTypes.h"
00021 #include "zypp/solver/detail/Resolver.h"
00022 
00023 
00025 namespace zypp
00026 { 
00027 
00028   namespace solver
00029   { 
00030 
00031     namespace detail
00032     { 
00033 
00034 
00035 template<class T>
00036 std::string helixXML( const T &obj ); //undefined
00037 
00038 template<> 
00039 std::string helixXML( const Edition &edition );
00040 
00041 template<> 
00042 std::string helixXML( const Arch &arch );
00043 
00044 template<> 
00045 std::string helixXML( const Capability &cap );
00046 
00047 template<> 
00048 std::string helixXML( const CapSet &caps );
00049 
00050 template<> 
00051 std::string helixXML( const Dependencies &dep );
00052         
00053 template<> 
00054 std::string helixXML( const Resolvable::constPtr &resolvable );
00055 
00056 
00058 //
00059 //      CLASS NAME : HelixResolvable
00064 class  HelixResolvable : public base::ReferenceCounted, private base::NonCopyable{
00065 
00066   private:
00067     std::string dumpFile; // Path of the generated testcase
00068     std::ofstream *file;    
00069 
00070   public:
00071     HelixResolvable (const std::string & path);
00072     ~HelixResolvable ();
00073 
00074     void addResolvable (const Resolvable::constPtr &resolvable);
00075     std::string filename () { return dumpFile; }
00076 };
00077 
00078 DEFINE_PTR_TYPE(HelixResolvable);
00079 typedef std::map<Source_Ref, HelixResolvable_Ptr> SourceTable;
00080 
00082 //
00083 //      CLASS NAME : HelixControl
00088 class  HelixControl {
00089 
00090   private:
00091     std::string dumpFile; // Path of the generated testcase
00092     std::ofstream *file;
00093 
00094   public:
00095     HelixControl (const std::string & controlPath,
00096                   const SourceTable & sourceTable,
00097                   const Arch & systemArchitecture,
00098                   const std::string & systemPath = "solver-system.xml");
00099     HelixControl ();    
00100     ~HelixControl ();
00101 
00102     void installResolvable (const ResObject::constPtr &resObject);
00103     void deleteResolvable (const ResObject::constPtr &resObject);
00104     std::string filename () { return dumpFile; }
00105 };
00106         
00107 
00108 
00109         
00111 //
00112 //      CLASS NAME : Testcase
00116 class Testcase {
00117 
00118   private:
00119     std::string dumpPath; // Path of the generated testcase
00120 
00121   public:
00122     Testcase (const std::string & path);
00123     Testcase ();    
00124     ~Testcase ();
00125 
00126     bool createTestcase (Resolver & resolver);
00127 
00128 };
00129 
00130 
00132     };// namespace detail
00135   };// namespace solver
00138 };// namespace zypp
00140 
00141 #endif // ZYPP_SOLVER_DETAIL_TESTCASE_H

Generated on Tue Nov 28 16:49:32 2006 for zypp by  doxygen 1.5.0