libzypp  17.37.5
LoadTestcase.h
Go to the documentation of this file.
1 /*---------------------------------------------------------------------\
2 | ____ _ __ __ ___ |
3 | |__ / \ / / . \ . \ |
4 | / / \ V /| _/ _/ |
5 | / /__ | | | | | | |
6 | /_____||_| |_| |_| |
7 | |
8 \---------------------------------------------------------------------*/
12 #ifndef ZYPP_MISC_LOADTESTCASE_H
13 #define ZYPP_MISC_LOADTESTCASE_H
14 
15 #include <zypp/Pathname.h>
16 #include <zypp/Url.h>
17 #include <zypp/Globals.h>
18 #include <zypp/base/PtrTypes.h>
19 #include <zypp/base/NonCopyable.h>
21 
22 #include <optional>
23 #include <memory>
24 
25 namespace zypp::misc::testcase {
26 
28  {
29  struct Node {
30  struct Impl;
31 
32  Node();
33  ~Node();
34  const std::string &name () const;
35  std::string &name ();
36  const std::string &value () const;
37  std::string &value ();
38 
39  const std::string &getProp( const std::string &name, const std::string &def = std::string() ) const;
40  const std::map<std::string, std::string> &properties() const;
41  std::map<std::string, std::string> &properties();
42  const std::vector<std::shared_ptr<Node>> &children() const;
43  std::vector<std::shared_ptr<Node>> &children();
44 
45  private:
47 
48  };
49 
50  TestcaseTrial();
51  ~TestcaseTrial();
52  const std::vector<Node> &nodes () const;
53  std::vector<Node> &nodes ();
54  private:
55  struct Impl;
57  };
58 
60  {
61  public:
62  struct Impl;
63  using TestcaseTrials = std::vector<TestcaseTrial>;
64 
65  enum Type {
68  Yaml
69  };
70 
71  LoadTestcase();
72  ~LoadTestcase();
73 
74  bool loadTestcaseAt ( const zypp::Pathname &path, std::string *err );
75  static Type testcaseTypeAt ( const zypp::Pathname &path );
76 
77  const TestcaseSetup &setupInfo() const;
78  const TestcaseTrials &trialInfo() const;
79 
80  private:
81  std::unique_ptr<Impl> _pimpl;
82  };
83 
84 }
85 
86 
87 #endif // ZYPP_MISC_LOADTESTCASE_H
const Arch Arch_armv7hnl Arch_armv7nhl ZYPP_API
Definition: ResTraits.h:93
#define ZYPP_API_DEPTESTOMATIC
Definition: Globals.h:77
RWCOW_pointer< Impl > _pimpl
Definition: LoadTestcase.h:55
std::unique_ptr< Impl > _pimpl
Definition: LoadTestcase.h:81
std::vector< TestcaseTrial > TestcaseTrials
Definition: LoadTestcase.h:63
boost::noncopyable NonCopyable
Ensure derived classes cannot be copied.
Definition: NonCopyable.h:26