COVISE Core
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 *, covise::DataHandle &idata)
 
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 = nullptr
 
coDoHeaderheader = nullptr
 
char type_name [7]
 
int type_no = 0
 
char * name = nullptr
 
int loc_version = -1
 
bool new_ok
 
int size = 0
 
char * attribs = nullptr
 

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

◆ coDistributedObject() [1/4]

covise::coDistributedObject::coDistributedObject ( )
inline

◆ coDistributedObject() [2/4]

covise::coDistributedObject::coDistributedObject ( const coObjInfo info)
inline

◆ coDistributedObject() [3/4]

covise::coDistributedObject::coDistributedObject ( const coObjInfo info,
const char *  t 
)
inline

◆ coDistributedObject() [4/4]

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

◆ ~coDistributedObject()

coDistributedObject::~coDistributedObject ( )
virtual

Member Function Documentation

◆ access()

int coDistributedObject::access ( access_type  acc)

◆ addAttribute()

void coDistributedObject::addAttribute ( const char *  attr_name,
const char *  attr_val 
)

Attach an attribute to an object.

◆ addAttributes()

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

Attach multiple attributes to an object.

◆ calcType()

int coDistributedObject::calcType ( const char *  tname)
static

◆ calcTypeString()

char * coDistributedObject::calcTypeString ( int  tno)
static

◆ checkObj()

bool coDistributedObject::checkObj ( int  shmSegNo,
shmSizeType  shmOffs,
bool &  printed 
) const
protected

Check object in shared memory.

Distributed Object types

Check DO Header

◆ checkObject()

bool coDistributedObject::checkObject ( ) const

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

◆ clone()

coDistributedObject * coDistributedObject::clone ( const coObjInfo newinfo) const

◆ cloneObject()

virtual coDistributedObject * covise::coDistributedObject::cloneObject ( const coObjInfo newinfo) const
protectedpure virtual

◆ copyAllAttributes()

void coDistributedObject::copyAllAttributes ( const coDistributedObject src)

copy all attributes from src to this object

◆ copyObjInfo()

void coDistributedObject::copyObjInfo ( coObjInfo info) const

◆ createFromShm() [1/2]

const coDistributedObject * coDistributedObject::createFromShm ( const coObjInfo newinfo)
static

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

◆ createFromShm() [2/2]

int covise::coDistributedObject::createFromShm ( coShmArray arr)
inlineprotected

◆ createUnknown() [1/3]

const coDistributedObject * coDistributedObject::createUnknown ( ) const

◆ createUnknown() [2/3]

const coDistributedObject * coDistributedObject::createUnknown ( coShmArray arr)
static

◆ createUnknown() [3/3]

const coDistributedObject * coDistributedObject::createUnknown ( int  seg,
shmSizeType  offs 
)
static

◆ decRefCount()

int covise::coDistributedObject::decRefCount ( ) const
inline

◆ destroy()

int coDistributedObject::destroy ( )

◆ get_type_no()

int covise::coDistributedObject::get_type_no ( ) const
inline

◆ getAllAttributes()

int coDistributedObject::getAllAttributes ( const char ***  name,
const char ***  content 
) const

get all attributes

◆ getAttribute()

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

get one attribute

◆ getName()

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

get the object's name

◆ getNumAttributes()

int coDistributedObject::getNumAttributes ( ) const

get number of attributes

◆ getObjectFromShm()

void coDistributedObject::getObjectFromShm ( )

Common function for all read-Constructors:

Virtual function call: calls class-specific routine

◆ getObjectInfo()

int coDistributedObject::getObjectInfo ( coDoInfo **  info_list) const

◆ getObjInfo()

virtual int covise::coDistributedObject::getObjInfo ( int  ,
coDoInfo **   
) const
inlineprotectedvirtual

◆ getRefCount()

int covise::coDistributedObject::getRefCount ( ) const
inline

◆ getShmArray()

int coDistributedObject::getShmArray ( ) const
protected

◆ getShmLocation()

void coDistributedObject::getShmLocation ( int &  shmSegNo,
shmSizeType offset 
) const

Get my location in shared memory.

◆ getType()

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

get the object's type

◆ incRefCount()

int covise::coDistributedObject::incRefCount ( ) const
inline

◆ init_header()

void coDistributedObject::init_header ( int *  size,
int *  no_of_allocs,
int  count,
data_type **  dt,
long **  ct 
)

◆ isType()

int covise::coDistributedObject::isType ( const char *  reqType) const
inline

check whether this is a certain type

◆ object_on_hosts()

char * coDistributedObject::object_on_hosts ( ) const

◆ objectOk()

bool covise::coDistributedObject::objectOk ( ) const
inline

check whether object was created or received ok

◆ print()

void covise::coDistributedObject::print ( ) const
inline

◆ rebuildFromShm()

virtual int covise::coDistributedObject::rebuildFromShm ( )
protectedpure virtual

◆ restore_header()

int coDistributedObject::restore_header ( int **  iptr,
int  count,
int *  shmarr_count,
int *  sn,
shmSizeType of 
)

◆ restore_shared_dl()

int coDistributedObject::restore_shared_dl ( int  count,
covise_data_list dl 
)

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

◆ set_vconstr()

int coDistributedObject::set_vconstr ( const char *  ,
coDistributedObject *)(coShmArray * 
)
static

◆ setType()

void coDistributedObject::setType ( const char *  tname,
const char *  long_name 
)

◆ store_header()

int * coDistributedObject::store_header ( int  size,
int  no_of_allocs,
int  count,
int *  shmarr_count,
data_type dt,
long *  ct,
covise::DataHandle idata 
)

◆ store_shared_dl()

int coDistributedObject::store_shared_dl ( int  count,
covise_data_list dl 
)

◆ update_shared_dl()

int coDistributedObject::update_shared_dl ( int  count,
covise_data_list dl 
)

Friends And Related Function Documentation

◆ ApplicationProcess

friend class ApplicationProcess
friend

◆ coShmArrayPtr

friend class coShmArrayPtr
friend

◆ coShmPtrArray::set

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

Member Data Documentation

◆ attribs

char* covise::coDistributedObject::attribs = nullptr
mutableprotected

◆ attributes

coStringShmArray* covise::coDistributedObject::attributes = nullptr
protected

◆ header

coDoHeader* covise::coDistributedObject::header = nullptr
mutableprotected

◆ loc_version

int covise::coDistributedObject::loc_version = -1
protected

◆ name

char* covise::coDistributedObject::name = nullptr
protected

◆ new_ok

bool covise::coDistributedObject::new_ok
protected

◆ refcount

coIntShm covise::coDistributedObject::refcount
mutableprotected

◆ shmarr

coShmArray* covise::coDistributedObject::shmarr
mutableprotected

◆ size

int covise::coDistributedObject::size = 0
protected

◆ type_name

char covise::coDistributedObject::type_name[7]
protected

◆ type_no

int covise::coDistributedObject::type_no = 0
protected

◆ vconstr_list

List< VirtualConstructor > * coDistributedObject::vconstr_list = NULL
staticprivate

◆ version

coIntShm covise::coDistributedObject::version
protected

◆ xfer_arrays

int coDistributedObject::xfer_arrays = 1
staticprivate

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