SheafSystem
0.0.0.0
|
A map from schema poset member ids to dof values for namespace_poset members. More...
#include <namespace_poset_dof_map.h>
Public Member Functions | |
virtual const std::string & | class_name () const |
The name of the actual (possibly derived) class of this instance. More... | |
namespace_poset_dof_map () | |
Default constructor. More... | |
virtual namespace_poset_dof_map * | clone () const |
Virtual default constructor. More... | |
namespace_poset_dof_map (const namespace_poset_dof_map &xother) | |
Copy constructor. More... | |
virtual namespace_poset_dof_map * | copy () const |
Virtual copy constructor. More... | |
namespace_poset_dof_map & | operator= (const namespace_poset_dof_map &xother) |
Assignment operator. More... | |
virtual | ~namespace_poset_dof_map () |
Destructor. More... | |
virtual bool | invariant () const |
The class invariant. More... | |
namespace_poset_dof_map (const namespace_poset *xhost) | |
Creates a row dof map for xhost. Must be attached to a member (row) using put_index() before use. More... | |
virtual dof_tuple_type | type_id () const |
An identifer for the type of dof tuple this is. More... | |
virtual void | get_dof (pod_index_type xdof_id, void *xdof, size_type xdof_size) const |
Copies the dof referred to by xdof_id into xdof. More... | |
virtual void | put_dof (pod_index_type xdof_id, const void *xdof, size_type xdof_size) |
Sets the dof referred to by xdof_id to the value at xdof. More... | |
virtual void * | dof_tuple () |
The dof tuple (mutable version). More... | |
virtual const void * | dof_tuple () const |
The dof tuple (const version). More... | |
virtual void | get_dof_tuple (void *xbuf, size_t xbuflen) const |
Copies the entire dof tuple from xbuf into internal storage. More... | |
virtual void | put_dof_tuple (const void *xbuf, size_t xbuflen) |
Copies the entire dof tuple from xbuf into internal storage. More... | |
poset_state_handle * | poset_pointer () const |
The pointer to the poset associated with this namespace member. More... | |
poset_type | poset_type_id () const |
The type id of the poset associated with this namespace member. More... | |
const char * | poset_class () const |
The class of the poset associated with this namespace member. More... | |
int | poset_prereq_id (int xi) const |
The id of the xi-th prerequisite poset for the poset associated with this namespace member. More... | |
void | extend_to_top () |
Extends the schema from member io to member top. /. More... | |
Public Member Functions inherited from sheaf::poset_dof_map | |
poset_dof_map & | operator= (const poset_dof_map &xother) |
Assignment operator. More... | |
virtual | ~poset_dof_map () |
Destructor. More... | |
virtual void | init_row_dof_map (const poset_state_handle *xhost, pod_index_type xschema_mbr_id, int xschema_version) |
Initializes this as a map for row dofs in host xhost, with schema member specified by xschema_mbr_id and schema version xschema_version. More... | |
void | init_row_dof_map (const poset_state_handle *xhost, const scoped_index &xschema_mbr_id, int xschema_version) |
Initializes this as a map for row dofs in host xhost, with schema member specified by xschema_mbr_id and schema version xschema_version. More... | |
bool | is_initialized () const |
True if this has been initialized, that is, if the schema has been set and the dof map storage allocated. More... | |
virtual poset_state_handle * | host () const |
The poset which owns this. More... | |
const scoped_index & | index () const |
The index of this in host() dof tuple table. More... | |
virtual schema_poset_member & | schema () |
The schema on which this is allocated (mutable version). More... | |
virtual const schema_poset_member & | schema () const |
The schema on which this is allocated (const version). More... | |
bool | is_table_dof_map () const |
True if this is a table dof map. More... | |
int | dof_ct () const |
The number of dofs in this map. More... | |
primitive_value | dof (pod_index_type xdof_id) const |
The dof referred to by xdof_id. More... | |
primitive_value | dof (const scoped_index &xdof_id) const |
The dof referred to by xdof_id. More... | |
primitive_value | dof (const std::string &xname) const |
The dof with name xname. More... | |
void | put_dof (pod_index_type xdof_id, const primitive_value &xdof) |
Sets the dof referred to by xdof_id to xdof. More... | |
void | put_dof (const scoped_index &xdof_id, const primitive_value &xdof) |
Sets the dof referred to by xdof_id to xdof. More... | |
void | put_dof (const std::string &xname, const primitive_value &xdof) |
Sets the dof with name xname to xdof. More... | |
void | get_dof (const scoped_index &xdof_id, void *xdof, size_type xdof_size) const |
Copies the dof referred to by xdof_id into xdof. More... | |
void | put_dof (const scoped_index &xdof_id, const void *xdof, size_type xdof_size) |
Sets the dof referred to by xdof_id to the value at xdof. More... | |
size_t | dof_tuple_ub () const |
The size of the dof tuple in bytes. More... | |
void | get_dof_tuple (arg_list &xargs) const |
Copies the entire dof tuple from internal storage into xargs. More... | |
void | put_dof_tuple (const arg_list &xargs) |
Copies the entire dof tuple from xargs into internal storage. More... | |
void | copy_dof_tuple (const poset_dof_map &xother) |
Copies the dof tuple of xother into this. More... | |
virtual void | put_defaults () |
Sets all dofs to defualt values. More... | |
unsigned int | ref_ct () const |
The number of references to this map. More... | |
void | inc_ref_ct () |
Increase the number of references to this map by one;. More... | |
void | dec_ref_ct () |
Decrease the number of references to this map by one. More... | |
int | version () const |
The version of the host of the schema this is defined on. More... | |
virtual const index_space_handle & | client_id_space () const |
The map from library ids to clients ids for the schema this is defined on. More... | |
std::string | to_string (const schema_poset_member &xschema) const |
Return schema member dof value as a string. More... | |
std::string | to_string () const |
Return dof values as a formated string. More... | |
virtual bool | supports_xfr_opt () const |
True if this dof map type supports dof tuple transfer optimization. /. More... | |
Public Member Functions inherited from sheaf::any | |
virtual bool | is_ancestor_of (const any *other) const |
True if other conforms to this. More... | |
bool | is_same_type (const any *other) const |
True if other is the same type as this. More... | |
virtual | ~any () |
Destructor. More... | |
bool | invariant_check () const |
True if invariant checking is enabled. More... | |
void | enable_invariant_check () const |
Enable invariant checking. More... | |
void | disable_invariant_check () const |
Disable invariant check. Intended for preventing recursive calls to invariant and for suppressing invariant checking during multi-phase initialization. More... | |
int | disable_invariance_check_request_depth () const |
Number of times disable_invariant_check has been called without matching call to enable_invariant_check. More... | |
Static Public Member Functions | |
static const std::string & | static_class_name () |
The name of this class. More... | |
Static Public Member Functions inherited from sheaf::poset_dof_map | |
static const std::string & | static_class_name () |
The name of this class. More... | |
static poset_dof_map * | new_dof_map (const std::string &xclass_name, dof_tuple_type xsheaf_base_class_id) |
Creates an uninitialized dof map of type xclass_name, if a prototype of that name exists, otherwise of type xsheaf_base_class_id. More... | |
Protected Member Functions | |
void | put_poset_pointer (const poset_state_handle *xposet) |
Set the pointer to the poset associated with this namespace member to xposet. More... | |
void | put_poset_type_id (poset_type xtype_id) |
Set the type id of the poset associated with this namespace member to xtype_id. More... | |
void | put_poset_class (const char *xclass) |
Set the class of the poset associated with this namespace member to xclass. More... | |
void | put_poset_prereq_id (int xi, int xid) |
Set the id of the xi-th prerequisite poset for the poset associated with this namespace member. More... | |
virtual void | allocate_dofs () |
Allocates dof storage. More... | |
Protected Member Functions inherited from sheaf::poset_dof_map | |
poset_dof_map () | |
Default constructor;. More... | |
poset_dof_map (const poset_dof_map &xother) | |
Copy constructor. More... | |
poset_dof_map (const poset_state_handle *xhost, bool xis_table_dof_map) | |
Creates a map for the table dofs (xis_table_dofs true) or row dofs (xis_table dofs false) for use in host xhost. More... | |
poset_dof_map (const schema_poset_member *xschema, bool xis_table_dof_map) | |
Creates a map for the table dofs (xis_table_dofs true) or row dofs (xis_table dofs false) for use in host xhost. More... | |
virtual void | put_host (const poset_state_handle *xhost) |
Sets host() to xhost. More... | |
void | put_index (const scoped_index &xindex) |
Sets the index of the member for which this provides the dofs. More... | |
void | put_dof_ct (int xdof_ct) |
Sets dof_ct() to xdof_ct. More... | |
void | put_dof_tuple_ub (size_t xub) |
Sets dof_tuple_ub() to xub. More... | |
void | put_ref_ct (int xref_ct) |
Sets ref_ct() to xref_ct). More... | |
Protected Member Functions inherited from sheaf::any | |
any () | |
default constructor More... | |
Friends | |
class | poset_state_handle |
class | namespace_poset |
class | namespace_poset_member |
Additional Inherited Members | |
Static Protected Member Functions inherited from sheaf::poset_dof_map | |
static dof_map_factory & | factory () |
The dof map factory. More... | |
Protected Attributes inherited from sheaf::poset_dof_map | |
poset_state_handle * | _host |
The host of the poset member for which this stores the dofs. More... | |
scoped_index | _index |
The poset member for which this stores the dofs. More... | |
schema_poset_member * | _schema |
The schema on which this is instantiated. More... | |
bool | _is_table_dof_map |
True if this is a table dof map. More... | |
int | _dof_ct |
The number of dofs in this map. More... | |
size_t | _dof_tuple_ub |
The size of the dof tuple. More... | |
unsigned int | _ref_ct |
The number of references to this map /. More... | |
A map from schema poset member ids to dof values for namespace_poset members.
Definition at line 49 of file namespace_poset_dof_map.h.
sheaf::namespace_poset_dof_map::namespace_poset_dof_map | ( | ) |
Default constructor.
Definition at line 80 of file namespace_poset_dof_map.cc.
References sheaf::poset_dof_map::_dof_ct, sheaf::poset_dof_map::_dof_tuple_ub, clone(), sheaf::poset_dof_map::dof_ct(), sheaf::poset_dof_map::host(), sheaf::poset_dof_map::index(), sheaf::invalid_pod_index(), sheaf::poset_dof_map::is_initialized(), sheaf::poset_dof_map::is_table_dof_map(), sheaf::is_valid(), sheaf::NAMESPACE_SCHEMA_DOF_CT, poset_class(), poset_pointer(), poset_prereq_id(), poset_type_id(), sheaf::PREREQ_IDS_UB, sheaf::poset_dof_map::ref_ct(), and sheaf::auto_block< T, S >::reserve().
Referenced by allocate_dofs(), clone(), copy(), invariant(), and static_class_name().
sheaf::namespace_poset_dof_map::namespace_poset_dof_map | ( | const namespace_poset_dof_map & | xother | ) |
Copy constructor.
Definition at line 152 of file namespace_poset_dof_map.cc.
References copy().
|
virtual |
Destructor.
Definition at line 216 of file namespace_poset_dof_map.cc.
References invariant().
Referenced by operator=().
sheaf::namespace_poset_dof_map::namespace_poset_dof_map | ( | const namespace_poset * | xhost | ) |
Creates a row dof map for xhost. Must be attached to a member (row) using put_index() before use.
Definition at line 260 of file namespace_poset_dof_map.cc.
References sheaf::poset_dof_map::client_id_space(), sheaf::poset_dof_map::dof_ct(), get_dof(), sheaf::poset_dof_map::host(), sheaf::poset_dof_map::index(), sheaf::invalid_pod_index(), sheaf::is_valid(), sheaf::NAMESPACE_SCHEMA_DOF_CT, poset_class(), poset_pointer(), poset_prereq_id(), poset_type_id(), sheaf::PREREQ_IDS_UB, sheaf::poset_dof_map::ref_ct(), and sheaf::auto_block< T, S >::reserve().
|
protectedvirtual |
Allocates dof storage.
Implements sheaf::poset_dof_map.
Definition at line 727 of file namespace_poset_dof_map.cc.
References sheaf::poset_dof_map::_host, sheaf::poset_dof_map::_is_table_dof_map, sheaf::auto_block< T, S >::clear(), sheaf::schema_poset_member::dof_id_space(), sheaf::poset_dof_map::factory(), sheaf::index_space_handle::get_iterator(), sheaf::index_space_iterator::hub_pod(), sheaf::dof_map_factory::insert_prototype(), sheaf::index_space_iterator::is_done(), namespace_poset_dof_map(), sheaf::index_space_iterator::next(), sheaf::index_space_iterator::pod(), sheaf::index_space_handle::pod(), sheaf::index_space_handle::release_iterator(), sheaf::poset_dof_map::schema(), sheaf::abstract_poset_member::schema(), and sheaf::poset_state_handle::top().
Referenced by put_poset_prereq_id().
|
virtual |
The name of the actual (possibly derived) class of this instance.
Reimplemented from sheaf::poset_dof_map.
Definition at line 40 of file namespace_poset_dof_map.cc.
References static_class_name().
|
virtual |
Virtual default constructor.
Implements sheaf::poset_dof_map.
Definition at line 127 of file namespace_poset_dof_map.cc.
References sheaf::any::is_same_type(), and namespace_poset_dof_map().
Referenced by namespace_poset_dof_map().
|
virtual |
Virtual copy constructor.
Implements sheaf::poset_dof_map.
Definition at line 170 of file namespace_poset_dof_map.cc.
References sheaf::any::is_same_type(), namespace_poset_dof_map(), and operator=().
Referenced by namespace_poset_dof_map().
|
virtual |
The dof tuple (mutable version).
Implements sheaf::poset_dof_map.
Definition at line 430 of file namespace_poset_dof_map.cc.
References invariant().
Referenced by put_dof().
|
virtual |
The dof tuple (const version).
Implements sheaf::poset_dof_map.
Definition at line 451 of file namespace_poset_dof_map.cc.
References get_dof_tuple(), and invariant().
void sheaf::namespace_poset_dof_map::extend_to_top | ( | ) |
Extends the schema from member io to member top. /.
Definition at line 612 of file namespace_poset_dof_map.cc.
References sheaf::poset_dof_map::_dof_ct, sheaf::poset_dof_map::_dof_tuple_ub, sheaf::poset_dof_map::_schema, sheaf::abstract_poset_member::attach_to_state(), sheaf::auto_block< T, S >::clear(), sheaf::NAMESPACE_SCHEMA_DOF_CT, put_poset_pointer(), sheaf::schema_poset_member::row_dof_ct(), and sheaf::schema_poset_member::row_dof_tuple_ub().
Referenced by poset_prereq_id().
|
virtual |
Copies the dof referred to by xdof_id into xdof.
Reimplemented from sheaf::poset_dof_map.
Definition at line 313 of file namespace_poset_dof_map.cc.
References sheaf::poset_dof_map::is_table_dof_map(), put_dof(), and sheaf::poset_dof_map::schema().
Referenced by namespace_poset_dof_map().
|
virtual |
Copies the entire dof tuple from xbuf into internal storage.
Implements sheaf::poset_dof_map.
Definition at line 472 of file namespace_poset_dof_map.cc.
References sheaf::poset_dof_map::dof(), put_dof_tuple(), and sheaf::tuple().
Referenced by dof_tuple().
|
virtual |
The class invariant.
Reimplemented from sheaf::poset_dof_map.
Definition at line 229 of file namespace_poset_dof_map.cc.
References sheaf::any::disable_invariant_check(), sheaf::any::enable_invariant_check(), sheaf::poset_dof_map::invariant(), sheaf::any::invariant_check(), and namespace_poset_dof_map().
Referenced by dof_tuple(), and ~namespace_poset_dof_map().
sheaf::namespace_poset_dof_map & sheaf::namespace_poset_dof_map::operator= | ( | const namespace_poset_dof_map & | xother | ) |
Assignment operator.
Definition at line 195 of file namespace_poset_dof_map.cc.
References sheaf::poset_dof_map::is_initialized(), sheaf::poset_dof_map::operator=(), and ~namespace_poset_dof_map().
Referenced by copy().
const char * sheaf::namespace_poset_dof_map::poset_class | ( | ) | const |
The class of the poset associated with this namespace member.
Definition at line 560 of file namespace_poset_dof_map.cc.
References poset_prereq_id().
Referenced by namespace_poset_dof_map(), sheaf::namespace_poset_member::poset_class(), poset_type_id(), and put_poset_class().
sheaf::poset_state_handle * sheaf::namespace_poset_dof_map::poset_pointer | ( | ) | const |
The pointer to the poset associated with this namespace member.
Definition at line 520 of file namespace_poset_dof_map.cc.
References poset_type_id().
Referenced by sheaf::poset_state_handle::attach_to_state(), sheaf::namespace_poset::member_poset(), namespace_poset_dof_map(), sheaf::namespace_poset_member::poset_pointer(), put_dof_tuple(), and put_poset_pointer().
int sheaf::namespace_poset_dof_map::poset_prereq_id | ( | int | xi | ) | const |
The id of the xi-th prerequisite poset for the poset associated with this namespace member.
Definition at line 579 of file namespace_poset_dof_map.cc.
References extend_to_top(), sheaf::invalid_pod_index(), and sheaf::PREREQ_IDS_UB.
Referenced by namespace_poset_dof_map(), poset_class(), sheaf::namespace_poset_member::poset_prereq_id(), and put_poset_prereq_id().
sheaf::poset_type sheaf::namespace_poset_dof_map::poset_type_id | ( | ) | const |
The type id of the poset associated with this namespace member.
Definition at line 540 of file namespace_poset_dof_map.cc.
References poset_class(), and sheaf::poset_type_id().
Referenced by namespace_poset_dof_map(), poset_pointer(), sheaf::namespace_poset_member::poset_type_id(), and put_poset_type_id().
|
virtual |
Sets the dof referred to by xdof_id to the value at xdof.
Reimplemented from sheaf::poset_dof_map.
Definition at line 368 of file namespace_poset_dof_map.cc.
References dof_tuple(), sheaf::poset_dof_map::is_table_dof_map(), and sheaf::poset_dof_map::schema().
Referenced by get_dof().
|
virtual |
Copies the entire dof tuple from xbuf into internal storage.
Implements sheaf::poset_dof_map.
Definition at line 496 of file namespace_poset_dof_map.cc.
References sheaf::poset_dof_map::dof(), poset_pointer(), and sheaf::tuple().
Referenced by get_dof_tuple().
|
protected |
Set the class of the poset associated with this namespace member to xclass.
Definition at line 679 of file namespace_poset_dof_map.cc.
References poset_class(), and put_poset_prereq_id().
Referenced by sheaf::namespace_poset_member::put_poset_class(), and put_poset_type_id().
|
protected |
Set the pointer to the poset associated with this namespace member to xposet.
Definition at line 640 of file namespace_poset_dof_map.cc.
References poset_pointer(), and put_poset_type_id().
Referenced by sheaf::poset_state_handle::attach_to_state(), extend_to_top(), and sheaf::namespace_poset_member::put_poset_pointer().
|
protected |
Set the id of the xi-th prerequisite poset for the poset associated with this namespace member.
Definition at line 698 of file namespace_poset_dof_map.cc.
References allocate_dofs(), sheaf::invalid_pod_index(), sheaf::is_valid(), poset_prereq_id(), and sheaf::PREREQ_IDS_UB.
Referenced by put_poset_class(), and sheaf::namespace_poset_member::put_poset_prereq_id().
|
protected |
Set the type id of the poset associated with this namespace member to xtype_id.
Definition at line 660 of file namespace_poset_dof_map.cc.
References poset_type_id(), and put_poset_class().
Referenced by put_poset_pointer(), and sheaf::namespace_poset_member::put_poset_type_id().
|
static |
The name of this class.
Definition at line 59 of file namespace_poset_dof_map.cc.
References namespace_poset_dof_map().
Referenced by class_name().
|
inlinevirtual |
An identifer for the type of dof tuple this is.
Implements sheaf::poset_dof_map.
Definition at line 118 of file namespace_poset_dof_map.h.
References sheaf::poset_dof_map::get_dof(), sheaf::poset_type_id(), and sheaf::poset_dof_map::put_dof().