SheafSystem
0.0.0.0
|
Abstract object wrapper for an instance of a primitive type. More...
#include <primitive_value.h>
Public Member Functions | |
primitive_value () | |
Default constructor. More... | |
primitive_value (const primitive_value &xother) | |
Copy constructor. More... | |
primitive_value (primitive_type xid) | |
Creates a new primitive value of the type associated with xid and default value. More... | |
primitive_value (pod_index_type xid, void *xvalue_ptr) | |
Creates a new primitive value of the type associated with xid and value pointed to by xvalue_ptr. More... | |
primitive_value (const void *x) | |
Conversion from pointer; creates a new primitive value of type VOID_STAR with value x. More... | |
primitive_value (const char *x) | |
Conversion from C string; creates a new primitive value of type C_STRING with value x. More... | |
primitive_value (const std::string &x) | |
Conversion from string; creates a new primitive value of type C_STRING with value x. More... | |
primitive_value (const scoped_index &x) | |
Conversion from scoped_index; creates a new primitive value of type POD_INDEX_TYPE with value x. More... | |
primitive_value (const namespace_relative_member_index &x) | |
Conversion from namespace_relative_member_index; creates a new primitive value of type NAMESPACE_RELATIVE_MEMBER_INDEX with value x. More... | |
primitive_value (const namespace_relative_subposet_index &x) | |
Conversion from namespace_relative_subposet_index; creates a new primitive value of type NAMESPACE_RELATIVE_SUBPOSET_INDEX with value x. More... | |
primitive_value (const bool &x) | |
Conversion from bool; creates a new primitive value of type BOOL with value x. More... | |
primitive_value (const char &x) | |
Conversion from char; creates a new primitive value of type CHAR with value x. More... | |
primitive_value (const signed char &x) | |
Conversion from signed char; creates a new primitive value of type SIGNED_CHAR with value x. More... | |
primitive_value (const short int &x) | |
Conversion from short int; creates a new primitive value of type SHORT_INT with value x. More... | |
primitive_value (const int &x) | |
Conversion from int; creates a new primitive value of type INT with value x. More... | |
primitive_value (const long int &x) | |
Conversion from long int; creates a new primitive value of type LONG_INT with value x. More... | |
primitive_value (const long long int &x) | |
Conversion from long long int; creates a new primitive value of type LONG_LONG_INT with value x. More... | |
primitive_value (const unsigned char &x) | |
Conversion from unsigned char; creates a new primitive value of type UNSIGNED_CHAR with value x. More... | |
primitive_value (const unsigned short int &x) | |
Conversion from unsigned short int; creates a new primitive value of type UNSIGNED_SHORT_INT with value x. More... | |
primitive_value (const unsigned int &x) | |
Conversion from unsigned int; creates a new primitive value of type UNSIGNED_INT with value x. More... | |
primitive_value (const unsigned long int &x) | |
Conversion from unsigned long int; creates a new primitive value of type UNSIGNED_LONG_INT with value x. More... | |
primitive_value (const unsigned long long int &x) | |
Conversion from unsigned long long int; creates a new primitive value of type UNSIGNED_LONG_LONG_INT with value x. More... | |
primitive_value (const float &x) | |
Conversion from float; creates a new primitive value of type FLOAT with value x. More... | |
primitive_value (const double &x) | |
Conversion from double; creates a new primitive value of type DOUBLE with value x. More... | |
primitive_value (const long double &x) | |
Conversion from long double; creates a new primitive value of type LONG_DOUBLE with value x. More... | |
primitive_value (const namespace_relative_member_index_pod_type &x) | |
Conversion from namespace_relative_member_index_pod_type; creates a new primitive value of type NAMESPACE_RELATIVE_MEMBER_INDEX_POD_TYPE with value x. More... | |
primitive_value (const namespace_relative_subposet_index_pod_type &x) | |
Conversion from namespace_relative_subposet_index_pod_type; creates a new primitive value of type NAMESPACE_RELATIVE_SUBPOSET_INDEX_POD_TYPE with value x. More... | |
primitive_value & | operator= (const primitive_value &x) |
Copy assignment. More... | |
primitive_value & | operator= (void *x) |
Assignment from pointer. More... | |
primitive_value & | operator= (const void *x) |
Assignment from pointer. More... | |
primitive_value & | operator= (char *x) |
Assignment from C string. More... | |
primitive_value & | operator= (const char *x) |
Assignment from C string. More... | |
template<typename T > | |
primitive_value & | operator= (const T &x) |
Assignment from primitive of type T. More... | |
operator bool () const | |
Conversion to bool. More... | |
operator char () const | |
Conversion to char. More... | |
operator signed char () const | |
Conversion to signed char. More... | |
operator short int () const | |
Conversion to short int. More... | |
operator int () const | |
Conversion to int. More... | |
operator long int () const | |
Conversion to long int. More... | |
operator long long int () const | |
Conversion to long long int. More... | |
operator unsigned char () const | |
Conversion to unsigned char. More... | |
operator unsigned short int () const | |
Conversion to unsigned short int. More... | |
operator unsigned int () const | |
Conversion to unsigned int. More... | |
operator unsigned long int () const | |
Conversion to unsigned long int. More... | |
operator unsigned long long int () const | |
Conversion to unsigned long long int. More... | |
operator float () const | |
Conversion to float. More... | |
operator double () const | |
Conversion to double. More... | |
operator long double () const | |
Conversion to long double. More... | |
operator void * () const | |
Conversion to void*. More... | |
operator char * () const | |
Conversion to char*. More... | |
operator namespace_relative_member_index_pod_type () const | |
Conversion to namespace_relative_member_index_pod_type. More... | |
operator namespace_relative_subposet_index_pod_type () const | |
Conversion to namespace_relative_subposet_index_pod_type. More... | |
~primitive_value () | |
Destructor. More... | |
primitive_buffer_type & | value () |
The value of this. More... | |
const primitive_buffer_type & | value () const |
The value of this, const version. More... | |
primitive_type & | id () |
Type id of the primitive type. More... | |
const primitive_type & | id () const |
Type id of the primitive type, const version. More... | |
std::string | to_string () const |
Converts this to a string (for stream insertion). More... | |
bool | from_string (const std::string &x) |
Converts this from a string (from stream extraction); returns true if operation successful, false otherwise. More... | |
template<typename T > | |
sheaf::primitive_value & | operator= (const T &x) |
template<> | |
SHEAF_DLL_SPEC sheaf::primitive_value & | operator= (const std::string &x) |
template<> | |
SHEAF_DLL_SPEC sheaf::primitive_value & | operator= (const scoped_index &x) |
template<> | |
SHEAF_DLL_SPEC sheaf::primitive_value & | operator= (const namespace_relative_member_index &x) |
template<> | |
SHEAF_DLL_SPEC sheaf::primitive_value & | operator= (const namespace_relative_subposet_index &x) |
template<> | |
SHEAF_DLL_SPEC sheaf::primitive_value & | operator= (const poset_path &x) |
Static Public Member Functions | |
static const primitive_value & | prototype (pod_index_type xid) |
The prototype for the primitive value of the type associated with xid. More... | |
Friends | |
SHEAF_DLL_SPEC bool | operator== (const primitive_value &xpv1, const primitive_value &xpv2) |
Comparison of xpv1 to xpv2. More... | |
Abstract object wrapper for an instance of a primitive type.
Definition at line 53 of file primitive_value.h.
sheaf::primitive_value::primitive_value | ( | ) |
Default constructor.
Definition at line 239 of file primitive_value.cc.
References sheaf::primitive_traits< T >::default_value(), and sheaf::primitive_traits< T >::id().
Referenced by primitive_value(), and prototype().
sheaf::primitive_value::primitive_value | ( | const primitive_value & | xother | ) |
sheaf::primitive_value::primitive_value | ( | primitive_type | xid | ) |
Creates a new primitive value of the type associated with xid and default value.
Definition at line 254 of file primitive_value.cc.
References sheaf::is_primitive_index(), and primitive_value().
sheaf::primitive_value::primitive_value | ( | pod_index_type | xid, |
void * | xvalue_ptr | ||
) |
Creates a new primitive value of the type associated with xid and value pointed to by xvalue_ptr.
Definition at line 284 of file primitive_value.cc.
References sheaf::is_primitive_index(), and primitive_value().
sheaf::primitive_value::primitive_value | ( | const void * | x | ) |
Conversion from pointer; creates a new primitive value of type VOID_STAR with value x.
Definition at line 312 of file primitive_value.cc.
References primitive_value().
sheaf::primitive_value::primitive_value | ( | const char * | x | ) |
Conversion from C string; creates a new primitive value of type C_STRING with value x.
Definition at line 331 of file primitive_value.cc.
References primitive_value().
sheaf::primitive_value::primitive_value | ( | const std::string & | x | ) |
Conversion from string; creates a new primitive value of type C_STRING with value x.
Definition at line 352 of file primitive_value.cc.
References primitive_value().
sheaf::primitive_value::primitive_value | ( | const scoped_index & | x | ) |
Conversion from scoped_index; creates a new primitive value of type POD_INDEX_TYPE with value x.
Definition at line 371 of file primitive_value.cc.
References sheaf::scoped_index::pod(), and primitive_value().
sheaf::primitive_value::primitive_value | ( | const namespace_relative_member_index & | x | ) |
Conversion from namespace_relative_member_index; creates a new primitive value of type NAMESPACE_RELATIVE_MEMBER_INDEX with value x.
Definition at line 390 of file primitive_value.cc.
References sheaf::namespace_relative_member_index::pod(), and primitive_value().
sheaf::primitive_value::primitive_value | ( | const namespace_relative_subposet_index & | x | ) |
Conversion from namespace_relative_subposet_index; creates a new primitive value of type NAMESPACE_RELATIVE_SUBPOSET_INDEX with value x.
Definition at line 409 of file primitive_value.cc.
References sheaf::namespace_relative_subposet_index::pod(), and primitive_value().
sheaf::primitive_value::primitive_value | ( | const bool & | x | ) |
Conversion from bool; creates a new primitive value of type BOOL with value x.
Definition at line 428 of file primitive_value.cc.
References primitive_value().
sheaf::primitive_value::primitive_value | ( | const char & | x | ) |
Conversion from char; creates a new primitive value of type CHAR with value x.
Definition at line 447 of file primitive_value.cc.
References primitive_value().
sheaf::primitive_value::primitive_value | ( | const signed char & | x | ) |
Conversion from signed char; creates a new primitive value of type SIGNED_CHAR with value x.
Definition at line 466 of file primitive_value.cc.
References primitive_value().
sheaf::primitive_value::primitive_value | ( | const short int & | x | ) |
Conversion from short int; creates a new primitive value of type SHORT_INT with value x.
Definition at line 485 of file primitive_value.cc.
References primitive_value().
sheaf::primitive_value::primitive_value | ( | const int & | x | ) |
Conversion from int; creates a new primitive value of type INT with value x.
Definition at line 504 of file primitive_value.cc.
References primitive_value().
sheaf::primitive_value::primitive_value | ( | const long int & | x | ) |
Conversion from long int; creates a new primitive value of type LONG_INT with value x.
Definition at line 523 of file primitive_value.cc.
References primitive_value().
sheaf::primitive_value::primitive_value | ( | const long long int & | x | ) |
Conversion from long long int; creates a new primitive value of type LONG_LONG_INT with value x.
Definition at line 542 of file primitive_value.cc.
References primitive_value().
sheaf::primitive_value::primitive_value | ( | const unsigned char & | x | ) |
Conversion from unsigned char; creates a new primitive value of type UNSIGNED_CHAR with value x.
Definition at line 561 of file primitive_value.cc.
References primitive_value().
sheaf::primitive_value::primitive_value | ( | const unsigned short int & | x | ) |
Conversion from unsigned short int; creates a new primitive value of type UNSIGNED_SHORT_INT with value x.
Definition at line 580 of file primitive_value.cc.
References primitive_value().
sheaf::primitive_value::primitive_value | ( | const unsigned int & | x | ) |
Conversion from unsigned int; creates a new primitive value of type UNSIGNED_INT with value x.
Definition at line 599 of file primitive_value.cc.
References primitive_value().
sheaf::primitive_value::primitive_value | ( | const unsigned long int & | x | ) |
Conversion from unsigned long int; creates a new primitive value of type UNSIGNED_LONG_INT with value x.
Definition at line 618 of file primitive_value.cc.
References primitive_value().
sheaf::primitive_value::primitive_value | ( | const unsigned long long int & | x | ) |
Conversion from unsigned long long int; creates a new primitive value of type UNSIGNED_LONG_LONG_INT with value x.
Definition at line 637 of file primitive_value.cc.
References primitive_value().
sheaf::primitive_value::primitive_value | ( | const float & | x | ) |
Conversion from float; creates a new primitive value of type FLOAT with value x.
Definition at line 656 of file primitive_value.cc.
References primitive_value().
sheaf::primitive_value::primitive_value | ( | const double & | x | ) |
Conversion from double; creates a new primitive value of type DOUBLE with value x.
Definition at line 675 of file primitive_value.cc.
References primitive_value().
sheaf::primitive_value::primitive_value | ( | const long double & | x | ) |
Conversion from long double; creates a new primitive value of type LONG_DOUBLE with value x.
Definition at line 694 of file primitive_value.cc.
References primitive_value().
sheaf::primitive_value::primitive_value | ( | const namespace_relative_member_index_pod_type & | x | ) |
Conversion from namespace_relative_member_index_pod_type; creates a new primitive value of type NAMESPACE_RELATIVE_MEMBER_INDEX_POD_TYPE with value x.
Definition at line 713 of file primitive_value.cc.
References primitive_value().
sheaf::primitive_value::primitive_value | ( | const namespace_relative_subposet_index_pod_type & | x | ) |
Conversion from namespace_relative_subposet_index_pod_type; creates a new primitive value of type NAMESPACE_RELATIVE_SUBPOSET_INDEX_POD_TYPE with value x.
Definition at line 732 of file primitive_value.cc.
References operator=().
sheaf::primitive_value::~primitive_value | ( | ) |
Destructor.
Definition at line 1095 of file primitive_value.cc.
References to_string().
Referenced by operator namespace_relative_subposet_index_pod_type().
bool sheaf::primitive_value::from_string | ( | const std::string & | x | ) |
Converts this from a string (from stream extraction); returns true if operation successful, false otherwise.
Definition at line 1118 of file primitive_value.cc.
References sheaf::auto_block< T, un_block_initialization_policy< T > >::ct(), sheaf::primitive_traits< T >::default_value(), sheaf::operator==(), and sheaf::auto_block< T, un_block_initialization_policy< T > >::set_ct().
Referenced by sheaf::operator>>(), and to_string().
|
inline |
Type id of the primitive type.
Definition at line 406 of file primitive_value.h.
Referenced by sheaf::poset_dof_map::dof(), sheaf::poset_table_state::invariant(), sheaf::arg_list::operator<<(), sheaf::operator<<(), sheaf::operator==(), sheaf::operator>>(), sheaf::poset_path::poset_path(), prototype(), sheaf::poset_dof_map::put_dof(), sheaf::abstract_poset_member::put_dof(), and sheaf::arg_list::arg_type::put_type().
|
inline |
Type id of the primitive type, const version.
Definition at line 414 of file primitive_value.h.
sheaf::primitive_value::operator bool | ( | ) | const |
Conversion to bool.
Definition at line 977 of file primitive_value.cc.
sheaf::primitive_value::operator char | ( | ) | const |
Conversion to char.
Definition at line 983 of file primitive_value.cc.
sheaf::primitive_value::operator char * | ( | ) | const |
Conversion to char*.
Definition at line 1073 of file primitive_value.cc.
sheaf::primitive_value::operator double | ( | ) | const |
Conversion to double.
Definition at line 1055 of file primitive_value.cc.
sheaf::primitive_value::operator float | ( | ) | const |
Conversion to float.
Definition at line 1049 of file primitive_value.cc.
sheaf::primitive_value::operator int | ( | ) | const |
Conversion to int.
Definition at line 1001 of file primitive_value.cc.
sheaf::primitive_value::operator long double | ( | ) | const |
Conversion to long double.
Definition at line 1061 of file primitive_value.cc.
sheaf::primitive_value::operator long int | ( | ) | const |
Conversion to long int.
Definition at line 1007 of file primitive_value.cc.
sheaf::primitive_value::operator long long int | ( | ) | const |
Conversion to long long int.
Definition at line 1013 of file primitive_value.cc.
sheaf::primitive_value::operator namespace_relative_member_index_pod_type | ( | ) | const |
Conversion to namespace_relative_member_index_pod_type.
Definition at line 1079 of file primitive_value.cc.
sheaf::primitive_value::operator namespace_relative_subposet_index_pod_type | ( | ) | const |
Conversion to namespace_relative_subposet_index_pod_type.
Definition at line 1085 of file primitive_value.cc.
References ~primitive_value().
sheaf::primitive_value::operator short int | ( | ) | const |
Conversion to short int.
Definition at line 995 of file primitive_value.cc.
sheaf::primitive_value::operator signed char | ( | ) | const |
Conversion to signed char.
Definition at line 989 of file primitive_value.cc.
sheaf::primitive_value::operator unsigned char | ( | ) | const |
Conversion to unsigned char.
Definition at line 1019 of file primitive_value.cc.
sheaf::primitive_value::operator unsigned int | ( | ) | const |
Conversion to unsigned int.
Definition at line 1031 of file primitive_value.cc.
sheaf::primitive_value::operator unsigned long int | ( | ) | const |
Conversion to unsigned long int.
Definition at line 1037 of file primitive_value.cc.
sheaf::primitive_value::operator unsigned long long int | ( | ) | const |
Conversion to unsigned long long int.
Definition at line 1043 of file primitive_value.cc.
sheaf::primitive_value::operator unsigned short int | ( | ) | const |
Conversion to unsigned short int.
Definition at line 1025 of file primitive_value.cc.
sheaf::primitive_value::operator void * | ( | ) | const |
Conversion to void*.
Definition at line 1067 of file primitive_value.cc.
sheaf::primitive_value & sheaf::primitive_value::operator= | ( | const primitive_value & | x | ) |
Copy assignment.
Definition at line 756 of file primitive_value.cc.
Referenced by operator=(), and primitive_value().
sheaf::primitive_value & sheaf::primitive_value::operator= | ( | void * | x | ) |
Assignment from pointer.
Definition at line 768 of file primitive_value.cc.
References sheaf::primitive_traits< T >::id(), and operator=().
sheaf::primitive_value & sheaf::primitive_value::operator= | ( | const void * | x | ) |
Assignment from pointer.
Definition at line 778 of file primitive_value.cc.
References sheaf::primitive_traits< T >::id(), and operator=().
sheaf::primitive_value & sheaf::primitive_value::operator= | ( | char * | x | ) |
Assignment from C string.
Definition at line 788 of file primitive_value.cc.
References sheaf::primitive_traits< T >::id(), and operator=().
sheaf::primitive_value & sheaf::primitive_value::operator= | ( | const char * | x | ) |
Assignment from C string.
Definition at line 798 of file primitive_value.cc.
References sheaf::primitive_traits< T >::id(), and operator=().
primitive_value& sheaf::primitive_value::operator= | ( | const T & | x | ) |
Assignment from primitive of type T.
|
static |
The prototype for the primitive value of the type associated with xid.
Definition at line 200 of file primitive_value.cc.
References id(), sheaf::is_primitive_index(), and primitive_value().
Referenced by sheaf::dof_tuple_record_set::internalize_all_dofs().
std::string sheaf::primitive_value::to_string | ( | ) | const |
Converts this to a string (for stream insertion).
Definition at line 1108 of file primitive_value.cc.
References from_string().
Referenced by sheaf::dof_tuple_record_set::internalize_all_dofs(), sheaf::poset_table_state::invariant(), sheaf::operator<<(), and ~primitive_value().
|
inline |
The value of this.
Definition at line 390 of file primitive_value.h.
Referenced by sheaf::poset_dof_map::dof(), sheaf::dof_tuple_record_set::internalize_all_dofs(), sheaf::poset_table_state::invariant(), sheaf::arg_list::operator<<(), sheaf::poset_path::operator=(), sheaf::operator==(), sheaf::poset_path::poset_path(), and sheaf::poset_dof_map::put_dof().
|
inline |
The value of this, const version.
Definition at line 398 of file primitive_value.h.
|
friend |
Comparison of xpv1 to xpv2.