CMS 3D CMS Logo

List of all members | Public Member Functions | Private Member Functions | Private Attributes
ALIUnitsCategory Class Reference

#include <ALIUnitsTable.h>

Public Member Functions

 ALIUnitsCategory (ALIstring name)
 
ALIstring GetName () const
 
ALIint GetNameMxLen () const
 
ALIint GetSymbMxLen () const
 
ALIUnitsContainerGetUnitsList ()
 
ALIint operator!= (const ALIUnitsCategory &) const
 
ALIint operator== (const ALIUnitsCategory &) const
 
void PrintCategory ()
 
void UpdateNameMxLen (ALIint len)
 
void UpdateSymbMxLen (ALIint len)
 
 ~ALIUnitsCategory ()
 

Private Member Functions

 ALIUnitsCategory (ALIUnitsCategory &)
 
ALIUnitsCategoryoperator= (const ALIUnitsCategory &)
 

Private Attributes

ALIstring Name
 
ALIint NameMxLen
 
ALIint SymbMxLen
 
ALIUnitsContainer UnitsList
 

Detailed Description

Definition at line 94 of file ALIUnitsTable.h.

Constructor & Destructor Documentation

◆ ALIUnitsCategory() [1/2]

ALIUnitsCategory::ALIUnitsCategory ( ALIstring  name)

Definition at line 241 of file ALIUnitsTable.cc.

References UnitsList.

241  : Name(name), NameMxLen(0), SymbMxLen(0) {
242  UnitsList = *(new ALIUnitsContainer);
243 }
ALIUnitsContainer UnitsList
std::vector< std::shared_ptr< ALIUnitDefinition > > ALIUnitsContainer
Definition: ALIUnitsTable.h:92

◆ ~ALIUnitsCategory()

ALIUnitsCategory::~ALIUnitsCategory ( )

Definition at line 247 of file ALIUnitsTable.cc.

247 {}

◆ ALIUnitsCategory() [2/2]

ALIUnitsCategory::ALIUnitsCategory ( ALIUnitsCategory right)
private

Definition at line 251 of file ALIUnitsTable.cc.

251 { *this = right; }

Member Function Documentation

◆ GetName()

ALIstring ALIUnitsCategory::GetName ( ) const
inline

Definition at line 106 of file ALIUnitsTable.h.

References Name.

106 { return Name; }

◆ GetNameMxLen()

ALIint ALIUnitsCategory::GetNameMxLen ( ) const
inline

Definition at line 108 of file ALIUnitsTable.h.

References NameMxLen.

108 { return NameMxLen; }

◆ GetSymbMxLen()

ALIint ALIUnitsCategory::GetSymbMxLen ( ) const
inline

Definition at line 109 of file ALIUnitsTable.h.

References SymbMxLen.

109 { return SymbMxLen; }

◆ GetUnitsList()

ALIUnitsContainer& ALIUnitsCategory::GetUnitsList ( )
inline

Definition at line 107 of file ALIUnitsTable.h.

References UnitsList.

107 { return UnitsList; }
ALIUnitsContainer UnitsList

◆ operator!=()

ALIint ALIUnitsCategory::operator!= ( const ALIUnitsCategory right) const

Definition at line 271 of file ALIUnitsTable.cc.

271 { return (this != &right); }

◆ operator=()

ALIUnitsCategory & ALIUnitsCategory::operator= ( const ALIUnitsCategory right)
private

Definition at line 255 of file ALIUnitsTable.cc.

References Name, NameMxLen, SymbMxLen, and UnitsList.

255  {
256  if (this != &right) {
257  Name = right.Name;
258  UnitsList = right.UnitsList;
259  NameMxLen = right.NameMxLen;
260  SymbMxLen = right.SymbMxLen;
261  }
262  return *this;
263 }
ALIUnitsContainer UnitsList

◆ operator==()

ALIint ALIUnitsCategory::operator== ( const ALIUnitsCategory right) const

Definition at line 267 of file ALIUnitsTable.cc.

267 { return (this == &right); }

◆ PrintCategory()

void ALIUnitsCategory::PrintCategory ( )

Definition at line 275 of file ALIUnitsTable.cc.

References gather_cfg::cout, mps_fire::i, Name, and UnitsList.

275  {
276  std::cout << "\n category: " << Name << std::endl;
277  for (size_t i = 0; i < UnitsList.size(); i++)
278  UnitsList[i]->PrintDefinition();
279 }
ALIUnitsContainer UnitsList

◆ UpdateNameMxLen()

void ALIUnitsCategory::UpdateNameMxLen ( ALIint  len)
inline

Definition at line 110 of file ALIUnitsTable.h.

References NameMxLen.

110  {
111  if (NameMxLen < len)
112  NameMxLen = len;
113  }

◆ UpdateSymbMxLen()

void ALIUnitsCategory::UpdateSymbMxLen ( ALIint  len)
inline

Definition at line 114 of file ALIUnitsTable.h.

References SymbMxLen.

114  {
115  if (SymbMxLen < len)
116  SymbMxLen = len;
117  }

Member Data Documentation

◆ Name

ALIstring ALIUnitsCategory::Name
private

Definition at line 121 of file ALIUnitsTable.h.

Referenced by GetName(), operator=(), and PrintCategory().

◆ NameMxLen

ALIint ALIUnitsCategory::NameMxLen
private

Definition at line 123 of file ALIUnitsTable.h.

Referenced by GetNameMxLen(), operator=(), and UpdateNameMxLen().

◆ SymbMxLen

ALIint ALIUnitsCategory::SymbMxLen
private

Definition at line 124 of file ALIUnitsTable.h.

Referenced by GetSymbMxLen(), operator=(), and UpdateSymbMxLen().

◆ UnitsList

ALIUnitsContainer ALIUnitsCategory::UnitsList
private

Definition at line 122 of file ALIUnitsTable.h.

Referenced by ALIUnitsCategory(), GetUnitsList(), operator=(), and PrintCategory().