/search.css" rel="stylesheet" type="text/css"/> /search.js">
| Classes | Job Modules | Data Objects | Services | Algorithms | Tools | Packages | Directories | Tracs |

In This Package:

Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes
ObjectReg Class Reference

Encapsulates the registration of a DataObject in the TES/AES. More...

#include <ObjectReg.h>

List of all members.

Public Member Functions

 ObjectReg (IRegistry *registry, DataObject *object, bool store)
 Standard constructor.
 ObjectReg (const ObjectReg &rhs)
 Copy constructor.
 ObjectReg ()
 Default Constructor.
virtual ~ObjectReg ()
 Destructor.
virtual std::ostream & fillStream (std::ostream &s) const
 Fill the ASCII output stream.
const std::string & path () const
 The path at which this associated object was registered.
const IRegistry * registry () const
 Retrieve the registry.
const DataObject * object () const
 Retrieve const The object registered in the TES/AES system.
DataObject * object ()
 Retrieve nonconst.
bool store () const
 Retrieve const True if the object should be stored.
void setStore (bool value)
 Update True if the object should be stored.
int entry () const
 The I/O stream entry number.
void setEntry (int entry)
ObjectRegoperator= (const ObjectReg &rhs)

Static Public Member Functions

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 Member Functions

void setRegistry (IRegistry *registry)
 Sets Object pointer.
void setObject (DataObject *value)
 Sets Object pointer.

Private Attributes

IRegistry * m_registry
 The IRegistry instance in the AES into which the object was registered.
DataObject * m_object
 The object registered in the TES/AES system.
bool m_store
 True if the object should be stored.
int m_entry
 Output stream entry number.

Detailed Description

Encapsulates the registration of a DataObject in the TES/AES.

Author:
Simon Patton <SJPatton@lbl.gov> created Mon Jul 7 13:51:05 2008

Definition at line 20 of file ObjectReg.h.


Constructor & Destructor Documentation

ObjectReg::ObjectReg ( IRegistry *  registry,
DataObject *  object,
bool  store 
)

Standard constructor.

Definition at line 22 of file ObjectReg.cc.

ObjectReg::ObjectReg ( const ObjectReg rhs)

Copy constructor.

Definition at line 33 of file ObjectReg.cc.

ObjectReg::ObjectReg ( ) [inline]

Default Constructor.

Definition at line 33 of file ObjectReg.h.

                : m_registry(0),
                  m_object(0),
                  m_store(false) {}
ObjectReg::~ObjectReg ( ) [virtual]

Destructor.

Definition at line 42 of file ObjectReg.cc.

{
  if (m_registry) {
    m_registry->release();
  }
  if (0 != m_object) {
    m_object->release();
  }          
}

Member Function Documentation

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

Fill the ASCII output stream.

Definition at line 130 of file ObjectReg.h.

{
  char l_store = (m_store) ? 'T' : 'F';
  s << "{ " << "registry :      " << m_registry << std::endl
            << "object :        " << m_object << std::endl
            << "store : " << l_store << std::endl << " }";
  return s;
}
const std::string & ObjectReg::path ( ) const

The path at which this associated object was registered.

Definition at line 52 of file ObjectReg.cc.

{
  return m_registry->identifier();
}
const IRegistry * ObjectReg::registry ( ) const

Retrieve the registry.

Definition at line 57 of file ObjectReg.cc.

{
    return m_registry;
}
const DataObject * ObjectReg::object ( ) const

Retrieve const The object registered in the TES/AES system.

Definition at line 3 of file ObjectReg.cc.

{
  return m_object;
}
DataObject * ObjectReg::object ( )

Retrieve nonconst.

Definition at line 7 of file ObjectReg.cc.

{
  return m_object;
}
bool ObjectReg::store ( ) const

Retrieve const True if the object should be stored.

Definition at line 12 of file ObjectReg.cc.

{
  return m_store;
}
void ObjectReg::setStore ( bool  value)

Update True if the object should be stored.

Definition at line 17 of file ObjectReg.cc.

{
  m_store = value;
}
int ObjectReg::entry ( ) const

The I/O stream entry number.

This is meant to be used by the framework.

Definition at line 94 of file ObjectReg.cc.

{
  return m_entry;
}
void ObjectReg::setEntry ( int  entry)

Definition at line 98 of file ObjectReg.cc.

{
  m_entry = entry;
}
ObjectReg & ObjectReg::operator= ( const ObjectReg rhs)

Definition at line 103 of file ObjectReg.cc.

                                                    {
  if (this != &rhs) {
    setRegistry(rhs.m_registry);
    setObject(rhs.m_object);
    m_store=rhs.m_store;
  }
  return *this;
}
static void* ObjectReg::operator new ( size_t  size) [inline, static]

operator new

Definition at line 73 of file ObjectReg.h.

    {
      return ( sizeof(ObjectReg) == size ? 
               boost::singleton_pool<ObjectReg, sizeof(ObjectReg)>::malloc() :
               ::operator new(size) );
    }
static void* ObjectReg::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 83 of file ObjectReg.h.

    {
      return ::operator new (size,pObj);
    }
static void ObjectReg::operator delete ( void *  p) [inline, static]

operator delete

Definition at line 89 of file ObjectReg.h.

    {
      boost::singleton_pool<ObjectReg, sizeof(ObjectReg)>::is_from(p) ?
              boost::singleton_pool<ObjectReg, sizeof(ObjectReg)>::free(p) :
              ::operator delete(p);
    }
static void ObjectReg::operator delete ( void *  p,
void *  pObj 
) [inline, static]

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

Definition at line 98 of file ObjectReg.h.

    {
      ::operator delete (p, pObj);
    }
void ObjectReg::setRegistry ( IRegistry *  registry) [private]

Sets Object pointer.

Definition at line 78 of file ObjectReg.cc.

{
  if (registry == m_registry) {
    return;
  }

  if (0 != registry) {
    registry->addRef();
  }

  if (0 != m_registry) {
    m_registry->release();
  }
  m_registry = registry;
}
void ObjectReg::setObject ( DataObject *  value) [private]

Sets Object pointer.

Definition at line 62 of file ObjectReg.cc.

{
  if (value == m_object) {
    return;
  }

  if (0 != value) {
    value->addRef();
  }

  if (0 != m_object) {
    m_object->release();
  }
  m_object = value;
}

Member Data Documentation

IRegistry* ObjectReg::m_registry [private]

The IRegistry instance in the AES into which the object was registered.

Definition at line 112 of file ObjectReg.h.

DataObject* ObjectReg::m_object [private]

The object registered in the TES/AES system.

Definition at line 113 of file ObjectReg.h.

bool ObjectReg::m_store [private]

True if the object should be stored.

Definition at line 114 of file ObjectReg.h.

int ObjectReg::m_entry [mutable, private]

Output stream entry number.

Definition at line 115 of file ObjectReg.h.


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

Generated on Fri May 16 2014 09:57:56 for DybKernel by doxygen 1.7.4