CppGraph Application Framework©
Copyright © 2004-202x Geoff Goldberg
Public Member Functions | List of all members
cppgraph::user_property_array_handle_t< T > Struct Template Reference

A user property array handle is a UTF8 string array property handle that provides operations to serialze the strings to and from values of type T. More...

#include <user_property_array_handle.h>

Inheritance diagram for cppgraph::user_property_array_handle_t< T >:
Inheritance graph
[legend]

Public Member Functions

 user_property_array_handle_t ()=default
 Default construction.
 
 user_property_array_handle_t (user_property_array_handle_t const &h_property) noexcept
 Copy construction from a user property array handle. More...
 
template<typename U , typename = enable_if_is_same< U, T >>
 user_property_array_handle_t (user_property_array_handle_t< U > const &h_property) noexcept
 Copy construction from a user property array handle. More...
 
 user_property_array_handle_t (user_property_array_handle_t &&h_property) noexcept
 Move construction from a compatible user property array handle. More...
 
template<typename U , typename = enable_if_is_same< U, T >>
 user_property_array_handle_t (user_property_array_handle_t< U > &&h_property) noexcept
 Move construction from a compatible user property array handle. More...
 
get_user_value (index_t index) const
 Serializes a T value from the backing string at a specified index, and returns it. More...
 
user_property_array_handle_toperator= (user_property_array_handle_t const &h_properties) noexcept
 Copy assignment from a user property array handle of type c T. More...
 
template<typename U , typename = enable_if_is_same< U, T >>
user_property_array_handle_toperator= (user_property_array_handle_t< U > const &h_properties) noexcept
 Copy assignment from a compatible user property array handle. More...
 
user_property_array_handle_toperator= (user_property_array_handle_t &&h_properties) noexcept
 Move assignment from a user property array handle of type c T. More...
 
template<typename U , typename = enable_if_is_same< U, T >>
user_property_array_handle_toperator= (user_property_array_handle_t< U > &&h_properties) noexcept
 Move assignment from a compatible user property array handle. More...
 
void set_user_value (index_t index, T const &t)
 Serializes a specified T value to the backing string. More...
 
- Public Member Functions inherited from cppgraph::property_handle_t< utf8_string_array >
constexpr property_handle_t () noexcept=default
 Default construction. More...
 
constexpr property_handle_t (std::nullptr_t property) noexcept
 Construction from a nullptr. More...
 
 property_handle_t (property *property)
 Construction from a property pointer. More...
 
 property_handle_t (property_id_t id)
 Construction from a property_id. More...
 
 property_handle_t (property_handle_t const &h_property) noexcept
 Copy construction from a property handle. More...
 
 property_handle_t (property_handle_t< U > const &h_property) noexcept
 Copy construction from a property handle. More...
 
 property_handle_t (property_handle_t &&h_property) noexcept
 Move construction from a property handle. More...
 
 property_handle_t (property_handle_t< U > &&h_property) noexcept
 Move construction from a property handle. More...
 
 property_handle_t (utf8_string_array const &value) noexcept
 Create a property of the specified type and value and construct a property handle to it. More...
 
utf8_string_arraydata (error_action_enum error_action_type) const
 De-references this property handle. More...
 
utf8_string_arrayoperator* () const
 Dereferences this property handle. More...
 
utf8_string_arrayoperator-> () const
 De-references this property handle. More...
 
property_handle_toperator= (std::nullptr_t property) noexcept
 Assignment from a nullptr. More...
 
property_handle_toperator= (property_id_t id)
 Assignment from a property_id. More...
 
property_handle_toperator= (property_handle_t const &h_property) noexcept
 Copy assignment from a property handle. More...
 
property_handle_toperator= (property_handle_t< U > const &h_property) noexcept
 Copy assignment from a property handle. More...
 
property_handle_toperator= (property_handle_t &&h_property) noexcept
 Move assignment from a property handle. More...
 
property_handle_toperator= (property_handle_t< U > &&h_property) noexcept
 Move assignment from a property handle. More...
 
property_handle_toperator= (utf8_string_array const &value) noexcept
 Create a property of the specified type and value and assign it to this property handle. More...
 
- Public Member Functions inherited from cppgraph::property_handle
 property_handle () noexcept=default
 Default construction. More...
 
 property_handle (std::nullptr_t property) noexcept
 Construction from a nullptr. More...
 
 property_handle (property *property) noexcept
 Construction from a property pointer. More...
 
 property_handle (property_id_t property_id) noexcept
 Construction from a property_id. More...
 
 property_handle (property_handle const &h_property) noexcept
 Copy construction from a property handle. More...
 
 property_handle (property_handle &&h_property) noexcept
 Move construction from a property handle. More...
 
template<typename T , typename = enable_if_is_property< T >>
 property_handle (T const &value) noexcept
 Construction from a property value. More...
 
 ~property_handle ()
 Destruction.
 
template<typename T >
T * data (error_action_enum error_action_type) const
 Returns a pointer to this handle's property's value. More...
 
propertyget_property (error_action_enum error_action_type) const
 De-references this property handle. More...
 
property_id_t get_property_id () const noexcept
 Returns the id of the property owned by this property handle. More...
 
 operator bool () const noexcept
 Returns true if this property handle's property pointer is not nullptr. More...
 
propertyoperator* () const
 De-references this property handle. More...
 
propertyoperator-> () const
 De-references this property handle. More...
 
