Apache GraphAr C++ Library
The C++ Library for Apache GraphAr
Public Member Functions | List of all members
graphar::Vertex Class Reference

Vertex contains information of certain vertex. More...

#include <graph_reader.h>

Public Member Functions

 Vertex (IdType id, std::vector< VertexPropertyArrowChunkReader > &readers)
 
IdType id () const noexcept
 Get the id of the vertex. More...
 
template<typename T >
Result< T > property (const std::string &property) const
 Get the property value of the vertex. More...
 
bool IsValid (const std::string &property) const
 Return true if value at the property is valid (not null). More...
 
template<>
Result< Dateproperty (const std::string &property) const
 

Detailed Description

Vertex contains information of certain vertex.

Definition at line 49 of file graph_reader.h.

Constructor & Destructor Documentation

◆ Vertex()

graphar::Vertex::Vertex ( IdType  id,
std::vector< VertexPropertyArrowChunkReader > &  readers 
)
explicit

Initialize the Vertex.

Parameters
idThe vertex id.
readersA set of readers for reading the vertex properties.

Definition at line 74 of file graph_reader.cc.

Member Function Documentation

◆ id()

IdType graphar::Vertex::id ( ) const
inlinenoexcept

Get the id of the vertex.

Returns
The id of the vertex.

Definition at line 66 of file graph_reader.h.

◆ IsValid()

bool graphar::Vertex::IsValid ( const std::string &  property) const
inline

Return true if value at the property is valid (not null).

Parameters
propertyThe property name.
Returns
True if value at the property is valid, False otherwise.

Definition at line 83 of file graph_reader.h.

◆ property()

template<typename T >
Result< T > graphar::Vertex::property ( const std::string &  property) const

Get the property value of the vertex.

Parameters
propertyThe property name.
Returns
Result: The property value or error.

Definition at line 98 of file graph_reader.cc.


The documentation for this class was generated from the following files: