12 #ifndef __UNI_Item_h__
13 #define __UNI_Item_h__
19 template<
class UNI_ID_TYPE>
26 : myGraphHandle( graph_handle )
32 : myGraphHandle( std::move(graph_handle) )
47 UNI_ID_TYPE
id()
const {
return myID; }
66 template<
class UNI_ID_TYPE,
class UNI_SESSION_ID_TYPE,
class CONST_BASE_TYPE>
73 : CONST_BASE_TYPE( graph_handle, id ) {}
77 : CONST_BASE_TYPE( std::move(graph_handle), id ) {}
81 :
UNI_Item( session_id.graphID(), session_id.localID() ) {}
82 UNI_Item( UNI_GraphID graph_id, UNI_ID_TYPE
id )
virtual bool isValid(UNI_NodeID node_id) const =0
Returns true if the given ID refers to a valid item in this graph.
UNI_Item(UNI_GraphHandle &&graph_handle, UNI_ID_TYPE id)
Constructor with r-value for the intrusive graph pointer.
UNI_ID_TYPE id() const
Returns the ID of the node in the graph.
const UNI_ConstGraphHandle & graphHandle() const
Returns the underlying graph handle.
UNI_ConstItem(UNI_ConstGraphHandle &&graph_handle, UNI_ID_TYPE id)
Constructor with r-value for the intrusive graph pointer.
UNI_Item(UNI_SESSION_ID_TYPE session_id)
Other convenience constructors.
UNI_Item(const UNI_GraphHandle &graph_handle, UNI_ID_TYPE id)
UNI_Graph * graph() const
Returns the graph inside which the node lives.
UNI_Item(UNI_GraphID graph_id, UNI_ID_TYPE id)
Other convenience constructors.
UNI_Item()=default
Constructor.
const UNI_Graph * graph() const
Returns the graph inside which the node lives.
const UNI_Graph * graph() const
Returns the UNI graph referenced by this handle.
UNI_ConstItem(const UNI_ConstGraphHandle &graph_handle, UNI_ID_TYPE id)
UNI_ConstItem()=default
Constructor.