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

Edge is designed for constructing edges builder. More...

#include <edges_builder.h>

Public Member Functions

 Edge (IdType src_id, IdType dst_id)
 Initialize the edge with its source and destination. More...
 
bool Empty () const noexcept
 Check if the edge is empty. More...
 
IdType GetSource () const noexcept
 Get source id of the edge. More...
 
IdType GetDestination () const noexcept
 Get destination id of the edge. More...
 
void AddProperty (const std::string &name, const std::any &val)
 Add a property to the edge. More...
 
const std::any & GetProperty (const std::string &property) const
 Get a property of the edge. More...
 
const std::unordered_map< std::string, std::any > & GetProperties () const
 Get all properties of the edge. More...
 
bool ContainProperty (const std::string &property) const
 Check if the edge contains a property. More...
 

Detailed Description

Edge is designed for constructing edges builder.

Definition at line 45 of file edges_builder.h.

Constructor & Destructor Documentation

◆ Edge()

graphar::builder::Edge::Edge ( IdType  src_id,
IdType  dst_id 
)
inlineexplicit

Initialize the edge with its source and destination.

Parameters
src_idThe id of the source vertex.
dst_idThe id of the destination vertex.

Definition at line 53 of file edges_builder.h.

Member Function Documentation

◆ AddProperty()

void graphar::builder::Edge::AddProperty ( const std::string &  name,
const std::any &  val 
)
inline

Add a property to the edge.

Parameters
nameThe name of the property.
valThe value of the property.

Definition at line 84 of file edges_builder.h.

◆ ContainProperty()

bool graphar::builder::Edge::ContainProperty ( const std::string &  property) const
inline

Check if the edge contains a property.

Parameters
propertyThe name of the property.
Returns
true/false.

Definition at line 115 of file edges_builder.h.

◆ Empty()

bool graphar::builder::Edge::Empty ( ) const
inlinenoexcept

Check if the edge is empty.

Returns
true/false.

Definition at line 61 of file edges_builder.h.

◆ GetDestination()

IdType graphar::builder::Edge::GetDestination ( ) const
inlinenoexcept

Get destination id of the edge.

Returns
The id of the destination vertex.

Definition at line 75 of file edges_builder.h.

◆ GetProperties()

const std::unordered_map<std::string, std::any>& graphar::builder::Edge::GetProperties ( ) const
inline

Get all properties of the edge.

Returns
The map containing all properties of the edge.

Definition at line 104 of file edges_builder.h.

◆ GetProperty()

const std::any& graphar::builder::Edge::GetProperty ( const std::string &  property) const
inline

Get a property of the edge.

Parameters
propertyThe name of the property.
Returns
The value of the property.

Definition at line 95 of file edges_builder.h.

◆ GetSource()

IdType graphar::builder::Edge::GetSource ( ) const
inlinenoexcept

Get source id of the edge.

Returns
The id of the source vertex.

Definition at line 68 of file edges_builder.h.


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