Doxygen
Loading...
Searching...
No Matches
EntryType Class Reference

Wrapper class for the Entry type. More...

#include <src/types.h>

Public Member Functions

ENTRY_TYPES constexpr bool isCompound () const noexcept
constexpr bool isScope () const noexcept
constexpr bool isFile () const noexcept
constexpr bool isCompoundDoc () const noexcept
constexpr bool isDoc () const noexcept
std::string to_string () const

Private Types

enum  TypeName { ENTRY_TYPES }
enum  CategoryBits {
  None = 0 , Compound = (1<<16) , Scope = (1<<17) , File = (1<<18) ,
  CompoundDoc = (1<<19) , Doc = (1<<20) , TypeMask = 0x0000FFFF , CategoryMask = 0xFFFF0000
}

Private Member Functions

constexpr EntryType (int t) noexcept
std::string bits_to_string () const
constexpr TypeName type () const noexcept

Private Attributes

unsigned int m_type = Empty

Friends

bool operator== (const EntryType &t1, const EntryType &t2)
bool operator!= (const EntryType &t1, const EntryType &t2)

Detailed Description

Wrapper class for the Entry type.

Can be set only during construction. Packs the type together with category flags.

Definition at line 815 of file types.h.

Member Enumeration Documentation

◆ CategoryBits

Enumerator
None 
Compound 
Scope 
File 
CompoundDoc 
Doc 
TypeMask 
CategoryMask 

Definition at line 851 of file types.h.

852 {
853 None = 0,
854 Compound = (1<<16),
855 Scope = (1<<17),
856 File = (1<<18),
857 CompoundDoc = (1<<19),
858 Doc = (1<<20),
859 TypeMask = 0x0000FFFF,
860 CategoryMask = 0xFFFF0000
861 };
@ None
Definition types.h:853
@ Scope
Definition types.h:855
@ File
Definition types.h:856
@ CategoryMask
Definition types.h:860
@ Compound
Definition types.h:854
@ TypeMask
Definition types.h:859
@ Doc
Definition types.h:858
@ CompoundDoc
Definition types.h:857

◆ TypeName

enum EntryType::TypeName
private
Enumerator
ENTRY_TYPES 

Definition at line 843 of file types.h.

844 {
845#define ETYPE(x,bits) \
846 x,
848#undef ETYPE
849 };
@ ENTRY_TYPES
Definition types.h:847

Constructor & Destructor Documentation

◆ EntryType()

EntryType::EntryType ( int t)
inlineexplicitconstexprprivatenoexcept

Definition at line 862 of file types.h.

862: m_type(t) {}
unsigned int m_type
Definition types.h:873

Referenced by operator!=, and operator==.

Member Function Documentation

◆ bits_to_string()

std::string EntryType::bits_to_string ( ) const
inlineprivate

Definition at line 863 of file types.h.

864 {
865 std::string result;
866 if (m_type&Compound) result+=",Compound";
867 if (m_type&Scope) result+=",Scope";
868 if (m_type&File) result+=",File";
869 if (m_type&CompoundDoc) result+=",CompoundDoc";
870 return result;
871 }

References Compound, CompoundDoc, File, m_type, and Scope.

◆ isCompound()

ENTRY_TYPES constexpr bool EntryType::isCompound ( ) const
inlineconstexprnoexcept

◆ isCompoundDoc()

bool EntryType::isCompoundDoc ( ) const
inlineconstexprnoexcept

Definition at line 826 of file types.h.

826{ return (m_type & CompoundDoc)!=0; }

References CompoundDoc, and m_type.

Referenced by buildClassDocList(), and isClassSection().

◆ isDoc()

bool EntryType::isDoc ( ) const
inlineconstexprnoexcept

Definition at line 827 of file types.h.

827{ return (m_type & Doc)!=0; }

References Doc, and m_type.

Referenced by addMemberDocs().

◆ isFile()

bool EntryType::isFile ( ) const
inlineconstexprnoexcept

Definition at line 825 of file types.h.

825{ return (m_type & File)!=0; }

References File, and m_type.

Referenced by buildFileList().

◆ isScope()

bool EntryType::isScope ( ) const
inlineconstexprnoexcept

Definition at line 824 of file types.h.

824{ return (m_type & Scope)!=0; }

References m_type, and Scope.

Referenced by addClassToContext(), addConceptToContext(), addEnumValuesToEnums(), addVariable(), findEnumDocumentation(), findEnums(), and findMember().

◆ to_string()

std::string EntryType::to_string ( ) const
inline

Definition at line 828 of file types.h.

829 {
830 switch (type())
831 {
832#define ETYPE(x,bits) \
833 case x : return "["+std::string(#x)+bits_to_string()+"]";
835#undef ETYPE
836 }
837 return "[unknown]";
838 }
constexpr TypeName type() const noexcept
Definition types.h:872

References ENTRY_TYPES, and type().

Referenced by fmt::formatter< EntryType >::format(), and printNavTree().

◆ type()

TypeName EntryType::type ( ) const
inlineconstexprprivatenoexcept

Definition at line 872 of file types.h.

872{ return static_cast<TypeName>(m_type & TypeMask); }
TypeName
Definition types.h:844

References m_type, and TypeMask.

Referenced by to_string().

◆ operator!=

bool operator!= ( const EntryType & t1,
const EntryType & t2 )
friend

Definition at line 840 of file types.h.

840{ return !(operator==(t1,t2)); }
friend bool operator==(const EntryType &t1, const EntryType &t2)
Definition types.h:839

References EntryType(), and operator==.

◆ operator==

bool operator== ( const EntryType & t1,
const EntryType & t2 )
friend

Definition at line 839 of file types.h.

839{ return t1.m_type==t2.m_type; }

References EntryType(), and m_type.

Referenced by operator!=.

Member Data Documentation

◆ m_type

unsigned int EntryType::m_type = Empty
private

Definition at line 873 of file types.h.

Referenced by bits_to_string(), isCompound(), isCompoundDoc(), isDoc(), isFile(), isScope(), operator==, and type().


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