DmPart.h

Go to the documentation of this file.
00001 #ifndef DMPART_H
00002 #define DMPART_H
00003 
00004 #include "y2storage/Dm.h"
00005 #include "y2storage/Partition.h"
00006 
00007 namespace storage
00008 {
00009 
00010 class DmPartCo;
00011 class ProcPart;
00012 
00013 class DmPart : public Dm
00014     {
00015     public:
00016         DmPart( const DmPartCo& d, unsigned nr, Partition* p=NULL );
00017         DmPart( const DmPartCo& d, const DmPart& rd );
00018         DmPart& operator=( const DmPart& );
00019 
00020         virtual ~DmPart();
00021         friend std::ostream& operator<< (std::ostream& s, const DmPart &p );
00022         virtual void print( std::ostream& s ) const { s << *this; }
00023         void getInfo( storage::DmPartInfo& info ) const;
00024         bool equalContent( const DmPart& rhs ) const;
00025         void logDifference( const DmPart& d ) const;
00026         void setPtr( Partition* pa ) { p=pa; };
00027         Partition* getPtr() const { return p; };
00028         unsigned id() const { return p?p->id():0; }
00029         void updateName();
00030         void updateMinor();
00031         void updateSize( ProcPart& pp );
00032         void updateSize();
00033         void getCommitActions( std::list<storage::commitAction*>& l ) const;
00034         virtual string setTypeText( bool doing=true ) const;
00035         static bool notDeleted( const DmPart& l ) { return( !l.deleted() ); }
00036 
00037     protected:
00038         void init( const string& name );
00039         void dataFromPart( const Partition* p );
00040         virtual const string shortPrintedName() const { return( "DmPart" ); }
00041         const DmPartCo* co() const; 
00042         Partition* p;
00043 
00044         mutable storage::DmPartInfo info;
00045     };
00046 
00047 }
00048 
00049 #endif

Generated on Tue Nov 28 17:50:00 2006 for yast2-storage by  doxygen 1.5.0