ConversionSequence Class Reference

#include <corenodes_conversion.h>

详细描述

A ConversionSequence is a sequence of conversions (implemented by ConversionNode and registered by MAXON_CORENODE_REGISTER_CONVERSION) which are needed to convert from a source type to a destination type. It is created by CoreNodesLib::GetConversion() .

Public Types

using  PartiallyOrdered = std::true_type

公共成员函数

Result < 数据 转换 (const ConstDataPtr &source) const
const CoreNode &  operator[] ( Int index) const
CoreNode &  operator[] ( Int index)
Int   GetCount () const
Block < const CoreNode >  ToBlock () const
  operator Block< const CoreNode > () const
CONVERSION_FLAGS   GetFlags () const
Bool   operator== (const ConversionSequence &other) const
Bool   operator!= (const ConversionSequence &other) const
Bool   operator> (const ConversionSequence &other) const
Bool   operator>= (const ConversionSequence &other) const
Bool   operator< (const ConversionSequence &other) const
Bool   operator<= (const ConversionSequence &other) const
String   ToString (const FormatStatement *fs=nullptr) const
  ~ConversionSequence ()

私有成员函数

  ConversionSequence ( CONVERSION_FLAGS flags, Int count)

Private Attributes

const CONVERSION_FLAGS   _flags
const Int   _count
const CoreNodeInterface _sequence []

Friends

class  CoreNodesLibImpl

Member Typedef Documentation

◆  PartiallyOrdered

using PartiallyOrdered = std::true_type

构造函数 & 析构函数文档编制

◆  ~ConversionSequence()

~ ConversionSequence ( )

◆  ConversionSequence()

ConversionSequence ( CONVERSION_FLAGS   flags ,
Int   count  
)
private

成员函数文档编制

◆  Convert()

Result < 数据 > Convert ( const ConstDataPtr source ) const

◆  operator[]() [1/2]

const CoreNode& operator[] ( Int   index ) const

Returns the conversion node at #index. The conversion sequence applies conversion nodes in ascending order.

参数
[in] index Index within this sequence.
返回
Conversion node at #index.

◆  operator[]() [2/2]

CoreNode& operator[] ( Int   index )

◆  GetCount()

Int GetCount ( ) const

Returns the number of conversions of this sequence.

返回
Number of conversions.

◆  ToBlock()

Block <const CoreNode> ToBlock ( ) const

Returns this conversion sequence as a block. The conversion sequence applies conversion nodes in ascending order.

返回
Conversion sequence as a block.

◆  operator Block< const CoreNode >()

operator Block < const CoreNode > ( ) const

Returns this conversion sequence as a block. The conversion sequence applies conversion nodes in ascending order.

返回
Conversion sequence as a block.

◆  GetFlags()

CONVERSION_FLAGS GetFlags ( ) const

Returns the conversion flags of this sequence. They are the combination of the flags of the individual conversion nodes.

返回
Conversion flags of this sequence.

◆  operator==()

Bool operator== ( const ConversionSequence other ) const

Checks if this @CLASS equals #other.

参数
[in] other Another @CLASS.
返回
True if this equals #other, false otherwise.

◆  operator!=()

Bool operator!= ( const ConversionSequence other ) const

Checks if this @CLASS is not equal to #other.

参数
[in] other Another @CLASS.
返回
True if this is not equal to #other, false otherwise.

◆  operator>()

Bool operator> ( const ConversionSequence other ) const

Checks if this conversion sequence is better than #other. For example a shorter sequence is better than a longer one, or the sequence Vec3<Float> → Float → Int is better than Vec3<Float> → Vec3<Int> → Int. This implements a partial ordering, i.e., there are pairs of sequences where one sequence is neither better nor worse than the other one.

参数
[in] other Another conversion sequence.
返回
True if this sequence is better than #other, false otherwise.

◆  operator>=()

Bool operator>= ( const ConversionSequence other ) const

Checks if this conversion sequence is better than #other or the same. This implements a partial ordering. See operator> for more details.

参数
[in] other Another conversion sequence.
返回
True if this sequence is better than #other or the same, false otherwise.

◆  operator<()

Bool operator< ( const ConversionSequence other ) const

Checks if this conversion sequence is worse than #other. This implements a partial ordering. See operator> for more details.

参数
[in] other Another conversion sequence.
返回
True if this sequence is worse than #other, false otherwise.

◆  operator<=()

Bool operator<= ( const ConversionSequence other ) const

Checks if this conversion sequence is worse than #other or the same. This implements a partial ordering. See operator> for more details.

参数
[in] other Another conversion sequence.
返回
True if this sequence is worse than #other or the same, false otherwise.

◆  ToString()

String ToString ( const FormatStatement fs = nullptr ) const

Returns a String representation of this @CLASS.

参数
[in] formatStatement Nullptr or additional formatting instruction.
返回
String representation of this @CLASS.

Friends And Related Function Documentation

◆  CoreNodesLibImpl

friend class CoreNodesLibImpl friend

Member Data Documentation

◆  _flags

const CONVERSION_FLAGS _flags
private

◆  _count

const Int _count
private

◆  _sequence

const CoreNodeInterface * _sequence[]
private