Class CCaseEntry#

Inheritance Relationships#

Base Types#

Class Documentation#

class CCaseEntry : public CVariableEntity, public sdv::idl::ICaseEntity#

The enum entry declaration.

Public Functions

CCaseEntry(const CContextPtr &rptrContext, CEntityPtr ptrParent, bool bDefault)#

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.

  • bDefault[in] When set, the entry is the default case entry.

virtual ~CCaseEntry() override = default#

Destructor.

virtual sdv::interface_t GetInterface(sdv::interface_id idInterface) override#

Get access to another interface. Overload of sdv::IInterfaceAccess::GetInterface.

Parameters:

idInterface[in] The interface id to get access to.

Returns:

Returns a pointer to the interface or NULL when the interface is not supported.

virtual sdv::u8string GetLabel() const override#

Get the case label string. Overload of sdv::idl::ICaseEntity::GetLabel.

Returns:

The label string.

inline virtual bool IsDefault() const override#

Is the case a default cae entry. Overload of sdv::idl::ICaseEntity::IsDefault.

Returns:

Returns whether this is the default case entry.

const CToken &GetLabelToken() const#

Get the label token (used for error reporting).

Returns:

Returns a reference to the variable containing the label token.

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

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

Returns:

Returns the union entity 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 union type.

virtual void Process() override#

Process the code. Overload of CEntity::Process.

void PostProcess()#

Post process the case entry.

inline virtual bool SupportAssignments() const override#

The entity doesn’t support assignments. Overload of CDeclarationEntity::SupportAssignments.

Returns:

Returns whether assignments are supported (which is not the case).