Namespaces | |
maxon | |
maxon::corenodes | |
maxon::corenodes::details | |
Macros | |
#define | MAXON_PORT_INPUT(T, name, ...) |
#define | MAXON_PORT_INPUT_LAMBDA(T, name) |
#define | MAXON_PORT_INPUT_NAMED(T, name, portId, ...) |
#define | MAXON_PORT_OUTPUT(T, name, ...) |
#define | MAXON_PORT_OUTPUT_NAMED(T, name, portId, ...) |
#define | MAXON_PORT_OUTPUT_LOCAL(T, name, ...) |
#define | PRIVATE_MAXON_PORT(W, name, portId, idtype, mtype, flags, mode, allowed) |
#define | PRIVATE_MAXON_PORT_INPUT(W, name, portId, MICROFLAGS) |
#define | PRIVATE_MAXON_PORT_OUTPUT(W, name, portId, MICROFLAGS) |
#define | PRIVATE_MAXON_PORT_LCV(W, name, portId, MICROFLAGS) |
#define | MAXON_PORT_LCV(T, name, ...) |
#define | MAXON_PORT_LCV_NAMED(T, name, portId, ...) |
#define | MAXON_PORT_LCV_LOCAL(T, name, ...) |
#define | PRIVATE_MAXON_PORT_REDUCTION(W, name, portId, MICROFLAGS) |
#define | PRIVATE_MAXON_REDUCTION_PORT(T, name, mtype, MICROFLAGS) |
#define | MAXON_PORT_REDUCTION(T, name, ...) |
#define | MAXON_PORT_REDUCTION_NAMED(T, name, portId, ...) |
#define | MAXON_PORT_REDUCTION_LOCAL(T, name, ...) |
Typedefs | |
template<typename T > | |
using | MyBegin = typename T::Begin |
template<typename T > | |
using | UnannotatedTypeHelper = typename SubstituteType< T, UnannotatedType >::type |
Functions | |
template<typename T > | |
PortTypeWrapper< T > | GetPortTypeWrapper () |
template<const auto & A> | |
std::decay_t< decltype(A)> | GetPortTypeWrapper () |
Variables | |
static constexpr Char | g_internalPortPrefix |
static constexpr Char | g_variadicPortIdSeparator |
#define MAXON_PORT_INPUT | ( | T, | |
name, | |||
... | |||
) |
Defines an input port of a micro node group with the given type and name. The macro has to be used within a micro node group implementation class, see MicroNodeGroupInterface for a complete example.
To be accessible within the Process method of a micro node, you have to add the port to the port list of the BasicMicroNode::Ports or BasicMicroNode::Batch template for the Process methods's parameter. Within the method you can use two operations on the port:
{ports.name()} returns the value of the input port.
{ports.name.HasValue()} returns true if the port has some explicitly given value (such as a default value or a value coming from a connected upstream port), false otherwise.The following code shows the usage of MAXON_PORT_INPUT:
[in] | T | The type of the port or a MAXON_ATTRIBUTE. In the latter case type and port id are taken from the attribute. |
[in] | name | The name of the port. |
[in] | ... | Optional MicroNode::FLAGS for the port. |
#define MAXON_PORT_INPUT_LAMBDA | ( | T, | |
name | |||
) |
#define MAXON_PORT_INPUT_NAMED | ( | T, | |
name, | |||
portId, | |||
... | |||
) |
Defines a named input port with an id that can differ from the name.
#define MAXON_PORT_OUTPUT | ( | T, | |
name, | |||
... | |||
) |
Defines an output port of a micro node group with the given type and name. The macro has to be used within a micro node group implementation class, see MicroNodeGroupInterface for a complete example.
To be accessible within the Process method of a micro node, you have to add the port to the port list of the BasicMicroNode::Ports or BasicMicroNode::Batch template for the Process methods's parameter. Within the method you can use several operations on the port:
{ports.name.Update(v)} updates the output value with v. Update checks if the value differs from the previous value, and also updates the modification stamp in that case.
{ports.name.GetWritable()} returns an l-value-reference to the value of the output port. You can modify the value through that reference. The modification stamp of the port's value is automatically updated by the call to GetWritable(), whether there will be a subsequent modification of the value or not.
{ports.name.GetWritableTouchLater()} returns an l-value-reference to the value of the output port. You can modify the value through that reference. If you have made some modification, you have to make sure to update the modification stamp of the port's value by a call to Touch(), otherwise downstream parts of the core node graph might not get re-evaluated.
{ports.name.Touch()} updates the modification stamp of the port value. You have to call this after GetWritableTouchLater() if you've made an actual modification.
{ports.name.IsNeeded()} returns true if the port's value is needed at all, false otherwise. This is useful for micro nodes with multiple output ports where only some of them are needed by downstream parts of the core node graph to avoid unnecessary, time-consuming computations. If the micro node has just a single output port this isn't needed because the micro node won't be evaluated if the output port's value isn't used.
{ports.name.IsTimeStamped()} returns true if the port's value is time-stamped, false otherwise.The following code shows the usage of MAXON_PORT_OUTPUT:
[in] | T | The type of the port or a MAXON_ATTRIBUTE. In the latter case type and port id are taken from the attribute. |
[in] | name | The name of the port. |
[in] | ... | Optional MicroNode::FLAGS for the port. |
#define MAXON_PORT_OUTPUT_NAMED | ( | T, | |
name, | |||
portId, | |||
... | |||
) |
Defines a named output port with an id that can differ from the name.
#define MAXON_PORT_OUTPUT_LOCAL | ( | T, | |
name, | |||
... | |||
) |
Defines a local output port of a micro node group with the given type and name. A local port isn't exported automatically as a port of the group, instead it can only be used to connect micro nodes within a group.
[in] | T | The type of the port or a MAXON_ATTRIBUTE. In the latter case type and port id are taken from the attribute. |
[in] | name | The name of the port. |
[in] | ... | Optional MicroNode::FLAGS for the port. |
#define PRIVATE_MAXON_PORT_INPUT | ( | W, | |
name, | |||
portId, | |||
MICROFLAGS | |||
) |
#define PRIVATE_MAXON_PORT_OUTPUT | ( | W, | |
name, | |||
portId, | |||
MICROFLAGS | |||
) |
#define PRIVATE_MAXON_PORT_LCV | ( | W, | |
name, | |||
portId, | |||
MICROFLAGS | |||
) |
#define MAXON_PORT_LCV | ( | T, | |
name, | |||
... | |||
) |
#define MAXON_PORT_LCV_NAMED | ( | T, | |
name, | |||
portId, | |||
... | |||
) |
#define MAXON_PORT_LCV_LOCAL | ( | T, | |
name, | |||
... | |||
) |
#define PRIVATE_MAXON_PORT_REDUCTION | ( | W, | |
name, | |||
portId, | |||
MICROFLAGS | |||
) |
#define PRIVATE_MAXON_REDUCTION_PORT | ( | T, | |
name, | |||
mtype, | |||
MICROFLAGS | |||
) |
#define MAXON_PORT_REDUCTION | ( | T, | |
name, | |||
... | |||
) |
#define MAXON_PORT_REDUCTION_NAMED | ( | T, | |
name, | |||
portId, | |||
... | |||
) |
#define MAXON_PORT_REDUCTION_LOCAL | ( | T, | |
name, | |||
... | |||
) |