libStatGen Software 1
ColumnExtras Class Reference
Collaboration diagram for ColumnExtras:

Public Member Functions

 ColumnExtras (ColumnExtras &original)
 
void SetLabel (const char *name)
 
void SetPrecision (int p)
 
void SetWidth (int w)
 
int GetWidth ()
 
int GetPrecision ()
 
ColumnExtrasoperator= (ColumnExtras &rhs)
 
void Swap (ColumnExtras &rhs)
 

Public Attributes

String label
 

Detailed Description

Definition at line 26 of file MathMatrix.h.

Constructor & Destructor Documentation

◆ ColumnExtras() [1/2]

ColumnExtras::ColumnExtras ( )
inline

Definition at line 38 of file MathMatrix.h.

39 {
40 Init();
41 }

◆ ColumnExtras() [2/2]

ColumnExtras::ColumnExtras ( ColumnExtras original)
inline

Definition at line 42 of file MathMatrix.h.

43 {
44 Init();
45 Copy(original);
46 }

◆ ~ColumnExtras()

ColumnExtras::~ColumnExtras ( )

Definition at line 429 of file MathMatrix.cpp.

430{ }

Member Function Documentation

◆ GetPrecision()

int ColumnExtras::GetPrecision ( )
inline

Definition at line 62 of file MathMatrix.h.

63 {
64 return precision;
65 }

◆ GetWidth()

int ColumnExtras::GetWidth ( )

Definition at line 437 of file MathMatrix.cpp.

438{
439 if (dirty)
440 {
441 if (precision + 2 > width)
442 width = precision + 2;
443 if (label.Length() > width)
444 width = label.Length();
445 dirty = false;
446 }
447 return width;
448}

◆ operator=()

ColumnExtras & ColumnExtras::operator= ( ColumnExtras rhs)
inline

Definition at line 67 of file MathMatrix.h.

68 {
69 Copy(rhs);
70 return (*this);
71 }

◆ SetLabel()

void ColumnExtras::SetLabel ( const char *  name)

Definition at line 432 of file MathMatrix.cpp.

433{
434 label = name;
435}

◆ SetPrecision()

void ColumnExtras::SetPrecision ( int  p)
inline

Definition at line 50 of file MathMatrix.h.

51 {
52 precision = p;
53 dirty = true;
54 }

◆ SetWidth()

void ColumnExtras::SetWidth ( int  w)
inline

Definition at line 55 of file MathMatrix.h.

56 {
57 width = w;
58 dirty = true;
59 }

◆ Swap()

void ColumnExtras::Swap ( ColumnExtras rhs)

Definition at line 461 of file MathMatrix.cpp.

462{
463 SWAP(c.width, width);
464 SWAP(c.precision, precision);
465 SWAPBOOL(c.dirty, dirty);
466 c.label.Swap(label);
467}

Member Data Documentation

◆ label

String ColumnExtras::label

Definition at line 36 of file MathMatrix.h.


The documentation for this class was generated from the following files: