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 855 of file types.h.

Member Enumeration Documentation

◆ CategoryBits

Enumerator
None 
Compound 
Scope 
File 
CompoundDoc 
Doc 
TypeMask 
CategoryMask 

Definition at line 891 of file types.h.

892 {
893 None = 0,
894 Compound = (1<<16),
895 Scope = (1<<17),
896 File = (1<<18),
897 CompoundDoc = (1<<19),
898 Doc = (1<<20),
899 TypeMask = 0x0000FFFF,
900 CategoryMask = 0xFFFF0000
901 };
@ None
Definition types.h:893
@ Scope
Definition types.h:895
@ File
Definition types.h:896
@ CategoryMask
Definition types.h:900
@ Compound
Definition types.h:894
@ TypeMask
Definition types.h:899
@ Doc
Definition types.h:898
@ CompoundDoc
Definition types.h:897

◆ TypeName

enum EntryType::TypeName
private
Enumerator
ENTRY_TYPES 

Definition at line 883 of file types.h.

884 {
885#define ETYPE(x,bits) \
886 x,
888#undef ETYPE
889 };
@ ENTRY_TYPES
Definition types.h:887

Constructor & Destructor Documentation

◆ EntryType()

EntryType::EntryType ( int t)
inlineexplicitconstexprprivatenoexcept

Definition at line 902 of file types.h.

902: m_type(t) {}
unsigned int m_type
Definition types.h:913

Referenced by operator!=, and operator==.

Member Function Documentation

◆ bits_to_string()

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

Definition at line 903 of file types.h.

904 {
905 std::string result;
906 if (m_type&Compound) result+=",Compound";
907 if (m_type&Scope) result+=",Scope";
908 if (m_type&File) result+=",File";
909 if (m_type&CompoundDoc) result+=",CompoundDoc";
910 return result;
911 }

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 866 of file types.h.

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

References CompoundDoc, and m_type.

Referenced by buildClassDocList(), and isClassSection().

◆ isDoc()

bool EntryType::isDoc ( ) const
inlineconstexprnoexcept

Definition at line 867 of file types.h.

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

References Doc, and m_type.

Referenced by addMemberDocs().

◆ isFile()

bool EntryType::isFile ( ) const
inlineconstexprnoexcept

Definition at line 865 of file types.h.

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

References File, and m_type.

Referenced by buildFileList().

◆ isScope()

bool EntryType::isScope ( ) const
inlineconstexprnoexcept

Definition at line 864 of file types.h.

864{ 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 868 of file types.h.

869 {
870 switch (type())
871 {
872#define ETYPE(x,bits) \
873 case x : return "["+std::string(#x)+bits_to_string()+"]";
875#undef ETYPE
876 }
877 return "[unknown]";
878 }
constexpr TypeName type() const noexcept
Definition types.h:912

References ENTRY_TYPES, and type().

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

◆ type()

TypeName EntryType::type ( ) const
inlineconstexprprivatenoexcept

Definition at line 912 of file types.h.

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

References m_type, and TypeMask.

Referenced by to_string().

◆ operator!=

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

Definition at line 880 of file types.h.

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

References EntryType(), and operator==.

◆ operator==

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

Definition at line 879 of file types.h.

879{ 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 913 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: