![]() |
smgl 0.11.0
Structured Metadata Engine and Graph Objects Library
|
Project top-level namespace. More...
Namespaces | |
| namespace | detail |
| Implementation details namespace. | |
| namespace | filesystem |
Alias for std::filesystem | |
| namespace | policy |
| Template policies namespace. | |
| namespace | type_traits |
| Custom type traits namespace. | |
Classes | |
| struct | bad_connection |
| Exception thrown for port connection failures. More... | |
| struct | BaseStyle |
| Style struct for a node's base style. More... | |
| struct | Connection |
| Describes untyped connections from an output port. More... | |
| struct | ElementStyle |
| Style struct for ports and labels. More... | |
| struct | FontStyle |
| Style struct for a node's overall font style. More... | |
| class | Graph |
| A collection of Nodes for managing pipeline state and serialization. More... | |
| class | GraphStyle |
| Class defining a Graph's style when writing to a Dot file. More... | |
| class | Input |
| Generic input port interface. More... | |
| class | InputPort |
| Typed InputPort class. More... | |
| class | Node |
| Generic Node class. More... | |
| struct | NodeDesc |
| Source-token descriptor pairing a Node type with a serialization key. More... | |
| struct | NodeStyle |
| Style struct containing all sub-styles for a node. More... | |
| class | Output |
| Generic output port interface. More... | |
| class | OutputPort |
| Typed OutputPort class. More... | |
| class | Port |
| Generic port interface. More... | |
| class | UniquelyIdentifiable |
| Base class for objects which are uniquely identifiable. More... | |
| struct | Update |
| Typed update sent over connections. More... | |
| class | Uuid |
| Universally unique identifier class. More... | |
Typedefs | |
| using | Metadata = nlohmann::ordered_json |
| Metadata storage class. | |
| using | unknown_identifier = detail::NodeFactoryType::InstanceType::unknown_identifier |
Enumerations | |
| enum class | CacheType { Adjacent = 0 , Subdirectory } |
| Cache Location Type. More... | |
| enum | LogLevel { All = 0 , Debug = 10 , Info = 20 , Warning = 30 , Error = 40 , None = 100 } |
| Log levels. More... | |
Functions | |
| void | WriteDotFile (const filesystem::path &path, const Graph &g, const GraphStyle &style=GraphStyle()) |
| Write Graph to a file in the Graphviz Dot format. | |
| void | SetLogLevel (LogLevel level) |
| Set the library log level. | |
| void | SetLogLevel (const std::string &level) |
| auto | GetLogLevel () -> LogLevel |
| Get the library log level. | |
| void | SetLogStream (std::ostream *os) |
| Set the output stream. | |
| template<typename... Args> | |
| void | LogError (Args... args) |
| template<typename... Args> | |
| void | LogWarning (Args... args) |
| template<typename... Args> | |
| void | LogInfo (Args... args) |
| template<typename... Args> | |
| void | LogDebug (Args... args) |
| void | WriteMetadata (const filesystem::path &path, const Metadata &m) |
| Write Metadata to path in JSON format. | |
| Metadata | LoadMetadata (const filesystem::path &path) |
| Load Metadata from JSON file at path. | |
| template<class... Ts> | |
| auto | RegisterNodes (const NodeDesc< Ts > &... descs) -> bool |
| Register one or more Node types for serialization/deserialization. | |
| template<class T > | |
| auto | RegisterNode (const std::string &name) -> bool |
| Register a Node type for serialization/deserialization using a custom name. | |
| template<class T , class... Ts> | |
| auto | DeregisterNode () -> bool |
| Deregister a Node type. | |
| template<class... Ts> | |
| auto | DeregisterNodes (const NodeDesc< Ts > &... descs) -> bool |
| Deregister one or more Node types using source-token descriptors. | |
| auto | DeregisterNode (const std::string &name) -> bool |
| Deregister a Node type by Name. | |
| auto | CreateNode (const std::string &name) -> Node::Pointer |
| template<class T > | |
| auto | NodeName () -> std::string |
| auto | NodeName (const Node::Pointer &node) -> std::string |
| auto | NodeName (const Node *node) -> std::string |
| auto | IsRegistered (const std::string &name) -> bool |
| auto | IsRegistered (const Node::Pointer &node) -> bool |
| auto | IsRegistered (const Node *node) -> bool |
| template<class... Ts> | |
| bool | RegisterNodes (const NodeDesc< Ts > &... descs) |
| Register one or more Node types for serialization/deserialization. | |
| template<class T > | |
| bool | RegisterNode (const std::string &name) |
| Register a Node type for serialization/deserialization using a custom name. | |
| template<class T , class... Ts> | |
| bool | DeregisterNode () |
| Deregister a Node type. | |
| template<class... Ts> | |
| bool | DeregisterNodes (const NodeDesc< Ts > &... descs) |
| Deregister one or more Node types using source-token descriptors. | |
| template<class T > | |
| std::string | NodeName () |
| void | connect (Output &op, Input &ip) |
| Connect an output port to an input port. | |
| void | disconnect (Output &op, Input &ip) |
| Disconnect an output port and input port. | |
| void | operator>> (Output &op, Input &ip) |
| Connect an output port to an input port. | |
| void | operator<< (Input &ip, Output &op) |
| Connect an output port to an input port. | |
| template<class Obj , class ObjMemberFn , typename... Args> | |
| auto | WrapFunc (Obj *obj, ObjMemberFn &&fn, Args &&... args) |
| Wrap a member function w/ arguments into a lambda function. | |
Project top-level namespace.
| using smgl::Metadata = typedef nlohmann::ordered_json |
Metadata storage class.
Definition at line 12 of file Metadata.hpp.
| using smgl::unknown_identifier = typedef detail::NodeFactoryType::InstanceType::unknown_identifier |
|
strong |
| enum smgl::LogLevel |
Log levels.
| Enumerator | |
|---|---|
| All | All messages. |
| Debug | Debug messages and above. |
| Info | Info messages and above. |
| Warning | Warning messages and above. |
| Error | Error messages and above. |
| None | No messages. |
Definition at line 18 of file Logging.hpp.
Connect an output port to an input port.
| smgl::bad_connection | if port instances do not share underlying type T |
| auto smgl::CreateNode | ( | const std::string & | name | ) | -> Node::Pointer |
Create a Node using it's registered name
| bool smgl::DeregisterNode | ( | ) | -> bool |
Deregister a Node type.
Uses RTTI to lookup existing registration information.
Because Node registration is global, this typically only needs to be called when testing or debugging custom Nodes.
Definition at line 88 of file NodeImpl.hpp.
| auto smgl::DeregisterNode | ( | ) | -> bool |
Deregister a Node type.
Uses RTTI to lookup existing registration information.
Because Node registration is global, this typically only needs to be called when testing or debugging custom Nodes.
Definition at line 88 of file NodeImpl.hpp.
| auto smgl::DeregisterNode | ( | const std::string & | name | ) | -> bool |
| bool smgl::DeregisterNodes | ( | const NodeDesc< Ts > &... | descs | ) | -> bool |
Deregister one or more Node types using source-token descriptors.
The SMGL_NODE()-based counterpart to RegisterNodes(): each descriptor's key is deregistered by name. Provided for symmetry so a batch can be registered and deregistered with the same SMGL_NODE() call sites.
Because Node registration is global, this typically only needs to be called when testing or debugging custom Nodes.
Definition at line 108 of file NodeImpl.hpp.
| auto smgl::DeregisterNodes | ( | const NodeDesc< Ts > &... | descs | ) | -> bool |
Deregister one or more Node types using source-token descriptors.
The SMGL_NODE()-based counterpart to RegisterNodes(): each descriptor's key is deregistered by name. Provided for symmetry so a batch can be registered and deregistered with the same SMGL_NODE() call sites.
Because Node registration is global, this typically only needs to be called when testing or debugging custom Nodes.
Definition at line 108 of file NodeImpl.hpp.
Disconnect an output port and input port.
Does nothing if ports are not connected
| auto smgl::IsRegistered | ( | const Node * | node | ) | -> bool |
Check whether a Node's type has been registered
| auto smgl::IsRegistered | ( | const Node::Pointer & | node | ) | -> bool |
Check whether a Node's type has been registered
| auto smgl::IsRegistered | ( | const std::string & | name | ) | -> bool |
Check whether a name has been registered for a Node type
| void smgl::LogDebug | ( | Args... | args | ) |
Definition at line 94 of file LoggingPrivate.hpp.
| void smgl::LogError | ( | Args... | args | ) |
Definition at line 61 of file LoggingPrivate.hpp.
| void smgl::LogInfo | ( | Args... | args | ) |
Definition at line 83 of file LoggingPrivate.hpp.
| void smgl::LogWarning | ( | Args... | args | ) |
Definition at line 72 of file LoggingPrivate.hpp.
| std::string smgl::NodeName | ( | ) | -> std::string |
Get a Node's registered name
| smgl::unknown_identifier | if the type pointed to by node has not been registered |
Definition at line 120 of file NodeImpl.hpp.
| auto smgl::NodeName | ( | ) | -> std::string |
Get a Node's registered name
| smgl::unknown_identifier | if the type pointed to by node has not been registered |
Definition at line 120 of file NodeImpl.hpp.
| auto smgl::NodeName | ( | const Node * | node | ) | -> std::string |
Get a Node's registered name
| smgl::unknown_identifier | if the type pointed to by node has not been registered |
| auto smgl::NodeName | ( | const Node::Pointer & | node | ) | -> std::string |
Get a Node's registered name
| smgl::unknown_identifier | if the type pointed to by node has not been registered |
Connect an output port to an input port.
| smgl::bad_connection | if port instances do not share underlying type T |
Connect an output port to an input port.
| smgl::bad_connection | if port instances do not share underlying type T |
| bool smgl::RegisterNode | ( | const std::string & | name | ) | -> bool |
Register a Node type for serialization/deserialization using a custom name.
This is the low-level primitive that RegisterNodes() folds onto. Most users should prefer RegisterNodes(SMGL_NODE(...)) so that keys are captured from source rather than spelled out by hand.
Node registration is global and only needs to be performed once during execution of a program.
Definition at line 81 of file NodeImpl.hpp.
| auto smgl::RegisterNode | ( | const std::string & | name | ) | -> bool |
Register a Node type for serialization/deserialization using a custom name.
This is the low-level primitive that RegisterNodes() folds onto. Most users should prefer RegisterNodes(SMGL_NODE(...)) so that keys are captured from source rather than spelled out by hand.
Node registration is global and only needs to be performed once during execution of a program.
Definition at line 81 of file NodeImpl.hpp.
| bool smgl::RegisterNodes | ( | const NodeDesc< Ts > &... | descs | ) | -> bool |
Register one or more Node types for serialization/deserialization.
Each descriptor is registered under its source-token key. Use the SMGL_NODE() macro to construct descriptors so that keys are captured from the as-written type spelling (e.g. std::string stays std::string) and are byte-identical across compilers and platforms.
Node registration is global and only needs to be performed once during execution of a program.
Definition at line 66 of file NodeImpl.hpp.
| auto smgl::RegisterNodes | ( | const NodeDesc< Ts > &... | descs | ) | -> bool |
Register one or more Node types for serialization/deserialization.
Each descriptor is registered under its source-token key. Use the SMGL_NODE() macro to construct descriptors so that keys are captured from the as-written type spelling (e.g. std::string stays std::string) and are byte-identical across compilers and platforms.
Node registration is global and only needs to be performed once during execution of a program.
Definition at line 66 of file NodeImpl.hpp.
| smgl::SetLogLevel | ( | LogLevel | level | ) |
Set the library log level.
| auto smgl::WrapFunc | ( | Obj * | obj, |
| ObjMemberFn && | fn, | ||
| Args &&... | args | ||
| ) |
Wrap a member function w/ arguments into a lambda function.
Definition at line 5 of file UtilitiesImpl.hpp.
| void smgl::WriteDotFile | ( | const filesystem::path & | path, |
| const Graph & | g, | ||
| const GraphStyle & | style = GraphStyle() |
||
| ) |
Write Graph to a file in the Graphviz Dot format.
Friend function: Graphviz WriteDotFile