Classes | Public Types | Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes | Friends | List of all members
dai::Node Class Referenceabstract

Abstract Node. More...

#include <Node.hpp>

Inheritance diagram for dai::Node:
Inheritance graph
[legend]

Classes

struct  Connection
 Connection between an Input and Output. More...
 
struct  DatatypeHierarchy
 
class  Input
 
class  InputMap
 
class  Output
 
class  OutputMap
 

Public Types

using Id = std::int64_t
 Node identificator. Unique for every node on a single Pipeline. More...
 

Public Member Functions

virtual std::unique_ptr< Nodeclone () const =0
 Deep copy the node. More...
 
AssetManagergetAssetManager ()
 Get node AssetManager as a reference. More...
 
const AssetManagergetAssetManager () const
 Get node AssetManager as a const reference. More...
 
std::vector< Input * > getInputRefs ()
 Retrieves reference to node inputs. More...
 
std::vector< const Input * > getInputRefs () const
 Retrieves reference to node inputs. More...
 
std::vector< InputgetInputs ()
 Retrieves all nodes inputs. More...
 
virtual const char * getName () const =0
 Retrieves nodes name. More...
 
std::vector< Output * > getOutputRefs ()
 Retrieves reference to node outputs. More...
 
std::vector< const Output * > getOutputRefs () const
 Retrieves reference to node outputs. More...
 
std::vector< OutputgetOutputs ()
 Retrieves all nodes outputs. More...
 
Pipeline getParentPipeline ()
 
const Pipeline getParentPipeline () const
 
 Node (const std::shared_ptr< PipelineImpl > &p, Id nodeId, std::unique_ptr< Properties > props)
 Constructs Node. More...
 
virtual ~Node ()=default
 

Public Attributes

const Id id
 Id of node. More...
 
Propertiesproperties
 

Protected Member Functions

virtual PropertiesgetProperties ()
 
virtual tl::optional< OpenVINO::VersiongetRequiredOpenVINOVersion ()
 
void setInputMapRefs (InputMap *inMapRef)
 
void setInputMapRefs (std::initializer_list< InputMap * > l)
 
void setInputRefs (Input *inRef)
 
void setInputRefs (std::initializer_list< Input * > l)
 
void setOutputMapRefs (OutputMap *outMapRef)
 
void setOutputMapRefs (std::initializer_list< OutputMap * > l)
 
void setOutputRefs (Output *outRef)
 
void setOutputRefs (std::initializer_list< Output * > l)
 

Protected Attributes

AssetManager assetManager
 
std::unordered_map< std::string, InputMap * > inputMapRefs
 
std::unordered_map< std::string, Input * > inputRefs
 
std::unordered_map< std::string, OutputMap * > outputMapRefs
 
std::unordered_map< std::string, Output * > outputRefs
 
std::weak_ptr< PipelineImplparent
 
copyable_unique_ptr< PropertiespropertiesHolder
 

Friends

class Pipeline
 
class PipelineImpl
 

Detailed Description

Abstract Node.

Definition at line 29 of file Node.hpp.

Member Typedef Documentation

◆ Id

using dai::Node::Id = std::int64_t

Node identificator. Unique for every node on a single Pipeline.

Definition at line 35 of file Node.hpp.

Constructor & Destructor Documentation

◆ Node()

dai::Node::Node ( const std::shared_ptr< PipelineImpl > &  p,
Id  nodeId,
std::unique_ptr< Properties props 
)

Constructs Node.

Definition at line 8 of file Node.cpp.

◆ ~Node()

virtual dai::Node::~Node ( )
virtualdefault

Member Function Documentation

◆ clone()

virtual std::unique_ptr<Node> dai::Node::clone ( ) const
pure virtual

Deep copy the node.

◆ getAssetManager() [1/2]

AssetManager& dai::Node::getAssetManager ( )

Get node AssetManager as a reference.

◆ getAssetManager() [2/2]

AssetManager & dai::Node::getAssetManager ( ) const

Get node AssetManager as a const reference.

Definition at line 132 of file Node.cpp.

◆ getInputRefs() [1/2]

std::vector< const Node::Input * > dai::Node::getInputRefs ( )

Retrieves reference to node inputs.

Definition at line 224 of file Node.cpp.

◆ getInputRefs() [2/2]

