| Classes | Job Modules | Data Objects | Services | Algorithms | Tools | Packages | Directories | Tracs |

In This Package:

LHCb::IntLink Class Reference

Link to int. More...

#include <IntLink.h>

Inheritance diagram for LHCb::IntLink:

[legend]
Collaboration diagram for LHCb::IntLink:
[legend]
List of all members.

Public Member Functions

 IntLink ()
 Default Constructor.
virtual ~IntLink ()
 Default Destructor.
virtual const CLIDclID () const
virtual std::ostream & fillStream (std::ostream &s) const
 Fill the ASCII output stream.
void setLink (int key, int value)
 Sets the int value asociated to this key.
int link (int key) const
 Returns the link associated to this key.
bool hasKey (int key) const
 Returns the index of the key. True if key exist, else inserting position.
const std::map< int, int > & link () const
 Retrieve const list of linked ints.
void setLink (const std::map< int, int > &value)
 Update list of linked ints.
void setRegistry (IRegistry *pRegistry)
IRegistryregistry () const
LinkManagerlinkMgr () const
unsigned char version () const
void setVersion (unsigned char vsn)
unsigned long refCount () const
virtual unsigned long addRef ()
virtual unsigned long release ()
const std::string & name () const
virtual StreamBufferserialize (StreamBuffer &s)
virtual StreamBufferserialize (StreamBuffer &s) const

Static Public Member Functions

static const CLIDclassID ()
static void * operator new (size_t size)
 operator new
static void * operator new (size_t size, void *pObj)
 placement operator new it is needed by libstdc++ 3.2.3 (e.g.
static void operator delete (void *p)
 operator delete
static void operator delete (void *p, void *pObj)
 placement operator delete not sure if really needed, but it does not harm

Private Attributes

std::map< int, int > m_link
 list of linked ints

Friends

friend std::ostream & operator<< (std::ostream &s, const DataObject &obj)

Detailed Description

Link to int.

Author:
Jose A. Hernando created Mon Apr 11 02:49:43 2011

Definition at line 47 of file IntLink.h.


Constructor & Destructor Documentation

LHCb::IntLink::IntLink (  )  [inline]

Default Constructor.

Definition at line 52 of file IntLink.h.

00052 : m_link() {}

virtual LHCb::IntLink::~IntLink (  )  [inline, virtual]

Default Destructor.

Definition at line 55 of file IntLink.h.

00055 {}


Member Function Documentation

const CLID & LHCb::IntLink::clID (  )  const [inline, virtual]

Reimplemented from DataObject.

Definition at line 136 of file IntLink.h.

00137 {
00138   return LHCb::IntLink::classID();
00139 }

const CLID & LHCb::IntLink::classID (  )  [inline, static]

Reimplemented from DataObject.

Definition at line 141 of file IntLink.h.

00142 {
00143   return CLID_IntLink;
00144 }

std::ostream & LHCb::IntLink::fillStream ( std::ostream &  s  )  const [inline, virtual]

Fill the ASCII output stream.

Reimplemented from DataObject.

Definition at line 146 of file IntLink.h.

00147 {
00148   s << "{ " << "link :  " << m_link << std::endl << " }";
00149   return s;
00150 }

void LHCb::IntLink::setLink ( int  key,
int  value 
) [inline]

Sets the int value asociated to this key.

Definition at line 163 of file IntLink.h.

00165 {
00166 
00167           m_link[key] = value;
00168         
00169 }

int LHCb::IntLink::link ( int  key  )  const [inline]

Returns the link associated to this key.

Definition at line 171 of file IntLink.h.

00172 {
00173 
00174           if (m_link.find(key) == m_link.end()) return 0;
00175           return m_link.find(key)->second;
00176         
00177 }

bool LHCb::IntLink::hasKey ( int  key  )  const [inline]

Returns the index of the key. True if key exist, else inserting position.

Definition at line 179 of file IntLink.h.

00180 {
00181 
00182           return (m_link.find(key) != m_link.end());
00183         
00184 }

const std::map< int, int > & LHCb::IntLink::link (  )  const [inline]

Retrieve const list of linked ints.

Definition at line 153 of file IntLink.h.

00154 {
00155   return m_link;
00156 }

void LHCb::IntLink::setLink ( const std::map< int, int > &  value  )  [inline]

Update list of linked ints.

Definition at line 158 of file IntLink.h.

00159 {
00160   m_link = value;
00161 }

static void* LHCb::IntLink::operator new ( size_t  size  )  [inline, static]

operator new

Definition at line 85 of file IntLink.h.

00086     {
00087       return ( sizeof(IntLink) == size ? 
00088                boost::singleton_pool<IntLink, sizeof(IntLink)>::malloc() :
00089                ::operator new(size) );
00090     }

static void* LHCb::IntLink::operator new ( size_t  size,
void *  pObj 
) [inline, static]

placement operator new it is needed by libstdc++ 3.2.3 (e.g.

in std::vector) it is not needed in libstdc++ >= 3.4

Definition at line 95 of file IntLink.h.

00096     {
00097       return ::operator new (size,pObj);
00098     }

static void LHCb::IntLink::operator delete ( void *  p  )  [inline, static]

operator delete

Definition at line 101 of file IntLink.h.

00102     {
00103       boost::singleton_pool<IntLink, sizeof(IntLink)>::is_from(p) ?
00104       boost::singleton_pool<IntLink, sizeof(IntLink)>::free(p) :
00105       ::operator delete(p);
00106     }

static void LHCb::IntLink::operator delete ( void *  p,
void *  pObj 
) [inline, static]

placement operator delete not sure if really needed, but it does not harm

Definition at line 110 of file IntLink.h.

00111     {
00112       ::operator delete (p, pObj);
00113     }


Member Data Documentation

std::map<int,int> LHCb::IntLink::m_link [private]

list of linked ints

Definition at line 119 of file IntLink.h.


The documentation for this class was generated from the following file:
| Classes | Job Modules | Data Objects | Services | Algorithms | Tools | Packages | Directories | Tracs |

Generated on Mon Apr 11 20:03:25 2011 for EventBase by doxygen 1.4.7