|
| ADT (int32_t tag, std::vector< ObjectRef > fields) |
| construct an ADT object reference. More...
|
|
template<typename Iterator > |
| ADT (int32_t tag, Iterator begin, Iterator end) |
| construct an ADT object reference. More...
|
|
| ADT (int32_t tag, std::initializer_list< ObjectRef > init) |
| construct an ADT object reference. More...
|
|
const ObjectRef & | operator[] (size_t idx) const |
| Access element at index. More...
|
|
int32_t | tag () const |
| Return the ADT tag. More...
|
|
size_t | size () const |
| Return the number of fields. More...
|
|
| TVM_DEFINE_OBJECT_REF_METHODS (ADT, ObjectRef, ADTObj) |
|
| ObjectRef ()=default |
| default constructor More...
|
|
| ObjectRef (ObjectPtr< Object > data) |
| Constructor from existing object ptr. More...
|
|
bool | same_as (const ObjectRef &other) const |
| Comparator. More...
|
|
bool | operator== (const ObjectRef &other) const |
| Comparator. More...
|
|
bool | operator!= (const ObjectRef &other) const |
| Comparator. More...
|
|
bool | operator< (const ObjectRef &other) const |
| Comparator. More...
|
|
bool | defined () const |
|
const Object * | get () const |
|
const Object * | operator-> () const |
|
bool | unique () const |
|
int | use_count () const |
|
template<typename ObjectType , typename = std::enable_if_t<std::is_base_of_v<Object, ObjectType>>> |
const ObjectType * | as () const |
| Try to downcast the internal Object to a raw pointer of a corresponding type. More...
|
|
template<typename ObjectRefType , typename = std::enable_if_t<std::is_base_of_v<ObjectRef, ObjectRefType>>> |
Optional< ObjectRefType > | as () const |
| Try to downcast the ObjectRef to a Optional<T> of the requested type. More...
|
|
reference to algebraic data type objects.