KaliVeda
Toolkit for HIC analysis
Loading...
Searching...
No Matches
Hexa_t Class Reference

Detailed Description

Hexadecimal numbers.

Definition at line 15 of file Hexa_t.h.

#include <Hexa_t.h>

Public Member Functions

 Hexa_t ()
 Create hexa number.
 
 Hexa_t (const Char_t *)
 Create hexa number from string containing hexa value.
 
 Hexa_t (const Hexa_t &other)
 
 Hexa_t (const Long64_t)
 Create hexa number corresponding to decimal value "val".
 
virtual ~Hexa_t ()
 
 operator const char * () const
 
 operator Double_t () const
 
 operator Float_t () const
 
 operator Int_t () const
 convertors
 
 operator Long64_t () const
 
Hexa_t operator+ (const Char_t *c1)
 Addition of two Hexa numbers.
 
Hexa_t operator+ (const Hexa_t &b1)
 Addition of two Hexa numbers.
 
Hexa_t operator+ (const Long64_t l1)
 Hexa_t operator+(const Binary_t& b1);.
 
Hexa_toperator= (const Char_t *)
 Assign a Hexa value (as a string) to the Hexa number.
 
Hexa_toperator= (const Hexa_t &)
 Hexa_t& operator=(const Binary_t&);.
 
Hexa_toperator= (const Long64_t)
 Assign a decimal value to the Hexa number.
 
void ResetBit (UChar_t)
 
void Set (const Char_t *)
 
void Set (const Long64_t)
 Set number corresponding to decimal value "val".
 
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.
 

Static Public Member Functions

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

Private Attributes

Long64_t fVal
 

Static Private Attributes

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

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 24 of file Hexa_t.h.

◆ ~Hexa_t()

virtual Hexa_t::~Hexa_t ( )
inlinevirtual

Definition at line 25 of file Hexa_t.h.

Member Function Documentation

◆ GetPrefix()

static const Char_t * Hexa_t::GetPrefix ( )
inlinestatic

Definition at line 34 of file Hexa_t.h.

◆ operator const char *()

Hexa_t::operator const char * ( ) const
inline

Definition at line 69 of file Hexa_t.h.

◆ operator Double_t()

Hexa_t::operator Double_t ( ) const
inline

Definition at line 65 of file Hexa_t.h.

◆ operator Float_t()

Hexa_t::operator Float_t ( ) const
inline

Definition at line 61 of file Hexa_t.h.

◆ operator Int_t()

Hexa_t::operator Int_t ( ) const
inline

convertors

Definition at line 53 of file Hexa_t.h.

◆ operator Long64_t()

Hexa_t::operator Long64_t ( ) const
inline

Definition at line 57 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 30 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 18 of file Hexa_t.h.

◆ fVal

Long64_t Hexa_t::fVal
private

Definition at line 17 of file Hexa_t.h.