KaliVeda  1.13/01
Heavy-Ion Analysis Toolkit
List of all members | Public Member Functions | Static Public Member Functions | Private Attributes | Static Private Attributes | List of all members
Hexa_t Class Reference

Hexadecimal numbers.

Definition at line 14 of file Hexa_t.h.

Public Member Functions

 Hexa_t ()
 Create hexa number. More...
 
 Hexa_t (const Char_t *)
 Create hexa number from string containing hexa value. More...
 
 Hexa_t (const Hexa_t &other)
 
 Hexa_t (const Long64_t)
 Create hexa number corresponding to decimal value "val". More...
 
virtual ~ Hexa_t ()
 
 operator const char * () const
 
 operator Double_t () const
 
 operator Float_t () const
 
 operator Int_t () const
 convertors More...
 
 operator Long64_t () const
 
Hexa_t operator+ (const Char_t *c1)
 Addition of two Hexa numbers. More...
 
Hexa_t operator+ (const Hexa_t &b1)
 Addition of two Hexa numbers. More...
 
Hexa_t operator+ (const Long64_t l1)
 Hexa_t operator+(const Binary_t& b1);. More...
 
Hexa_toperator= (const Char_t *)
 Assign a Hexa value (as a string) to the Hexa number. More...
 
Hexa_toperator= (const Hexa_t &)
 Hexa_t& operator=(const Binary_t&);. More...
 
Hexa_toperator= (const Long64_t)
 Assign a decimal value to the Hexa number. More...
 
void ResetBit (UChar_t)
 
void Set (const Char_t *)
 
void Set (const Long64_t)
 Set number corresponding to decimal value "val". More...
 
void SetBit (UChar_t, Long64_t=-1)
 
const Char_tString (UChar_t nbits=0) const
 
Bool_t TestBit (UChar_t)
 
Long64_t Value () const
 Get decimal value of number. More...
 

Static Public Member Functions

static const Char_tGetPrefix ()
 
static void SetPrefix (const Char_t *pref)
 _________________________________________// More...
 

Private Attributes

Long64_t fVal
 

Static Private Attributes

static TString fPrefix = "0x"
 the prefix used to represent hexadecimal numbers as strings More...
 

#include <Hexa_t.h>

Constructor & Destructor Documentation

◆ Hexa_t() [1/4]

Hexa_t::Hexa_t ( )

Create hexa number.

Definition at line 14 of file Hexa_t.cpp.

◆ Hexa_t() [2/4]

Hexa_t::Hexa_t ( const Long64_t  val)

Create hexa number corresponding to decimal value "val".

Definition at line 25 of file Hexa_t.cpp.

◆ Hexa_t() [3/4]

Hexa_t::Hexa_t ( const Char_t val)

Create hexa number from string containing hexa value.

Definition at line 36 of file Hexa_t.cpp.

◆ Hexa_t() [4/4]

Hexa_t::Hexa_t ( const Hexa_t other)
inline

Definition at line 23 of file Hexa_t.h.

◆ ~ Hexa_t()

virtual Hexa_t::~ Hexa_t ( )
inlinevirtual

Definition at line 24 of file Hexa_t.h.

Member Function Documentation

◆ GetPrefix()

static const Char_t* Hexa_t::GetPrefix ( )
inlinestatic

Definition at line 33 of file Hexa_t.h.

◆ operator const char *()

Hexa_t::operator const char * ( ) const
inline

Definition at line 68 of file Hexa_t.h.

◆ operator Double_t()

Hexa_t::operator Double_t ( ) const
inline

Definition at line 64 of file Hexa_t.h.

◆ operator Float_t()

Hexa_t::operator Float_t ( ) const
inline

Definition at line 60 of file Hexa_t.h.

◆ operator Int_t()

Hexa_t::operator Int_t ( ) const
inline

convertors

Definition at line 52 of file Hexa_t.h.

◆ operator Long64_t()

Hexa_t::operator Long64_t ( ) const
inline

Definition at line 56 of file Hexa_t.h.

◆ operator+() [1/3]

Hexa_t Hexa_t::operator+ ( const Char_t c1)

Addition of two Hexa numbers.

Definition at line 185 of file Hexa_t.cpp.

◆ operator+() [2/3]

Hexa_t Hexa_t::operator+ ( const Hexa_t b1)

Addition of two Hexa numbers.

Definition at line 157 of file Hexa_t.cpp.

◆ operator+() [3/3]

Hexa_t Hexa_t::operator+ ( const Long64_t  l1)

Hexa_t operator+(const Binary_t& b1);.

Addition of two Hexa numbers.

Definition at line 174 of file Hexa_t.cpp.

◆ operator=() [1/3]

Hexa_t & Hexa_t::operator= ( const Char_t val)

Assign a Hexa value (as a string) to the Hexa number.

Definition at line 125 of file Hexa_t.cpp.

◆ operator=() [2/3]

Hexa_t & Hexa_t::operator= ( const Hexa_t val)

Hexa_t& operator=(const Binary_t&);.

Assign a hexadecimal value to the Hexa number.

Definition at line 144 of file Hexa_t.cpp.

◆ operator=() [3/3]

Hexa_t & Hexa_t::operator= ( const Long64_t  val)

Assign a decimal value to the Hexa number.

Definition at line 113 of file Hexa_t.cpp.

◆ ResetBit()

void Hexa_t::ResetBit ( UChar_t  nbit)

Set bit 'nbit' to 0 The least significant bit is numbered 0.

Definition at line 298 of file Hexa_t.cpp.

◆ Set() [1/2]

void Hexa_t::Set ( const Char_t val)

Set value from string containing hexa number Can be written in lower or upper case. Acceptable formats are "a0D4", "0xff21" and "$f5"

Definition at line 71 of file Hexa_t.cpp.

◆ Set() [2/2]

void Hexa_t::Set ( const Long64_t  val)

Set number corresponding to decimal value "val".

Definition at line 47 of file Hexa_t.cpp.

◆ SetBit()

void Hexa_t::SetBit ( UChar_t  nbit,
Long64_t  val = -1 
)

Set bit 'nbit' to 1 The least significant bit is numbered 0. If "val" is given, bit 'nbit' is set to the same value as the equivalent bit in 'val'

Definition at line 276 of file Hexa_t.cpp.

◆ SetPrefix()

static void Hexa_t::SetPrefix ( const Char_t pref)
inlinestatic

_________________________________________//

Definition at line 29 of file Hexa_t.h.

◆ String()

const Char_t * Hexa_t::String ( UChar_t  nbits = 0) const

Return pointer to string containing hexadecimal representation of number This string should be copied immediately before further use. The prefix used to represent hexadecimal numbers is "0x" by default. This can be changed using SetPrefix. use Form's circular Char_t buffer to return pointer

Definition at line 97 of file Hexa_t.cpp.

◆ TestBit()

Bool_t Hexa_t::TestBit ( UChar_t  nbit)

Returns kTRUE if bit is equal to '1' The least significant bit is numbered 0.

Definition at line 312 of file Hexa_t.cpp.

◆ Value()

Long64_t Hexa_t::Value ( ) const

Get decimal value of number.

Definition at line 58 of file Hexa_t.cpp.

Member Data Documentation

◆ fPrefix

TString Hexa_t::fPrefix = "0x"
staticprivate

the prefix used to represent hexadecimal numbers as strings

Definition at line 17 of file Hexa_t.h.

◆ fVal

Long64_t Hexa_t::fVal
private

Definition at line 16 of file Hexa_t.h.


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