CIRCT 22.0.0git
Loading...
Searching...
No Matches
Public Member Functions | List of all members
esi::AnyType Class Reference

The "any" type is a special type which can be used to represent any type, as identified by the type id. More...

#include <Types.h>

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

Public Member Functions

 AnyType (const ID &id)
 
std::ptrdiff_t getBitWidth () const override
 
- Public Member Functions inherited from esi::Type
 Type (const ID &id)
 
virtual ~Type ()=default
 
ID getID () const
 
virtual MessageData serialize (const std::any &obj) const
 Serialize an object to MessageData.
 
virtual std::pair< std::any, std::span< const uint8_t > > deserialize (std::span< const uint8_t > data) const
 Deserialize from a span of bytes to an object.
 
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
 

Additional Inherited Members

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

Detailed Description

The "any" type is a special type which can be used to represent any type, as identified by the type id.

Said type id is guaranteed to be present in the manifest. Importantly, the "any" type id over the wire may not be a string as it is in software.

Definition at line 134 of file Types.h.

Constructor & Destructor Documentation

◆ AnyType()

esi::AnyType::AnyType ( const ID id)
inline

Definition at line 136 of file Types.h.

Member Function Documentation

◆ getBitWidth()

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

Reimplemented from esi::Type.

Definition at line 137 of file Types.h.


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