storage::Partition Class Reference

#include <Partition.h>

Inheritance diagram for storage::Partition:

storage::Volume List of all members.

Public Types

enum  IdNum {
  ID_DOS16 = 0x6, ID_DOS = 0x0c, ID_NTFS = 0x07, ID_EXTENDED = 0x0f,
  ID_LINUX = 0x83, ID_SWAP = 0x82, ID_LVM = 0x8e, ID_RAID = 0xfd,
  ID_APPLE_OTHER = 0x101, ID_APPLE_HFS = 0x102, ID_GPT_BOOT = 0x103, ID_GPT_SERVICE = 0x104,
  ID_GPT_MSFTRES = 0x105, ID_APPLE_UFS = 0x106
}

Public Member Functions

 Partition (const Disk &d, unsigned Pnr, unsigned long long SizeK, unsigned long Start, unsigned long CSize, storage::PartitionType Type, unsigned id=ID_LINUX, bool Boot=false)
 Partition (const Disk &d, const string &Data)
 Partition (const Disk &d, const Partition &p)
virtual ~Partition ()
unsigned long cylStart () const
unsigned long cylSize () const
unsigned long cylEnd () const
const Regionregion () const
const std::list< string > udevId () const
const string & udevPath () const
string sysfsPath () const
bool intersectArea (const Region &r, unsigned fuzz=0) const
bool contains (const Region &r, unsigned fuzz=0) const
unsigned OrigNr () const
bool boot () const
unsigned id () const
storage::PartitionType type () const
std::ostream & logData (std::ostream &file) const
void changeRegion (unsigned long Start, unsigned long CSize, unsigned long long SizeK)
void changeNumber (unsigned new_num)
void changeId (unsigned id)
void changeIdDone ()
void unChangeId ()
string removeText (bool doing=true) const
string createText (bool doing=true) const
string formatText (bool doing=true) const
string resizeText (bool doing=true) const
void getCommitActions (std::list< storage::commitAction * > &l) const
string setTypeText (bool doing=true) const
int setFormat (bool format=true, storage::FsType fs=storage::REISERFS)
int changeMount (const string &val)
const Disk *const disk () const
bool isWindows () const
virtual void print (std::ostream &s) const
void setResizedSize (unsigned long long SizeK)
void forgetResize ()
bool canUseDevice () const
void getInfo (storage::PartitionInfo &info) const
bool equalContent (const Partition &rhs) const
void logDifference (const Partition &d) const
void addUdevData ()

Static Public Member Functions

static bool notDeleted (const Partition &d)
static bool toChangeId (const Partition &d)

Protected Member Functions

Partitionoperator= (const Partition &)
void addAltUdevId (unsigned num)
void addAltUdevPath (unsigned num)

Protected Attributes

Region reg
bool bootflag
storage::PartitionType typ
unsigned idt
unsigned orig_id
string parted_start
unsigned orig_num
storage::PartitionInfo info

Static Protected Attributes

static string pt_names [storage::PTYPE_ANY+1] = { "primary", "extended", "logical", "any" }

Friends

std::ostream & operator<< (std::ostream &s, const Partition &p)

Member Enumeration Documentation

enum storage::Partition::IdNum
 

Enumerator:
ID_DOS16 
ID_DOS 
ID_NTFS 
ID_EXTENDED 
ID_LINUX 
ID_SWAP 
ID_LVM 
ID_RAID 
ID_APPLE_OTHER 
ID_APPLE_HFS 
ID_GPT_BOOT 
ID_GPT_SERVICE 
ID_GPT_MSFTRES 
ID_APPLE_UFS 


Constructor & Destructor Documentation

Partition::Partition const Disk d,
unsigned  Pnr,
unsigned long long  SizeK,
unsigned long  Start,
unsigned long  CSize,
storage::PartitionType  Type,
unsigned  id = ID_LINUX,
bool  Boot = false
 

Partition::Partition const Disk d,
const string &  Data
 

Partition::Partition const Disk d,
const Partition p
 

Partition::~Partition  )  [virtual]
 


Member Function Documentation

void Partition::addAltUdevId unsigned  num  )  [protected]
 

