CIRCT  20.0.0git
Public Types | Public Member Functions | Private Attributes | List of all members
esi::StructType Class Reference

Structs are an ordered collection of fields, each with a name and a type. More...

#include <Types.h>

Inheritance diagram for esi::StructType:
Inheritance graph
[legend]
Collaboration diagram for esi::StructType:
Collaboration graph
[legend]

Public Types

using FieldVector = std::vector< std::pair< std::string, const Type * > >
 
- Public Types inherited from esi::Type
using ID = std::string
 

Public Member Functions

 StructType (const ID &id, const FieldVector &fields)
 
const FieldVectorgetFields () const
 
std::ptrdiff_t getBitWidth () const override
 
- Public Member Functions inherited from esi::Type
 Type (const ID &id)
 
virtual ~Type ()=default
 
ID getID () const
 

Private Attributes

FieldVector fields
 

Additional Inherited Members

- Protected Attributes inherited from esi::Type
ID id
 

Detailed Description

Structs are an ordered collection of fields, each with a name and a type.

Definition at line 130 of file Types.h.

Member Typedef Documentation

◆ FieldVector

using esi::StructType::FieldVector = std::vector<std::pair<std::string, const Type *> >

Definition at line 132 of file Types.h.

Constructor & Destructor Documentation

◆ StructType()

esi::StructType::StructType ( const ID id,
const FieldVector fields 
)
inline

Definition at line 134 of file Types.h.

Member Function Documentation

◆ getBitWidth()

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

Reimplemented from esi::Type.

Definition at line 138 of file Types.h.

References getFields().

◆ getFields()

const FieldVector& esi::StructType::getFields ( ) const
inline

Definition at line 137 of file Types.h.

References fields.

Referenced by getBitWidth(), and PYBIND11_MODULE().

Member Data Documentation

◆ fields

FieldVector esi::StructType::fields
private

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