docs: add doxygen comments for GeometryConnection class
This commit is contained in:
@@ -6,24 +6,56 @@
|
|||||||
namespace enzo::nt
|
namespace enzo::nt
|
||||||
{
|
{
|
||||||
class GeometryOperator;
|
class GeometryOperator;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @class GeometryConnection
|
||||||
|
* @brief Directional edges to connect nodes
|
||||||
|
*
|
||||||
|
*
|
||||||
|
* @todo Currently geometry connections are stored on nodes. It might
|
||||||
|
* make more sense to move them to a container within the network manager
|
||||||
|
* so they're all in the same place
|
||||||
|
*
|
||||||
|
* Input and output are in relation to data flow.
|
||||||
|
*
|
||||||
|
* @todo Currently geometry connections are stored on nodes. It might
|
||||||
|
* make more sense to move them to a container within the network manager
|
||||||
|
* so they're all in the same place
|
||||||
|
*/
|
||||||
|
|
||||||
class GeometryConnection
|
class GeometryConnection
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
// input and output are in relation to data flow
|
/**
|
||||||
// the input node is the node the data flows from
|
* @brief Constructs a connection between two nodes
|
||||||
// the output node is the node the data flows to
|
*
|
||||||
GeometryConnection(enzo::nt::OpId inputOpId, unsigned int inputIndex, enzo::nt::OpId outputOpId, unsigned int outputIndex);
|
* Input and output are in relation to data flow.
|
||||||
|
*
|
||||||
|
* @param inputOpId The [Operator ID](@ref OpId) in which data flows from.
|
||||||
|
* @param outputOpId The [Operator ID](@ref OpId) in which data flows to.
|
||||||
|
* @param inputOpIndex The output socket number of @p inputOpId in which data flows from.
|
||||||
|
* @param outputOpIndex The input socket number of @p outputOpId in which data flows to.
|
||||||
|
*/
|
||||||
|
GeometryConnection(enzo::nt::OpId inputOpId, unsigned int inputOpIndex, enzo::nt::OpId outputOpId, unsigned int outputOpIndex);
|
||||||
|
|
||||||
|
/// @brief Returns the [Operator ID](@ref OpId) of the connection input (where data flows from).
|
||||||
enzo::nt::OpId getInputOpId() const;
|
enzo::nt::OpId getInputOpId() const;
|
||||||
|
/// @brief Returns the [Operator ID](@ref OpId) of the connection output (where data flows to).
|
||||||
enzo::nt::OpId getOutputOpId() const;
|
enzo::nt::OpId getOutputOpId() const;
|
||||||
|
/// @brief Returns the socket number of #getInputOpId in which data flows from.
|
||||||
unsigned int getInputIndex() const;
|
unsigned int getInputIndex() const;
|
||||||
|
/// @brief Returns the socket number of #getOutputOpId in which data flows to.
|
||||||
unsigned int getOutputIndex() const;
|
unsigned int getOutputIndex() const;
|
||||||
|
|
||||||
|
/// @brief Provides an ostream representation of the connection, useful for debugging.
|
||||||
friend std::ostream& operator<<(std::ostream& os, const GeometryConnection& p)
|
friend std::ostream& operator<<(std::ostream& os, const GeometryConnection& p)
|
||||||
{
|
{
|
||||||
return os << p.inputOperatorId_ << ":" << p.inputIndex_ << " -> " << p.outputOperatorId_ << ":" << p.outputIndex_ << "\n";
|
return os << p.inputOperatorId_ << ":" << p.inputIndex_ << " -> " << p.outputOperatorId_ << ":" << p.outputIndex_ << "\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// @brief A signal emitted when the connection is removed
|
||||||
boost::signals2::signal<void ()> removed;
|
boost::signals2::signal<void ()> removed;
|
||||||
|
/// @brief Removes the connection from it's associated nodes. Does not delete the object.
|
||||||
void remove();
|
void remove();
|
||||||
// bool isValid();
|
// bool isValid();
|
||||||
private:
|
private:
|
||||||
|
|||||||
@@ -74,6 +74,9 @@ namespace enzo
|
|||||||
}
|
}
|
||||||
namespace nt
|
namespace nt
|
||||||
{
|
{
|
||||||
|
/**
|
||||||
|
* @brief The unique ID assigned to each node in the network.
|
||||||
|
*/
|
||||||
using OpId = uint64_t;
|
using OpId = uint64_t;
|
||||||
|
|
||||||
enum class SocketIOType {
|
enum class SocketIOType {
|
||||||
|
|||||||
Reference in New Issue
Block a user