COVISE Core
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros
Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | Static Private Attributes | Friends | List of all members
covise::coDistributedObject Class Referenceabstract

#include <coDistributedObject.h>

Inheritance diagram for covise::coDistributedObject:
Inheritance graph
[legend]
Collaboration diagram for covise::coDistributedObject:
Collaboration graph
[legend]

Public Member Functions

void getShmLocation (int &shmSegNo, shmSizeType &offset) const
 Get my location in shared memory. More...
 
void addAttribute (const char *, const char *)
 Attach an attribute to an object. More...
 
void addAttributes (int, const char *const *, const char *const *)
 Attach multiple attributes to an object. More...
 
const char * getAttribute (const char *) const
 get one attribute More...
 
int getNumAttributes () const
 get number of attributes More...
 
int getAllAttributes (const char ***name, const char ***content) const
 get all attributes More...
 
void copyAllAttributes (const coDistributedObject *src)
 copy all attributes from src to this object More...
 
char * getName () const
 get the object's name More...
 
const char * getType () const
 get the object's type More...
 
int isType (const char *reqType) const
 check whether this is a certain type More...
 
bool objectOk () const
 check whether object was created or received ok More...
 
 coDistributedObject ()
 
 coDistributedObject (const coObjInfo &info)
 
 coDistributedObject (const coObjInfo &info, const char *t)
 
 coDistributedObject (const coObjInfo &info, int shmSeg, shmSizeType offs, char *t)
 
virtual ~coDistributedObject ()
 
coDistributedObjectclone (const coObjInfo &newinfo) const
 
void copyObjInfo (coObjInfo *info) const
 
const coDistributedObjectcreateUnknown () const
 
int * store_header (int, int, int, int *, data_type *, long *, int **)
 
int restore_header (int **, int, int *, int *, shmSizeType *)
 
void init_header (int *, int *, int, data_type **, long **)
 
int update_shared_dl (int count, covise_data_list *dl)
 
int store_shared_dl (int count, covise_data_list *dl)
 
int restore_shared_dl (int count, covise_data_list *dl)
 
void setType (const char *, const char *)
 
int getObjectInfo (coDoInfo **) const
 
int get_type_no () const
 
int access (access_type)
 
int destroy ()
 
char * object_on_hosts () const
 
int incRefCount () const
 
int decRefCount () const
 
int getRefCount () const
 
void print () const
 
void getObjectFromShm ()
 Common function for all read-Constructors: More...
 
bool checkObject () const
 Check object: return true if valid, false if not. More...
 

Static Public Member Functions

static const coDistributedObjectcreateFromShm (const coObjInfo &newinfo)
 
static const coDistributedObjectcreateUnknown (coShmArray *)
 
static const coDistributedObjectcreateUnknown (int seg, shmSizeType offs)
 
static int calcType (const char *)
 
static char * calcTypeString (int)
 
static int set_vconstr (const char *, coDistributedObject *(*)(coShmArray *))
 

Protected Member Functions

int getShmArray () const
 
int createFromShm (coShmArray *arr)
 
virtual int rebuildFromShm ()=0
 
virtual int getObjInfo (int, coDoInfo **) const
 
bool checkObj (int shmSegNo, shmSizeType shmOffs, bool &printed) const
 Check object in shared memory. More...
 
virtual coDistributedObjectcloneObject (const coObjInfo &newinfo) const =0
 

Protected Attributes

coIntShm version
 
coIntShm refcount
 
coShmArrayshmarr
 
coStringShmArrayattributes
 
coDoHeaderheader
 
char type_name [7]
 
int type_no
 
char * name
 
int loc_version
 
bool new_ok
 
int size
 
char * attribs
 

Static Private Attributes

static List< VirtualConstructor > * vconstr_list = NULL
 
static int xfer_arrays = 1
 

Friends

class ApplicationProcess
 
class coShmArrayPtr
 
void coShmPtrArray::set (int i, const class coDistributedObject *elem)
 

Constructor & Destructor Documentation

covise::coDistributedObject::coDistributedObject ( )
inline
covise::coDistributedObject::coDistributedObject ( const coObjInfo info)
inline
covise::coDistributedObject::coDistributedObject ( const coObjInfo info,
const char *  t 
)
inline
covise::coDistributedObject::coDistributedObject ( const coObjInfo info,
int  shmSeg,
shmSizeType  offs,
char *  t 
)
inline
coDistributedObject::~coDistributedObject ( )
virtual

Member Function Documentation

int coDistributedObject::access ( access_type  acc)
void coDistributedObject::addAttribute ( const char *  attr_name,
const char *  attr_val 
)

Attach an attribute to an object.

void coDistributedObject::addAttributes ( int  no,
const char *const *  attr_name,
const char *const *  attr_val 
)

Attach multiple attributes to an object.

int coDistributedObject::calcType ( const char *  tname)
static
char * coDistributedObject::calcTypeString ( int  tno)
static
bool coDistributedObject::checkObj ( int  shmSegNo,
shmSizeType  shmOffs,
bool &  printed 
) const
protected

