|
graph_analysis
|
Factory for Edge subclasses. More...
#include <EdgeTypeManager.hpp>


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 | |
| template<typename T , typename P = graph_analysis::Edge> | |
| void | registerType (bool throwOnAlreadyRegistered=false) |
| void | registerType (const Edge::Ptr &edge, const Edge::PtrList &parents=Edge::PtrList(), bool throwOnAlreadyRegistered=false) |
| void | registerType (const edge::Type &type, const Edge::Ptr &edge, const Edge::PtrList &parents=Edge::PtrList(), 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< std::string > | getTypeHierarchy (const edge::Type &type) const |
| std::vector< Attribute > | getKnownAttributes (const std::set< std::string > &classnames=std::set< std::string >()) const |
| std::vector< Attribute > | getAttributes (const edge::Type &type, bool includeLegacySupport=false) 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 > | getAttributeNames (const std::string &vertexTypeName) const |
| returns all registered members for the given vertex More... | |
| io::AttributeSerializationCallbacks | getAttributeSerializationCallbacks (const Attribute &attribute) const |
Protected Member Functions | |
| EdgeTypeManager () | |
| constructor More... | |
Friends | |
| class | base::Singleton< EdgeTypeManager > |
Factory for Edge subclasses.
EdgeTypeManager allows to register edge classes by type
| typedef std::map<edge::Type, Edge::Ptr> graph_analysis::EdgeTypeManager::TypeMap |
|
protected |
constructor
| 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
| type | the requested edge type |
| label | the requested edge label |
| throwOnMissing | throw when edge type is missing |
| 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 |
||
| ) |
| std::vector< Attribute > graph_analysis::EdgeTypeManager::getAttributes | ( | const edge::Type & | type, |
| bool | includeLegacySupport = false |
||
| ) | const |
| 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
|
inline |
Get the current default edge type
| std::vector< Attribute > graph_analysis::EdgeTypeManager::getKnownAttributes | ( | const std::set< std::string > & | classnames = std::set<std::string>() | ) | const |
| std::set< std::string > graph_analysis::EdgeTypeManager::getSupportedTypes | ( | ) | const |
lists the registered types
| std::vector< std::string > graph_analysis::EdgeTypeManager::getTypeHierarchy | ( | const edge::Type & | type | ) | const |
Compute the class hierarchy for a given edge type, note that the type itself will also be part of the returned list
| type | Edge type for which the hierarchy should be retrieved |
|
inline |
| void graph_analysis::EdgeTypeManager::registerType | ( | const Edge::Ptr & | edge, |
| const Edge::PtrList & | parents = Edge::PtrList(), |
||
| bool | throwOnAlreadyRegistered = false |
||
| ) |
Register edge class
| edge | Instance of the registered type |
| parents | Instances of the parent types |
| throwOnAlreadyRegistered | If true, then this function will throw std::runtime_error upon double registration |
| void graph_analysis::EdgeTypeManager::registerType | ( | const edge::Type & | type, |
| const Edge::Ptr & | edge, | ||
| const Edge::PtrList & | parents = Edge::PtrList(), |
||
| bool | throwOnAlreadyRegistered = false |
||
| ) |
| void graph_analysis::EdgeTypeManager::setDefaultType | ( | const std::string & | type | ) |
Select the default edge type from the list of registered types
|
friend |
1.8.17