prepare for patterns
authorKlaus Kaempf <kkaempf@suse.de>
Fri, 13 Jan 2006 18:35:58 +0000 (18:35 +0000)
committerKlaus Kaempf <kkaempf@suse.de>
Fri, 13 Jan 2006 18:35:58 +0000 (18:35 +0000)
zypp/Makefile.am
zypp/Pattern.cc [new file with mode: 0644]
zypp/Pattern.h [new file with mode: 0644]

index a81ed2d..85b0f5c 100644 (file)
@@ -28,6 +28,7 @@ include_HEADERS = NeedAType.h \
        Package.h       \
        Pathname.h      \
        Selection.h     \
+       Pattern.h       \
        Message.h       \
        Script.h        \
        Patch.h         \
@@ -76,6 +77,7 @@ lib@PACKAGE@_la_SOURCES = \
        Package.cc      \
        Pathname.cc     \
        Selection.cc    \
+       Pattern.cc      \
        Message.cc      \
        Script.cc       \
        Patch.cc        \
diff --git a/zypp/Pattern.cc b/zypp/Pattern.cc
new file mode 100644 (file)
index 0000000..a6cc61e
--- /dev/null
@@ -0,0 +1,48 @@
+/*---------------------------------------------------------------------\
+|                          ____ _   __ __ ___                          |
+|                         |__  / \ / / . \ . \                         |
+|                           / / \ V /|  _/  _/                         |
+|                          / /__ | | | | | |                           |
+|                         /_____||_| |_| |_|                           |
+|                                                                      |
+\---------------------------------------------------------------------*/
+/** \file      zypp/Pattern.cc
+ *
+*/
+#include <iostream>
+
+#include "zypp/Pattern.h"
+
+using namespace std;
+
+///////////////////////////////////////////////////////////////////
+namespace zypp
+{ /////////////////////////////////////////////////////////////////
+
+  ///////////////////////////////////////////////////////////////////
+  //
+  //   METHOD NAME : Pattern::Pattern
+  //   METHOD TYPE : Ctor
+  //
+  Pattern::Pattern( const NVRAD & nvrad_r )
+  : ResObject( TraitsType::kind, nvrad_r )
+  {}
+
+  ///////////////////////////////////////////////////////////////////
+  //
+  //   METHOD NAME : Pattern::~Pattern
+  //   METHOD TYPE : Dtor
+  //
+  Pattern::~Pattern()
+  {}
+
+  ///////////////////////////////////////////////////////////////////
+  //
+  //   Pattern interface forwarded to implementation
+  //
+  ///////////////////////////////////////////////////////////////////
+
+
+  /////////////////////////////////////////////////////////////////
+} // namespace zypp
+///////////////////////////////////////////////////////////////////
diff --git a/zypp/Pattern.h b/zypp/Pattern.h
new file mode 100644 (file)
index 0000000..2e2d850
--- /dev/null
@@ -0,0 +1,58 @@
+/*---------------------------------------------------------------------\
+|                          ____ _   __ __ ___                          |
+|                         |__  / \ / / . \ . \                         |
+|                           / / \ V /|  _/  _/                         |
+|                          / /__ | | | | | |                           |
+|                         /_____||_| |_| |_|                           |
+|                                                                      |
+\---------------------------------------------------------------------*/
+/** \file      zypp/Pattern.h
+ *
+*/
+#ifndef ZYPP_PATTERN_H
+#define ZYPP_PATTERN_H
+
+#include "zypp/ResObject.h"
+#include "zypp/detail/PatternImplIf.h"
+
+///////////////////////////////////////////////////////////////////
+namespace zypp
+{ /////////////////////////////////////////////////////////////////
+
+  ///////////////////////////////////////////////////////////////////
+  //
+  //   CLASS NAME : Pattern
+  //
+  /** Pattern interface.
+  */
+  class Pattern : public ResObject
+  {
+  public:
+    typedef detail::PatternImplIf  Impl;
+    typedef Pattern                Self;
+    typedef ResTraits<Self>          TraitsType;
+    typedef TraitsType::PtrType      Ptr;
+    typedef TraitsType::constPtrType constPtr;
+
+  public:
+    /** */
+    // data here:
+
+  protected:
+    /** Ctor */
+    Pattern( const NVRAD & nvrad_r );
+    /** Dtor */
+    virtual ~Pattern();
+
+  private:
+    /** Access implementation */
+    virtual Impl & pimpl() = 0;
+    /** Access implementation */
+    virtual const Impl & pimpl() const = 0;
+  };
+  ///////////////////////////////////////////////////////////////////
+
+  /////////////////////////////////////////////////////////////////
+} // namespace zypp
+///////////////////////////////////////////////////////////////////
+#endif // ZYPP_PATTERN_H