property_handleoperator= (std::nullptr_t property) noexcept
 Assignment from a nullptr. More...
 
property_handleoperator= (property_handle const &h_property) noexcept
 Copy assignment from a property handle. More...
 
property_handleoperator= (property_handle &&h_property) noexcept
 Move assignment from a property handle. More...
 
property_handleoperator= (property *property) noexcept
 Assignment from a property pointer. More...
 
property_handleoperator= (property_id_t id) noexcept
 Assignment from a property_id. More...
 
template<typename T , typename = enable_if_is_property< T >>
property_handleoperator= (T const &value)
 Assignment from a property value. More...
 

Detailed Description

template<typename T>
struct cppgraph::user_property_array_handle_t< T >

A user property array handle is a UTF8 string array property handle that provides operations to serialze the strings to and from values of type T.

Template Parameters
TType of the user property. The following must be declared and defined in T's namespace:
  • std::ostream & operator << ( std::ostream &, T const & );
  • std::istream & operator >> ( std::istream &, T & );
See also
CPPGRAPH_DECLARE_USER_PROPERTY_ARRAY(), CPPGRAPH_DECLARE_CONST_USER_PROPERTY_ARRAY(), CPPGRAPH_DECLARE_USER_PROPERTY(), CPPGRAPH_DECLARE_CONST_USER_PROPERTY().
Todo:
Need a property_array_handle_t?

Constructor & Destructor Documentation

◆ user_property_array_handle_t() [1/4]

template<typename T >
cppgraph::user_property_array_handle_t< T >::user_property_array_handle_t ( user_property_array_handle_t< T > const &  h_property)
noexcept

Copy construction from a user property array handle.

Parameters
h_propertyA property handle to a user property array whose data type is T.

◆ user_property_array_handle_t() [2/4]

template<typename T >
template<typename U , typename >
cppgraph::user_property_array_handle_t< T >::user_property_array_handle_t ( user_property_array_handle_t< U > const &  h_property)
noexcept

Copy construction from a user property array handle.

Template Parameters
UT or T const. It is deduced by the compiler and therefore need not be specified.
Parameters
h_propertyA property handle to a user property array whose data type is U.

◆ user_property_array_handle_t() [3/4]

template<typename T >
cppgraph::user_property_array_handle_t< T >::user_property_array_handle_t ( user_property_array_handle_t< T > &&  h_property)
noexcept

Move construction from a compatible user property array handle.

Parameters
h_propertyA property handle to a property whose data type is T.

◆ user_property_array_handle_t() [4/4]

template<typename T >
template<typename U , typename >
cppgraph::user_property_array_handle_t< T >::user_property_array_handle_t ( user_property_array_handle_t< U > &&  h_property)
noexcept

Move construction from a compatible user property array handle.

Template Parameters
UT or T const. It is deduced by the compiler and therefore need not be specified.
Parameters
h_propertyA property handle to a property whose data type is U.

Member Function Documentation

◆ get_user_value()

template<typename T >
T cppgraph::user_property_array_handle_t< T >::get_user_value ( index_t  index) const

Serializes a T value from the backing string at a specified index, and returns it.

Parameters
indexArray index of the desired property.
Returns
The value of the backing string property at index, serialized in to a value of type T.
Exceptions
exceptionindex() is not in the range [0, size() - 1].

◆ operator=() [1/4]

template<typename T >
user_property_array_handle_t& cppgraph::user_property_array_handle_t< T >::operator= ( user_property_array_handle_t< T > const &  h_properties)
noexcept

Copy assignment from a user property array handle of type c T.

Parameters
h_propertiesA handle to a user property array whose data type is T.
Returns
A reference to this instance.

◆ operator=() [2/4]

template<typename T >
template<typename U , typename = enable_if_is_same< U, T >>
user_property_array_handle_t& cppgraph::user_property_array_handle_t< T >::operator= ( user_property_array_handle_t< U > const &  h_properties)
noexcept

Copy assignment from a compatible user property array handle.

Template Parameters
UT or T const. It is deduced by the compiler and therefore need not be specified.
Parameters
h_propertiesA handle to a user property array whose data type is U.
Returns
A reference to this instance.

◆ operator=() [3/4]

template<typename T >
user_property_array_handle_t& cppgraph::user_property_array_handle_t< T >::operator= ( user_property_array_handle_t< T > &&  h_properties)
noexcept

Move assignment from a user property array handle of type c T.

Parameters
h_propertiesA handle to a user property array whose data type is T.
Returns
A reference to this instance.

◆ operator=() [4/4]

template<typename T >
template<typename U , typename = enable_if_is_same< U, T >>
user_property_array_handle_t& cppgraph::user_property_array_handle_t< T >::operator= ( user_property_array_handle_t< U > &&  h_properties)
noexcept

Move assignment from a compatible user property array handle.

Template Parameters
UT or T const. It is deduced by the compiler and therefore need not be specified.
Parameters
h_propertiesA handle to a user property array whose data type is U.
Returns
A reference to this instance.

◆ set_user_value()

template<typename T >
void cppgraph::user_property_array_handle_t< T >::set_user_value ( index_t  index,
T const &  t 
)

Serializes a specified T value to the backing string.

Parameters
indexArray index of the desired property.
tA value of type T.
Exceptions
exceptionindex() is not in the range [0, size() - 1].

The documentation for this struct was generated from the following file: