Namespaces | |
maxon | |
maxon::corenodes | |
maxon::corenodes::details | |
Typedefs | |
template<typename T > | |
using | MyBegin = typename T::Begin |
template<typename T > | |
using | PortValueTypeHelper = typename std::conditional< STD_IS_REPLACEMENT(reference, T), typename std::decay< T >::type, typename std::add_const< T >::type >::type |
template<typename T > | |
using | UnannotatedTypeHelper = typename SubstituteType< T, UnannotatedType >::type |
using | PrivateMaxonCorenodesParentDimension = void |
Functions | |
template<typename DIMENSION > | |
Int | ComputeLinearIndex (const Int *index) |
template<> | |
Int | ComputeLinearIndex< Char > (const Int *index) |
template<typename DIMENSION > | |
Int | ComputeLinearIndex (Int index) |
template<typename PORTIDTYPE > | |
constexpr UInt | GetPortHashCodeHelper (PORTIDTYPE const &inId) |
constexpr UInt | GetPortHashCodeHelper (LiteralId const &inId) |
template<Int LENGTH> | |
constexpr UInt | GetPortHashCodeHelper (const char(&inId)[LENGTH]) |
#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 MicroNode::Ports or BatchMicroNode::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_INPUT_PORT:
[in] | T | The type of the port. |
[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_INDEXED | ( | T, | |
name, | |||
N | |||
) |
Defines an indexed input port of a micro node group with the given type and name. An indexed port is an indexable collection of N ports with same name and type. The number N has to be a compile-time constant, for a dynamic number of ports see VariadicPort.
The macro has to be used within a micro node group implementation class, afterwards you can use the indexed port for micro nodes as in this example:
[in] | T | The type of the indexed port. |
[in] | name | The name of the indexed port. |
[in] | N | The number of ports. |
#define MAXON_PORT_INPUT_NAMED | ( | T, | |
name, | |||
portId | |||
) |
#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 MicroNode::Ports or BatchMicroNode::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_OUTPUT_PORT:
[in] | T | The type of the port. |
[in] | name | The name of the port. |
[in] | ... | Optional MicroNode::FLAGS for the port. |
#define MAXON_PORT_OUTPUT_INDEXED | ( | T, | |
name, | |||
N | |||
) |
Defines an indexed output port of a micro node group with the given type and name, see MAXON_PORT_INPUT_INDEXED for more details.
[in] | T | The type of the indexed port. |
[in] | name | The name of the indexed port. |
[in] | N | The number of ports. |
#define MAXON_PORT_OUTPUT_NAMED | ( | T, | |
name, | |||
portId | |||
) |
#define PRIVATE_MAXON_PORT_WRAP_false | ( | CNT, | |
... | |||
) |
#define PRIVATE_MAXON_PORT_WRAP_true | ( | CNT, | |
... | |||
) |
#define PRIVATE_MAXON_PORT_DIMENSION_false | ( | CNT | ) |
#define PRIVATE_MAXON_PORT_DIMENSION_true | ( | CNT | ) |
#define PRIVATE_MAXON_PORT_MEMBER | ( | name, | |
ARRAY, | |||
CNT | |||
) |
#define PRIVATE_MAXON_PORT | ( | name, | |
portId, | |||
ARRAY, | |||
CNT, | |||
... | |||
) |
#define PRIVATE_MAXON_PORT_GET_NAME_HASHCODE | ( | name | ) |
#define PRIVATE_MAXON_INPUT_PORT_NAMED | ( | T, | |
name, | |||
portId, | |||
MICROFLAGS, | |||
ARRAY, | |||
CNT, | |||
... | |||
) |
#define PRIVATE_MAXON_INPUT_PORT | ( | T, | |
name, | |||
MICROFLAGS, | |||
ARRAY, | |||
CNT, | |||
... | |||
) |
#define PRIVATE_MAXON_STATE_PORT | ( | T, | |
name, | |||
MICROFLAGS, | |||
ARRAY, | |||
CNT, | |||
... | |||
) |
#define PRIVATE_MAXON_OUTPUT_PORT_NAMED | ( | T, | |
name, | |||
portId, | |||
mtype, | |||
MICROFLAGS, | |||
ARRAY, | |||
CNT, | |||
... | |||
) |
#define PRIVATE_MAXON_OUTPUT_PORT | ( | T, | |
name, | |||
mtype, | |||
MICROFLAGS, | |||
ARRAY, | |||
CNT, | |||
... | |||
) |
using PrivateMaxonCorenodesParentDimension = void |