std::vector<const Input*> dai::Node::getInputRefs ( ) const

Retrieves reference to node inputs.

◆ getInputs()

std::vector< Node::Input > dai::Node::getInputs ( )

Retrieves all nodes inputs.

Definition at line 178 of file Node.cpp.

◆ getName()

virtual const char* dai::Node::getName ( ) const
pure virtual

Retrieves nodes name.

◆ getOutputRefs() [1/2]

std::vector< const Node::Output * > dai::Node::getOutputRefs ( )

Retrieves reference to node outputs.

Definition at line 187 of file Node.cpp.

◆ getOutputRefs() [2/2]

std::vector<const Output*> dai::Node::getOutputRefs ( ) const

Retrieves reference to node outputs.

◆ getOutputs()

std::vector< Node::Output > dai::Node::getOutputs ( )

Retrieves all nodes outputs.

Definition at line 169 of file Node.cpp.

◆ getParentPipeline() [1/2]

Pipeline dai::Node::getParentPipeline ( )

Definition at line 15 of file Node.cpp.

◆ getParentPipeline() [2/2]

const Pipeline dai::Node::getParentPipeline ( ) const

◆ getProperties()

Properties & dai::Node::getProperties ( )
protectedvirtual

◆ getRequiredOpenVINOVersion()

tl::optional< OpenVINO::Version > dai::Node::getRequiredOpenVINOVersion ( )
protectedvirtual

Reimplemented in dai::node::NeuralNetwork.

Definition at line 11 of file Node.cpp.

◆ setInputMapRefs() [1/2]

void dai::Node::setInputMapRefs ( Node::InputMap inMapRef)
protected

Definition at line 290 of file Node.cpp.

◆ setInputMapRefs() [2/2]

void dai::Node::setInputMapRefs ( std::initializer_list< InputMap * >  l)
protected

◆ setInputRefs() [1/2]

void dai::Node::setInputRefs ( Node::Input inRef)
protected

Definition at line 274 of file Node.cpp.

◆ setInputRefs() [2/2]

void dai::Node::setInputRefs ( std::initializer_list< Input * >  l)
protected

◆ setOutputMapRefs() [1/2]

void dai::Node::setOutputMapRefs ( Node::OutputMap outMapRef)
protected

Definition at line 282 of file Node.cpp.

◆ setOutputMapRefs() [2/2]

void dai::Node::setOutputMapRefs ( std::initializer_list< OutputMap * >  l)
protected

◆ setOutputRefs() [1/2]

void dai::Node::setOutputRefs ( Node::Output outRef)
protected

Definition at line 266 of file Node.cpp.

◆ setOutputRefs() [2/2]

void dai::Node::setOutputRefs ( std::initializer_list< Output * >  l)
protected

Friends And Related Function Documentation

◆ Pipeline

friend class Pipeline
friend

Definition at line 30 of file Node.hpp.

◆ PipelineImpl

friend class PipelineImpl
friend

Definition at line 31 of file Node.hpp.

Member Data Documentation

◆ assetManager

AssetManager dai::Node::assetManager
protected

Definition at line 291 of file Node.hpp.

◆ id

const Id dai::Node::id

Id of node.

Definition at line 288 of file Node.hpp.

◆ inputMapRefs

std::unordered_map<std::string, InputMap*> dai::Node::inputMapRefs
protected

Definition at line 48 of file Node.hpp.

◆ inputRefs

std::unordered_map<std::string, Input*> dai::Node::inputRefs
protected

Definition at line 45 of file Node.hpp.

◆ outputMapRefs

std::unordered_map<std::string, OutputMap*> dai::Node::outputMapRefs
protected

Definition at line 47 of file Node.hpp.

◆ outputRefs

std::unordered_map<std::string, Output*> dai::Node::outputRefs
protected

Definition at line 41 of file Node.hpp.

◆ parent

std::weak_ptr<PipelineImpl> dai::Node::parent
protected

Definition at line 284 of file Node.hpp.

◆ properties

Properties& dai::Node::properties

Definition at line 299 of file Node.hpp.

◆ propertiesHolder

copyable_unique_ptr<Properties> dai::Node::propertiesHolder
protected

Definition at line 295 of file Node.hpp.


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


depthai
Author(s): Martin Peterlin
autogenerated on Sat Jun 1 2024 02:57:08