Check object in shared memory.

Distributed Object types

Check DO Header

bool coDistributedObject::checkObject ( ) const

Check object: return true if valid, false if not.

coDistributedObject * coDistributedObject::clone ( const coObjInfo newinfo) const
virtual coDistributedObject* covise::coDistributedObject::cloneObject ( const coObjInfo newinfo) const
protectedpure virtual
void coDistributedObject::copyAllAttributes ( const coDistributedObject src)

copy all attributes from src to this object

void coDistributedObject::copyObjInfo ( coObjInfo info) const
int covise::coDistributedObject::createFromShm ( coShmArray arr)
inlineprotected
const coDistributedObject * coDistributedObject::createFromShm ( const coObjInfo newinfo)
static

retrieve a data object from shm/dmgr by name/coObjInfo (replaces (new coDistributedObject(newinfo)->createUnknown())

const coDistributedObject * coDistributedObject::createUnknown ( coShmArray arr)
static
const coDistributedObject * coDistributedObject::createUnknown ( int  seg,
shmSizeType  offs 
)
static
const coDistributedObject * coDistributedObject::createUnknown ( ) const
int covise::coDistributedObject::decRefCount ( ) const
inline
int coDistributedObject::destroy ( )
int covise::coDistributedObject::get_type_no ( ) const
inline
int coDistributedObject::getAllAttributes ( const char ***  name,
const char ***  content 
) const

get all attributes

const char * coDistributedObject::getAttribute ( const char *  attr_name) const

get one attribute

char* covise::coDistributedObject::getName ( ) const
inline

get the object's name

int coDistributedObject::getNumAttributes ( ) const

get number of attributes

void coDistributedObject::getObjectFromShm ( )

Common function for all read-Constructors:

Virtual function call: calls class-specific routine

int coDistributedObject::getObjectInfo ( coDoInfo **  info_list) const
virtual int covise::coDistributedObject::getObjInfo ( int  ,
coDoInfo **   
) const
inlineprotectedvirtual
int covise::coDistributedObject::getRefCount ( ) const
inline
int coDistributedObject::getShmArray ( ) const
protected
void coDistributedObject::getShmLocation ( int &  shmSegNo,
shmSizeType offset 
) const

Get my location in shared memory.

const char* covise::coDistributedObject::getType ( ) const
inline

get the object's type

int covise::coDistributedObject::incRefCount ( ) const
inline
void coDistributedObject::init_header ( int *  size,
int *  no_of_allocs,
int  count,
data_type **  dt,
long **  ct 
)
int covise::coDistributedObject::isType ( const char *  reqType) const
inline

check whether this is a certain type

char * coDistributedObject::object_on_hosts ( ) const
bool covise::coDistributedObject::objectOk ( ) const
inline

check whether object was created or received ok

void covise::coDistributedObject::print ( void  ) const
inline
virtual int covise::coDistributedObject::rebuildFromShm ( )
protectedpure virtual
int coDistributedObject::restore_header ( int **  iptr,
int  count,
int *  shmarr_count,
int *  sn,
shmSizeType of 
)
int coDistributedObject::restore_shared_dl ( int  count,
covise_data_list dl 
)

if we call a c'tor without SHM array, this is not ok

int coDistributedObject::set_vconstr ( const char *  ,
coDistributedObject *)(coShmArray * 
)
static
void coDistributedObject::setType ( const char *  tname,
const char *  long_name 
)
int * coDistributedObject::store_header ( int  size,
int  no_of_allocs,
int  count,
int *  shmarr_count,
data_type dt,
long *  ct,
int **  idata 
)
int coDistributedObject::store_shared_dl ( int  count,
covise_data_list dl 
)
int coDistributedObject::update_shared_dl ( int  count,
covise_data_list dl 
)

Friends And Related Function Documentation

friend class ApplicationProcess
friend
friend class coShmArrayPtr
friend
void coShmPtrArray::set ( int  i,
const class coDistributedObject elem 
)
friend

Member Data Documentation

char* covise::coDistributedObject::attribs
mutableprotected
coStringShmArray* covise::coDistributedObject::attributes
protected
coDoHeader* covise::coDistributedObject::header
mutableprotected
int covise::coDistributedObject::loc_version
protected
char* covise::coDistributedObject::name
protected
bool covise::coDistributedObject::new_ok
protected
coIntShm covise::coDistributedObject::refcount
mutableprotected
coShmArray* covise::coDistributedObject::shmarr
mutableprotected
int covise::coDistributedObject::size
protected
char covise::coDistributedObject::type_name[7]
protected
int covise::coDistributedObject::type_no
protected
List< VirtualConstructor > * coDistributedObject::vconstr_list = NULL
staticprivate
coIntShm covise::coDistributedObject::version
protected
int coDistributedObject::xfer_arrays = 1
staticprivate

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