CIRCT 24.0.0git
Loading...
Searching...
No Matches
esi::ListType Class Reference

Lists represent variable-length sequences of elements of a single type. More...

#include <Types.h>

Inheritance diagram for esi::ListType:
Collaboration diagram for esi::ListType:

Public Member Functions

 ListType (const ID &id, const Type *elementType)
const Type * getElementType () const
std::ptrdiff_t getBitWidth () const override
Public Member Functions inherited from esi::Type
 Type (const ID &id)
virtual ~Type ()=default
ID getID () const
void setHWBitwidth (std::ptrdiff_t bw)
 Set from manifest JSON hwBitwidth.
virtual MutableBitVector serialize (const std::any &obj) const
 Serialize an object to a MutableBitVector (LSB-first stream).
virtual std::any deserialize (BitVector &data) const
 Deserialize from a BitVector stream (LSB-first).
std::any deserialize (const MessageData &data) const
virtual void ensureValid (const std::any &obj) const
 Ensure that a std::any object is valid for this type.
std::optional< std::string > isValid (const std::any &obj) const
void dump (std::ostream &os, bool oneLine=false) const
std::string toString (bool oneLine=false) const

Private Attributes

const Type * elementType

Additional Inherited Members

Public Types inherited from esi::Type
using ID = std::string
Protected Attributes inherited from esi::Type
ID id
std::ptrdiff_t hwBitwidth = -1

Detailed Description

Lists represent variable-length sequences of elements of a single type.

Unlike arrays which have a fixed size, lists can have any length.

Definition at line 405 of file Types.h.

Constructor & Destructor Documentation

◆ ListType()

esi::ListType::ListType ( const ID & id,
const Type * elementType )
inline

Definition at line 407 of file Types.h.

References elementType, esi::Type::id, and esi::Type::Type().

Member Function Documentation

◆ getBitWidth()

std::ptrdiff_t esi::ListType::getBitWidth ( ) const
inlineoverridevirtual

Reimplemented from esi::Type.

Definition at line 412 of file Types.h.

◆ getElementType()

const Type * esi::ListType::getElementType ( ) const
inline

Definition at line 410 of file Types.h.

References elementType, and esi::Type::Type().

Referenced by containsWindowType(), and NB_MODULE().

Member Data Documentation

◆ elementType

const Type* esi::ListType::elementType
private

Definition at line 415 of file Types.h.

Referenced by getElementType(), and ListType().


The documentation for this class was generated from the following file: