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

VerticesCollection is designed for reading a collection of vertices. More...

#include <graph_reader.h>

Public Member Functions

 VerticesCollection (const std::shared_ptr< VertexInfo > &vertex_info, const std::string &prefix)
 Initialize the VerticesCollection. More...
 
VertexIter begin () noexcept
 
VertexIter end () noexcept
 
VertexIter find (IdType id)
 
size_t size () const noexcept
 

Static Public Member Functions

static Result< std::shared_ptr< VerticesCollection > > Make (const std::shared_ptr< GraphInfo > &graph_info, const std::string &label)
 Construct a VerticesCollection from graph info and vertex label. More...
 

Detailed Description

VerticesCollection is designed for reading a collection of vertices.

Definition at line 263 of file graph_reader.h.

Constructor & Destructor Documentation

◆ VerticesCollection()

graphar::VerticesCollection::VerticesCollection ( const std::shared_ptr< VertexInfo > &  vertex_info,
const std::string &  prefix 
)
inlineexplicit

Initialize the VerticesCollection.

Parameters
vertex_infoThe vertex info that describes the vertex type.
prefixThe absolute prefix.

Definition at line 271 of file graph_reader.h.

Member Function Documentation

◆ begin()

VertexIter graphar::VerticesCollection::begin ( )
inlinenoexcept

The iterator pointing to the first vertex.

Definition at line 286 of file graph_reader.h.

◆ end()

VertexIter graphar::VerticesCollection::end ( )
inlinenoexcept

The iterator pointing to the past-the-end element.

Definition at line 289 of file graph_reader.h.

◆ find()

VertexIter graphar::VerticesCollection::find ( IdType  id)
inline

The iterator pointing to the vertex with specific id.

Definition at line 294 of file graph_reader.h.

◆ Make()

static Result<std::shared_ptr<VerticesCollection> > graphar::VerticesCollection::Make ( const std::shared_ptr< GraphInfo > &  graph_info,
const std::string &  label 
)
inlinestatic

Construct a VerticesCollection from graph info and vertex label.

Parameters
graph_infoThe graph info.
labelThe vertex label.

Definition at line 305 of file graph_reader.h.

◆ size()

size_t graphar::VerticesCollection::size ( ) const
inlinenoexcept

Get the number of vertices in the collection.

Definition at line 297 of file graph_reader.h.


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