TmpPath.h

Go to the documentation of this file.
00001 /*---------------------------------------------------------------------\
00002 |                          ____ _   __ __ ___                          |
00003 |                         |__  / \ / / . \ . \                         |
00004 |                           / / \ V /|  _/  _/                         |
00005 |                          / /__ | | | | | |                           |
00006 |                         /_____||_| |_| |_|                           |
00007 |                                                                      |
00008 \---------------------------------------------------------------------*/
00012 #ifndef ZYPP_TMPPATH_H
00013 #define ZYPP_TMPPATH_H
00014 
00015 #include <iosfwd>
00016 
00017 #include "zypp/Pathname.h"
00018 #include "zypp/base/PtrTypes.h"
00019 
00020 namespace zypp {
00021   namespace filesystem {
00022 
00024     //
00025     //  CLASS NAME : TmpPath
00038     class TmpPath
00039     {
00040       public:
00044         TmpPath();
00045     
00049         explicit
00050         TmpPath( const Pathname & tmpPath_r );
00051     
00055         virtual
00056         ~TmpPath();
00057     
00062         operator const void *const() const;
00063     
00067         Pathname
00068         path() const;
00069     
00073         operator Pathname() const
00074         { return path(); }
00075     
00076       public:
00081         static const Pathname &
00082         defaultLocation();
00083 
00084       protected:
00085         class Impl;
00086         RW_pointer<Impl> _impl;
00087     
00088     };
00090     
00094     inline std::ostream &
00095     operator<<( std::ostream & str, const TmpPath & obj )
00096     { return str << static_cast<Pathname>(obj); }
00097     
00099     
00101     //
00102     //  CLASS NAME : TmpFile
00116     class TmpFile : public TmpPath
00117     {
00118       public:
00122         explicit
00123         TmpFile( const Pathname & inParentDir_r = defaultLocation(),
00124                  const std::string & prefix_r = defaultPrefix() );
00125     
00126       public:
00130         static const std::string &
00131         defaultPrefix();
00132     
00133     };
00135     
00137     //
00138     //  CLASS NAME : TmpDir
00152     class TmpDir : public TmpPath
00153     {
00154       public:
00158         explicit
00159         TmpDir( const Pathname & inParentDir_r = defaultLocation(),
00160                 const std::string & prefix_r = defaultPrefix() );
00161     
00162       public:
00166         static const std::string &
00167         defaultPrefix();
00168     };
00170 
00171   } // namespace filesystem
00172 } // namespace zypp
00173 
00174 #endif // ZYPP_TMPPATH_H

Generated on Thu Jul 6 00:07:28 2006 for zypp by  doxygen 1.4.6