SheafSystem
0.0.0.0
|
A partial multi-valued relation with total injective inverse between names and indices of type index_type. More...
#include <name_multimap.h>
Friends | |
SHEAF_DLL_SPEC size_t | deep_size (const name_multimap &xp, bool xinclude_shallow) |
The deep size of the referenced object of type name_multimap; if xinclude_shallow, add the sizeof xp to the result. More... | |
NAME_MULTIMAP FACET | |
typedef pod_index_type | index_type |
The type of the index in the map. More... | |
typedef std::pair< index_type, std::string > | entry_type |
The type of an entry in the map. More... | |
typedef std::list< std::string > | name_list_type |
The type of name list for this map. More... | |
typedef name_list_type::iterator | name_iterator |
The iterator type for names. More... | |
typedef name_list_type::const_iterator | const_name_iterator |
The const iterator type for names. More... | |
typedef std::map< index_type, name_list_type >::iterator | iterator |
The iterator type for this map. More... | |
typedef std::map< index_type, name_list_type >::const_iterator | const_iterator |
The const iterator type for this map. More... | |
name_multimap () | |
Default constructor. More... | |
name_multimap (const name_multimap &xother) | |
Copy constructor. More... | |
name_multimap (const std::string xnames[], size_type xnames_ub) | |
Copy constructor. More... | |
virtual | ~name_multimap () |
Destructor. More... | |
std::string | name (index_type xindex) const |
The primary (0-th) name associated with index xindex. More... | |
std::string | name (index_type xindex, int xi) const |
The xi-th name associated with index xindex. More... | |
const name_list_type & | all_names (index_type xindex) const |
All names associated with index xindex. More... | |
void | all_names (index_type xindex, block< std::string > &xresult) const |
All the names associated with xindex. More... | |
index_type | index (const std::string &xname) const |
The index associated with name xname. More... | |
void | put_entry (const entry_type &xentry, bool xunique) |
Sets (xindex, xname) as an entry in the map. If xunique, deletes all other entries for xindex. More... | |
void | put_entry (index_type xindex, const std::string &xname, bool xunique) |
Sets (xindex, xname) as an entry in the map. If xunique, deletes all other entries for xindex. More... | |
bool | contains_name (const std::string &xname) const |
True if this already contains an entry with name xname. More... | |
bool | contains_index (index_type xindex) const |
True if this already contains an entry with index xindex. More... | |
bool | contains_entry (const entry_type &xentry) const |
True if this already contains an entry equal to xentry. More... | |
bool | contains_entry (index_type xindex, const std::string &xname) const |
True if this already contains an entry equal to <xindex, xname>. More... | |
void | delete_index (index_type xindex) |
Removes all entires for index xindex. More... | |
void | delete_name (const std::string &xname) |
Removes the entry for name xname. More... | |
void | clear () |
Removes all entries. More... | |
bool | empty () const |
True if and only if the map contains no entries. More... | |
const_iterator | begin () const |
The initial value for iterators over this map. More... | |
const_iterator | end () const |
The final value for iterators over this map. More... | |
int | ct () const |
The number of index values in the map. More... | |
void | print () const |
Prints the data members of this on cout. Intended for use debugging. More... | |
void | print (std::ostream &xos, const name_multimap &xm) const |
Prints the data members of xm on stream xos. Intended for use debugging. More... | |
size_type | name_ct (const index_type &xindex) const |
The number of names associated with key xindex. More... | |
ANY FACET | |
virtual name_multimap * | clone () const |
Virtual constructor; makes a new instance of the same type as this. More... | |
virtual bool | invariant () const |
Class invariant. More... | |
virtual bool | is_ancestor_of (const any *other) const |
Conformance test; true if other conforms to this. More... | |
bool | operator== (const name_multimap &xother) |
Equality test; true if other has the same contents as this. More... | |
name_multimap & | operator= (const name_multimap &xother) |
Assignment operator; make this a copy of xother. More... | |
Additional Inherited Members | |
Public Member Functions inherited from sheaf::any | |
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... | |
Protected Member Functions inherited from sheaf::any | |
any () | |
default constructor More... | |
A partial multi-valued relation with total injective inverse between names and indices of type index_type.
Definition at line 63 of file name_multimap.h.
typedef std::map<index_type, name_list_type >::const_iterator sheaf::name_multimap::const_iterator |
The const iterator type for this map.
Definition at line 107 of file name_multimap.h.
typedef name_list_type::const_iterator sheaf::name_multimap::const_name_iterator |
The const iterator type for names.
Definition at line 97 of file name_multimap.h.
typedef std::pair<index_type, std::string> sheaf::name_multimap::entry_type |
The type of an entry in the map.
Definition at line 82 of file name_multimap.h.
The type of the index in the map.
Definition at line 77 of file name_multimap.h.
typedef std::map<index_type, name_list_type >::iterator sheaf::name_multimap::iterator |
The iterator type for this map.
Definition at line 102 of file name_multimap.h.
typedef name_list_type::iterator sheaf::name_multimap::name_iterator |
The iterator type for names.
Definition at line 92 of file name_multimap.h.
typedef std::list<std::string> sheaf::name_multimap::name_list_type |
The type of name list for this map.
Definition at line 87 of file name_multimap.h.
sheaf::name_multimap::name_multimap | ( | ) |
Default constructor.
Definition at line 36 of file name_multimap.cc.
Referenced by name_multimap().
sheaf::name_multimap::name_multimap | ( | const name_multimap & | xother | ) |
Copy constructor.
Definition at line 54 of file name_multimap.cc.
References name_multimap().
sheaf::name_multimap::name_multimap | ( | const std::string | xnames[], |
size_type | xnames_ub | ||
) |
Copy constructor.
Definition at line 73 of file name_multimap.cc.
References ~name_multimap().
|
virtual |
Destructor.
Definition at line 99 of file name_multimap.cc.
References name().
Referenced by name_multimap().
const sheaf::name_multimap::name_list_type & sheaf::name_multimap::all_names | ( | index_type | xindex | ) | const |
All names associated with index xindex.
Definition at line 185 of file name_multimap.cc.
Referenced by sheaf::member_record::internalize(), name(), and sheaf::operator<<().
void sheaf::name_multimap::all_names | ( | index_type | xindex, |
block< std::string > & | xresult | ||
) | const |
All the names associated with xindex.
Definition at line 207 of file name_multimap.cc.
References sheaf::auto_block< T, S >::ct(), index(), sheaf::auto_block< T, S >::push_back(), sheaf::auto_block< T, S >::reserve(), and sheaf::auto_block< T, S >::set_ct().
sheaf::name_multimap::const_iterator sheaf::name_multimap::begin | ( | ) | const |
The initial value for iterators over this map.
Definition at line 539 of file name_multimap.cc.
References end().
Referenced by empty(), print(), sheaf::poset_scaffold::put_member_names_to_poset(), and sheaf::member_names_record::transfer_poset_to_internal_buffer().
void sheaf::name_multimap::clear | ( | ) |
Removes all entries.
Definition at line 491 of file name_multimap.cc.
References empty().
Referenced by delete_name(), sheaf::poset_scaffold::get_member_names_from_poset(), and sheaf::poset_scaffold::put_member_names_to_poset().
|
virtual |
Virtual constructor; makes a new instance of the same type as this.
Reimplemented from sheaf::any.
Definition at line 616 of file name_multimap.cc.
References invariant().
Referenced by name_ct().
bool sheaf::name_multimap::contains_entry | ( | const entry_type & | xentry | ) | const |
True if this already contains an entry equal to xentry.
Definition at line 387 of file name_multimap.cc.
References delete_index().
Referenced by contains_entry(), and contains_index().
bool sheaf::name_multimap::contains_entry | ( | index_type | xindex, |
const std::string & | xname | ||
) | const |
True if this already contains an entry equal to <xindex, xname>.
Definition at line 364 of file name_multimap.cc.
References contains_entry().
bool sheaf::name_multimap::contains_index | ( | index_type | xindex | ) | const |
True if this already contains an entry with index xindex.
Definition at line 349 of file name_multimap.cc.
References contains_entry().
Referenced by contains_name(), and sheaf::index_space_family::delete_state().
bool sheaf::name_multimap::contains_name | ( | const std::string & | xname | ) | const |
True if this already contains an entry with name xname.
Definition at line 328 of file name_multimap.cc.
References contains_index().
Referenced by sheaf::index_space_family::delete_space(), and put_entry().
int sheaf::name_multimap::ct | ( | ) | const |
The number of index values in the map.
Definition at line 553 of file name_multimap.cc.
References print().
Referenced by end().
void sheaf::name_multimap::delete_index | ( | index_type | xindex | ) |
Removes all entires for index xindex.
Definition at line 408 of file name_multimap.cc.
References delete_name().
Referenced by contains_entry(), sheaf::index_space_family::delete_state(), and sheaf::poset_scaffold::put_member_names_to_poset().
void sheaf::name_multimap::delete_name | ( | const std::string & | xname | ) |
Removes the entry for name xname.
Definition at line 438 of file name_multimap.cc.
References clear().
Referenced by delete_index().
bool sheaf::name_multimap::empty | ( | ) | const |
True if and only if the map contains no entries.
Definition at line 515 of file name_multimap.cc.
References begin().
Referenced by clear().
sheaf::name_multimap::const_iterator sheaf::name_multimap::end | ( | ) | const |
The final value for iterators over this map.
Definition at line 546 of file name_multimap.cc.
References ct().
Referenced by begin(), print(), sheaf::poset_scaffold::put_member_names_to_poset(), and sheaf::member_names_record::transfer_poset_to_internal_buffer().
sheaf::name_multimap::index_type sheaf::name_multimap::index | ( | const std::string & | xname | ) | const |
The index associated with name xname.
Definition at line 234 of file name_multimap.cc.
References sheaf::invalid_pod_index(), sheaf::is_valid(), and put_entry().
Referenced by all_names(), sheaf::index_space_family::begin(), sheaf::index_space_family::contains(), sheaf::index_space_family::contains_glued_hub(), sheaf::index_space_family::contains_unglued_hub(), sheaf::index_space_family::ct(), sheaf::index_space_family::delete_product_structure(), sheaf::index_space_family::delete_space(), sheaf::index_space_family::end(), sheaf::index_space_family::get_id_space(), sheaf::index_space_family::get_id_space_iterator(), sheaf::index_space_family::glued_hub_pod(), sheaf::index_space_family::has_product_structure(), sheaf::index_space_family::hub_begin(), sheaf::index_space_family::index(), sheaf::index_space_family::is_empty(), sheaf::index_space_family::is_gathered(), sheaf::index_space_family::is_persistent(), sheaf::index_space_family::new_product_structure(), sheaf::index_space_family::pod(), sheaf::index_space_family::product_structure(), and sheaf::index_space_family::unglued_hub_pod().
|
virtual |
Class invariant.
Reimplemented from sheaf::any.
Definition at line 638 of file name_multimap.cc.
References is_ancestor_of().
Referenced by clone().
|
virtual |
Conformance test; true if other conforms to this.
Reimplemented from sheaf::any.
Definition at line 672 of file name_multimap.cc.
References operator==().
Referenced by invariant().
std::string sheaf::name_multimap::name | ( | index_type | xindex | ) | const |
The primary (0-th) name associated with index xindex.
Definition at line 116 of file name_multimap.cc.
Referenced by fields::field_vd::embed_property(), sheaf::index_space_family::name(), and ~name_multimap().
std::string sheaf::name_multimap::name | ( | index_type | xindex, |
int | xi | ||
) | const |
The xi-th name associated with index xindex.
Definition at line 152 of file name_multimap.cc.
References all_names().
sheaf::size_type sheaf::name_multimap::name_ct | ( | const index_type & | xindex | ) | const |
The number of names associated with key xindex.
Definition at line 598 of file name_multimap.cc.
References clone().
Referenced by print().
sheaf::name_multimap & sheaf::name_multimap::operator= | ( | const name_multimap & | xother | ) |
Assignment operator; make this a copy of xother.
Definition at line 711 of file name_multimap.cc.
References sheaf::operator<<().
Referenced by operator==().
bool sheaf::name_multimap::operator== | ( | const name_multimap & | xother | ) |
Equality test; true if other has the same contents as this.
Definition at line 692 of file name_multimap.cc.
References operator=().
Referenced by is_ancestor_of().
void sheaf::name_multimap::print | ( | ) | const |
Prints the data members of this on cout. Intended for use debugging.
Definition at line 560 of file name_multimap.cc.
Referenced by ct(), and sheaf::operator<<().
void sheaf::name_multimap::print | ( | std::ostream & | xos, |
const name_multimap & | xm | ||
) | const |
Prints the data members of xm on stream xos. Intended for use debugging.
Definition at line 567 of file name_multimap.cc.
void sheaf::name_multimap::put_entry | ( | const entry_type & | xentry, |
bool | xunique | ||
) |
Sets (xindex, xname) as an entry in the map. If xunique, deletes all other entries for xindex.
Definition at line 276 of file name_multimap.cc.
Referenced by sheaf::member_record::externalize(), index(), sheaf::index_space_family::put_name(), and sheaf::member_names_record::transfer_internal_buffer_to_poset().
void sheaf::name_multimap::put_entry | ( | index_type | xindex, |
const std::string & | xname, | ||
bool | xunique | ||
) |
Sets (xindex, xname) as an entry in the map. If xunique, deletes all other entries for xindex.
Definition at line 305 of file name_multimap.cc.
References contains_name().
|
friend |
The deep size of the referenced object of type name_multimap; if xinclude_shallow, add the sizeof xp to the result.