Class CStructEntity#

Inheritance Relationships#

Base Type#

Derived Types#

Class Documentation#

class CStructEntity : public CDefinitionEntity#

The struct definition of an IDL file.

The struct section of the IDL file contains multiple declarations of members, as well as the definitions of structs and unions.

Subclassed by CExceptionEntity, CUnionEntity

Public Functions

CStructEntity(const CContextPtr &rptrContext, CEntityPtr ptrParent)#

Default constructor.

Parameters:
  • rptrContext[in] Reference to the smart pointer holding the parse context. Must not be NULL.

  • ptrParent[in] Pointer to the parent class holding this entity. This must not be NULL.

virtual ~CStructEntity() override = default#

Destructor.

inline virtual sdv::idl::EEntityType GetType() const override#

Get the type of the entity. Overload of CEntity::GetType.

Returns:

Returns the struct type.

virtual std::string GetDeclTypeStr(bool bResolveTypedef) const override#

Get the declaration type of the entity as string. Overload of CEntity::GetDeclTypeStr.

Parameters:

bResolveTypedef[in] When set, resolve the typedef type into the base type.

Returns:

Returns a string with struct type.

virtual void Process() override#

Process the code. Overload of CEntity::Process.

virtual bool Supports(EDefinitionSupport eSupport) const override#

Request whether the definition supports the content. Overload of CDefintionEntity::Supports.

Parameters:

eSupport[in] The type of support that is requested.

Returns:

Returns ‘true’ when the definition supports the content; ‘false’ otherwise.

inline virtual bool SupportsInheritance() const override#

Does the entity support inheritance? Overload of CDefinitionEntity::SupportsInheritance.

Returns:

Returns whether the entity supports inheritance.

inline virtual bool SupportsAnonymous() const override#

Does the entity declaration support anonymous naming? Overload of CDefinitionEntity::SupportsAnonymous.

Remark

C11 supports anonymous structs. C++ not! Therefore, IDL does not support anonymous structs.

Returns:

Returns whether the entity supports inheritance.

virtual void CreateValueNode() override#

Create the content value node. Overload of CDefinitionEntity::CreateValueNode.

Create the value node and assign the value node to the ValueRef() reference..