graph_analysis
Public Types | Public Member Functions | Protected Member Functions | Friends | List of all members
graph_analysis::EdgeTypeManager Class Reference

Factory for Edge subclasses. More...

#include <EdgeTypeManager.hpp>

Inheritance diagram for graph_analysis::EdgeTypeManager:
Inheritance graph
[legend]
Collaboration diagram for graph_analysis::EdgeTypeManager:
Collaboration graph
[legend]

Public Types

typedef std::map< edge::Type, Edge::Ptr > TypeMap
 
- Public Types inherited from graph_analysis::AttributeManager
typedef std::map< std::string, io::AttributeSerializationCallbacks > AttributeSerializationCallbackMap
 

Public Member Functions

void registerType (const Edge::Ptr &edge, bool throwOnAlreadyRegistered=false)
 
void registerType (const edge::Type &type, const Edge::Ptr &edge, bool throwOnAlreadyRegistered=false)
 
void setDefaultType (const std::string &type)
 
const std::string & getDefaultType () const
 
Edge::Ptr createEdge (const edge::Type &type, const std::string &label="", bool throwOnMissing=false)
 clones a new edge of a specified type More...
 
Edge::Ptr createEdge (const edge::Type &type, const Vertex::Ptr &source, const Vertex::Ptr &target, const std::string &label="", bool throwOnMissing=false)
 
std::set< std::string > getSupportedTypes () const
 lists the registered types More...
 
std::vector< Attribute > getKnownAttributes (const std::set< std::string > &classnames=std::set< std::string >()) const
 
std::vector< std::pair< Attribute::Id, std::string > > getAttributeValues (const Edge::Ptr &edge) const
 
- Public Member Functions inherited from graph_analysis::AttributeManager
void activateAttributedType (const std::string &typeName)
 
void registerAttribute (const std::string &typeName, const std::string &attributeName, io::AttributeSerializationCallbacks::serialize_func_t sF, io::AttributeSerializationCallbacks::deserialize_func_t dF, io::AttributeSerializationCallbacks::print_func_t pF)
 register a new attribute for serialization and deserialization More...
 
std::vector< std::string > getAttributes (const std::string &vertexTypeName) const
 returns all registered members for the given vertex More...
 
io::AttributeSerializationCallbacks getAttributeSerializationCallbacks (const std::string &typeName, const std::string &attributeName) const
 

Protected Member Functions

 EdgeTypeManager ()
 constructor More...
 

Friends

class base::Singleton< EdgeTypeManager >
 

Detailed Description

Factory for Edge subclasses.

EdgeTypeManager allows to register edge classes by type

Member Typedef Documentation

◆ TypeMap

Constructor & Destructor Documentation

◆ EdgeTypeManager()

graph_analysis::EdgeTypeManager::EdgeTypeManager ( )
protected

constructor

Member Function Documentation

◆ createEdge() [1/2]

Edge::Ptr graph_analysis::EdgeTypeManager::createEdge ( const edge::Type &  type,
const std::string &  label = "",
bool  throwOnMissing = false 
)

clones a new edge of a specified type

Parameters
typethe requested edge type
labelthe requested edge label
throwOnMissingthrow when edge type is missing
Returns
smart pointer to the newly created edge instance

◆ createEdge() [2/2]

Edge::Ptr graph_analysis::EdgeTypeManager::createEdge ( const edge::Type &  type,
const Vertex::Ptr &  source,
const Vertex::Ptr &  target,
const std::string &  label = "",
bool  throwOnMissing = false 
)

◆ getAttributeValues()

std::vector< std::pair< Attribute::Id, std::string > > graph_analysis::EdgeTypeManager::getAttributeValues ( const Edge::Ptr &  edge) const

Get the value assignments for the attributes of an edge

◆ getDefaultType()

const std::string& graph_analysis::EdgeTypeManager::getDefaultType ( ) const
inline

Get the current default edge type

◆ getKnownAttributes()

std::vector< Attribute > graph_analysis::EdgeTypeManager::getKnownAttributes ( const std::set< std::string > &  classnames = std::set<std::string>()) const

◆ getSupportedTypes()

std::set< std::string > graph_analysis::EdgeTypeManager::getSupportedTypes ( ) const

lists the registered types

◆ registerType() [1/2]

void graph_analysis::EdgeTypeManager::registerType ( const Edge::Ptr &  edge,
bool  throwOnAlreadyRegistered = false 
)

◆ registerType() [2/2]

void graph_analysis::EdgeTypeManager::registerType ( const edge::Type &  type,
const Edge::Ptr &  edge,
bool  throwOnAlreadyRegistered = false 
)

◆ setDefaultType()

void graph_analysis::EdgeTypeManager::setDefaultType ( const std::string &  type)

Select the default edge type from the list of registered types

Friends And Related Function Documentation

◆ base::Singleton< EdgeTypeManager >

friend class base::Singleton< EdgeTypeManager >
friend

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