added comments, several fixes
[platform/upstream/libzypp.git] / zypp / detail / ScriptImpl.h
1 /*---------------------------------------------------------------------\
2 |                          ____ _   __ __ ___                          |
3 |                         |__  / \ / / . \ . \                         |
4 |                           / / \ V /|  _/  _/                         |
5 |                          / /__ | | | | | |                           |
6 |                         /_____||_| |_| |_|                           |
7 |                                                                      |
8 \---------------------------------------------------------------------*/
9 /** \file zypp/detail/ScriptImpl.h
10  *
11 */
12 #ifndef ZYPP_DETAIL_SCRIPTIMPL_H
13 #define ZYPP_DETAIL_SCRIPTIMPL_H
14
15 #include <iosfwd>
16
17 #include "zypp/detail/ResolvableImpl.h"
18 #include "zypp/Resolvable.h"
19 #include "zypp/Script.h"
20
21 ///////////////////////////////////////////////////////////////////
22 namespace zypp
23 { /////////////////////////////////////////////////////////////////
24   ///////////////////////////////////////////////////////////////////
25   namespace detail
26   { /////////////////////////////////////////////////////////////////
27
28
29     ///////////////////////////////////////////////////////////////////
30     //
31     //  CLASS NAME : ScriptImpl
32     //
33     /** Class representing an update script */
34     class ScriptImpl : public ResolvableImpl
35     {
36     public:
37       /** Default ctor */
38       ScriptImpl( const ResName & name_r,
39                   const Edition & edition_r,
40                   const Arch & arch_r );
41       /** Dtor */
42       ~ScriptImpl();
43
44     public:
45       /** Get the script to perform the change */
46       std::string do_script () const;
47       /** Get the script to undo the change */
48       std::string undo_script () const;
49       /** Check whether script to undo the change is available */
50       virtual bool undo_available () const;
51     protected:
52       /** The script to perform the change */
53       std::string _do_script;
54       /** The script to undo the change */
55       std::string _undo_script;
56     };
57     ///////////////////////////////////////////////////////////////////
58
59     /////////////////////////////////////////////////////////////////
60   } // namespace detail
61   ///////////////////////////////////////////////////////////////////
62   /////////////////////////////////////////////////////////////////
63 } // namespace zypp
64 ///////////////////////////////////////////////////////////////////
65 #endif // ZYPP_DETAIL_SCRIPTIMPL_H