Skip to main content

ScopedTypeVariant Class

Declaration​

class ScopedTypeVariant { ... }

Included Headers​

Public Member Typedefs Index​

usingGlobalDef = const Definition *
usingVariant = std::variant< DummyDef, LocalDef, GlobalDef >

Public Constructors Index​

ScopedTypeVariant (GlobalDef d=nullptr)
ScopedTypeVariant (const QCString &name)

Public Member Functions Index​

QCStringname () const
LocalDef *localDef ()
const LocalDef *localDef () const
const Definition *globalDef () const
boolisDummy () const

Private Member Attributes Index​

QCStringm_name
Variantm_variant

Description​

Variant class for a scoped type.

Variants:

  • DummyDef: a type used for hiding a global type.
  • LocalDef: a locally defined type (e.g. found inside a function)
  • GlobalDef: a globally defined type (processed by doxygen in an earlier pass).

Definition at line 46 of file scopedtypevariant.h.

Public Member Typedefs​

GlobalDef​

using ScopedTypeVariant::GlobalDef = const Definition *

Definition at line 50 of file scopedtypevariant.h.

50 using GlobalDef = const Definition *;

Variant​

using ScopedTypeVariant::Variant = std::variant<DummyDef,LocalDef,GlobalDef>

Definition at line 51 of file scopedtypevariant.h.

51 using Variant = std::variant<DummyDef,LocalDef,GlobalDef>;

Public Constructors​

ScopedTypeVariant()​

ScopedTypeVariant::ScopedTypeVariant (GlobalDef d=nullptr)
inline explicit

Definition at line 52 of file scopedtypevariant.h.

52 explicit ScopedTypeVariant(GlobalDef d = nullptr)
53 : m_name(d ? d->name() : QCString()), m_variant(d ? Variant(d) : Variant(DummyDef())) {}

References m_name, m_variant and name.

ScopedTypeVariant()​

ScopedTypeVariant::ScopedTypeVariant (const QCString & name)
inline explicit

Definition at line 54 of file scopedtypevariant.h.

References m_name, m_variant and name.

Public Member Functions​

globalDef()​

const Definition * ScopedTypeVariant::globalDef ()
inline

Definition at line 59 of file scopedtypevariant.h.

59 const Definition *globalDef() const { auto pp = std::get_if<GlobalDef>(&m_variant); return pp ? *pp : nullptr; }

Reference m_variant.

Referenced by writeObjCMethodCall.

isDummy()​

bool ScopedTypeVariant::isDummy ()
inline

Definition at line 60 of file scopedtypevariant.h.

60 bool isDummy() const { return std::holds_alternative<DummyDef>(m_variant); }

Reference m_variant.

Referenced by generateClassOrGlobalLink, generateClassOrGlobalLink, generateMemberLink and setCallContextForVar.

localDef()​

LocalDef * ScopedTypeVariant::localDef ()
inline

Definition at line 57 of file scopedtypevariant.h.

57 LocalDef *localDef() { return std::get_if<LocalDef>(&m_variant); }

Reference m_variant.

Referenced by generateFunctionLink, generateFunctionLink, generateMemberLink and getLinkInScope.

localDef()​

const LocalDef * ScopedTypeVariant::localDef ()
inline

Definition at line 58 of file scopedtypevariant.h.

58 const LocalDef *localDef() const { return std::get_if<LocalDef>(&m_variant); }

Reference m_variant.

name()​

QCString ScopedTypeVariant::name ()
inline

Definition at line 56 of file scopedtypevariant.h.

56 QCString name() const { return m_name; }

Reference m_name.

Referenced by generateClassOrGlobalLink, generateMemberLink, ScopedTypeVariant, ScopedTypeVariant and setCallContextForVar.

Private Member Attributes​

m_name​

QCString ScopedTypeVariant::m_name

Definition at line 63 of file scopedtypevariant.h.

Referenced by name, ScopedTypeVariant and ScopedTypeVariant.

m_variant​

Variant ScopedTypeVariant::m_variant

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


Generated via doxygen2docusaurus 2.0.0 by Doxygen 1.14.0.