|
yast2-storage
|
00001 /* 00002 * Copyright (c) [2004-2009] Novell, Inc. 00003 * 00004 * All Rights Reserved. 00005 * 00006 * This program is free software; you can redistribute it and/or modify it 00007 * under the terms of version 2 of the GNU General Public License as published 00008 * by the Free Software Foundation. 00009 * 00010 * This program is distributed in the hope that it will be useful, but WITHOUT 00011 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 00012 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for 00013 * more details. 00014 * 00015 * You should have received a copy of the GNU General Public License along 00016 * with this program; if not, contact Novell, Inc. 00017 * 00018 * To contact Novell about this file by physical or electronic mail, you may 00019 * find current contact information at www.novell.com. 00020 */ 00021 00022 00023 #ifndef DMRAID_H 00024 #define DMRAID_H 00025 00026 #include "storage/DmPart.h" 00027 00028 namespace storage 00029 { 00030 00031 class DmraidCo; 00032 class Partition; 00033 00034 class Dmraid : public DmPart 00035 { 00036 public: 00037 00038 Dmraid(const DmraidCo& c, const string& name, const string& device, unsigned nr, 00039 Partition* p); 00040 Dmraid(const DmraidCo& c, const string& name, const string& device, unsigned nr, 00041 Partition* p, SystemInfo& si); 00042 Dmraid(const DmraidCo& c, const Dmraid& v); 00043 virtual ~Dmraid(); 00044 00045 void getInfo( storage::DmraidInfo& info ) const; 00046 friend std::ostream& operator<< (std::ostream& s, const Dmraid &p ); 00047 virtual void print( std::ostream& s ) const { s << *this; } 00048 Text removeText( bool doing ) const; 00049 Text createText( bool doing ) const; 00050 Text formatText( bool doing ) const; 00051 Text resizeText( bool doing ) const; 00052 Text setTypeText(bool doing) const; 00053 bool equalContent( const Dmraid& rhs ) const; 00054 00055 void logDifference(std::ostream& log, const Dmraid& rhs) const; 00056 00057 static bool notDeleted( const Dmraid& l ) { return( !l.deleted() ); } 00058 00059 protected: 00060 virtual const string shortPrintedName() const { return( "Dmraid" ); } 00061 00062 private: 00063 00064 Dmraid(const Dmraid&); // disallow 00065 Dmraid& operator=(const Dmraid&); // disallow 00066 00067 }; 00068 00069 } 00070 00071 #endif
1.7.3