Class CTypedefEntity#

Inheritance Relationships#

Base Type#

Class Documentation#

class CTypedefEntity : public CDeclarationEntity#

The const definition of an IDL file.

The const section of the IDL file defines const values.

Public Functions

CTypedefEntity(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.

CTypedefEntity(const CContextPtr &rptrContext, CEntityPtr ptrParent, const std::string &rssName)#

Constructor for a local named type entity without parsing.

Attention

This type entity is not attached as a child.

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.

  • rssName[in] Reference to the name.

virtual ~CTypedefEntity() override = default#

Destructor.

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

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

Returns:

The typedef entity type.

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

Get the qualified type of the entity. Overload of CEntity::GetDeclTypeStr.

The qualified type consists of “<base type> <type identifier>”.

Attention

To get the qualified type including array sizes, use the GetDeclTypeStr of the CEntityValueNode class.

Parameters:

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

Returns:

String with the typedef entity type.

virtual void Process() override#

Process the code. Overload of CEntity::Process.

inline virtual bool SupportArrays() const override#

Does the entity support arrays? Overload of CDeclarationEntity::SupportArrays.

Returns:

Returns ‘true’ when the entity supports assignments; ‘false’ otherwise.

inline virtual bool RequiresAssignment() const override#

Does the entity require an assignment? Overload of CDeclarationEntity::RequiresAssignment.

Returns:

Returns ‘true’ when the entity requires an assignment; ‘false’ otherwise.

virtual std::pair<CEntityPtr, bool> FindLocal(const std::string &rssName, bool bDeclaration) const override#

Find the entity locally. Overload of CEntity::FindLocal.

Parameters:
  • rssName[in] Reference to the string object containing the name of the entity to search for.

  • bDeclaration[in] When set, the name belongs to a declaration; otherwise it belongs to a definition. Needed to allow the reuse of names between declarations and definitions.

Returns:

Returns a pair object containing an entity pointer if the entity exists or a NULL pointer if not as well as a boolean that indicates that the entity was from an inherited entity.