void Partition::addAltUdevPath unsigned  num  )  [protected]
 

void Partition::addUdevData  ) 
 

bool storage::Partition::boot  )  const [inline]
 

bool Partition::canUseDevice  )  const [virtual]
 

Reimplemented from storage::Volume.

void Partition::changeId unsigned  id  ) 
 

void Partition::changeIdDone  ) 
 

int Partition::changeMount const string &  val  )  [virtual]
 

Reimplemented from storage::Volume.

void Partition::changeNumber unsigned  new_num  ) 
 

void Partition::changeRegion unsigned long  Start,
unsigned long  CSize,
unsigned long long  SizeK
 

bool Partition::contains const Region r,
unsigned  fuzz = 0
const
 

string Partition::createText bool  doing = true  )  const [virtual]
 

Reimplemented from storage::Volume.

unsigned long storage::Partition::cylEnd  )  const [inline]
 

unsigned long storage::Partition::cylSize  )  const [inline]
 

unsigned long storage::Partition::cylStart  )  const [inline]
 

const Disk *const Partition::disk  )  const
 

bool Partition::equalContent const Partition rhs  )  const
 

void Partition::forgetResize  )  [virtual]
 

Reimplemented from storage::Volume.

string Partition::formatText bool  doing = true  )  const [virtual]
 

Reimplemented from storage::Volume.

void storage::Partition::getCommitActions std::list< storage::commitAction * > &  l  )  const [virtual]
 

Reimplemented from storage::Volume.

void Partition::getInfo storage::PartitionInfo info  )  const
 

unsigned storage::Partition::id  )  const [inline]
 

bool Partition::intersectArea const Region r,
unsigned  fuzz = 0
const
 

bool Partition::isWindows  )  const
 

std::ostream& storage::Partition::logData std::ostream &  file  )  const
 

void Partition::logDifference const Partition d  )  const
 

static bool storage::Partition::notDeleted const Partition d  )  [inline, static]
 

Partition & Partition::operator= const Partition  )  [protected]
 

unsigned storage::Partition::OrigNr  )  const [inline]
 

virtual void storage::Partition::print std::ostream &  s  )  const [inline, virtual]
 

Reimplemented from storage::Volume.

const Region& storage::Partition::region  )  const [inline]
 

string Partition::removeText bool  doing = true  )  const [virtual]
 

Reimplemented from storage::Volume.

string Partition::resizeText bool  doing = true  )  const [virtual]
 

Reimplemented from storage::Volume.

int Partition::setFormat bool  format = true,
storage::FsType  fs = storage::REISERFS
[virtual]
 

Reimplemented from storage::Volume.

void Partition::setResizedSize unsigned long long  SizeK  )  [virtual]
 

Reimplemented from storage::Volume.

string Partition::setTypeText bool  doing = true  )  const
 

string Partition::sysfsPath  )  const [virtual]
 

Reimplemented from storage::Volume.

static bool storage::Partition::toChangeId const Partition d  )  [inline, static]
 

storage::PartitionType storage::Partition::type  )  const [inline]
 

const list< string > Partition::udevId  )  const [virtual]
 

Reimplemented from storage::Volume.

const string & Partition::udevPath  )  const [virtual]
 

Reimplemented from storage::Volume.

void Partition::unChangeId  ) 
 


Friends And Related Function Documentation

std::ostream& operator<< std::ostream &  s,
const Partition p
[friend]
 


Member Data Documentation

bool storage::Partition::bootflag [protected]
 

unsigned storage::Partition::idt [protected]
 

storage::PartitionInfo storage::Partition::info [mutable, protected]
 

Reimplemented from storage::Volume.

unsigned storage::Partition::orig_id [protected]
 

unsigned storage::Partition::orig_num [protected]
 

string storage::Partition::parted_start [protected]
 

string Partition::pt_names = { "primary", "extended", "logical", "any" } [static, protected]
 

Region storage::Partition::reg [protected]
 

storage::PartitionType storage::Partition::typ [protected]
 


The documentation for this class was generated from the following files:
Generated on Thu Jul 6 00:40:25 2006 for yast2-storage by  doxygen 1.4.6