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

Member Enumeration Documentation

◆ CategoryBits

Enumerator
None 
Compound 
Scope 
File 
CompoundDoc 
Doc 
TypeMask 
CategoryMask 

Definition at line 848 of file types.h.

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

◆ TypeName

enum EntryType::TypeName
private
Enumerator
ENTRY_TYPES 

Definition at line 840 of file types.h.

841 {
842#define ETYPE(x,bits) \
843 x,
845#undef ETYPE
846 };
@ ENTRY_TYPES
Definition types.h:844

Constructor & Destructor Documentation

◆ EntryType()

EntryType::EntryType ( int t)
inlineexplicitconstexprprivatenoexcept

Definition at line 859 of file types.h.

859: m_type(t) {}
unsigned int m_type
Definition types.h:870

Referenced by operator!=, and operator==.

Member Function Documentation

◆ bits_to_string()

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

Definition at line 860 of file types.h.

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

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

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

References CompoundDoc, and m_type.

Referenced by buildClassDocList(), and isClassSection().

◆ isDoc()

bool EntryType::isDoc ( ) const
inlineconstexprnoexcept

Definition at line 824 of file types.h.

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

References Doc, and m_type.

Referenced by addMemberDocs().

◆ isFile()

bool EntryType::isFile ( ) const
inlineconstexprnoexcept

Definition at line 822 of file types.h.

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

References File, and m_type.

Referenced by buildFileList().

◆ isScope()

bool EntryType::isScope ( ) const
inlineconstexprnoexcept

Definition at line 821 of file types.h.

821{ 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 825 of file types.h.

826 {
827 switch (type())
828 {
829#define ETYPE(x,bits) \
830 case x : return "["+std::string(#x)+bits_to_string()+"]";
832#undef ETYPE
833 }
834 return "[unknown]";
835 }
constexpr TypeName type() const noexcept
Definition types.h:869

References ENTRY_TYPES, and type().

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

◆ type()

TypeName EntryType::type ( ) const
inlineconstexprprivatenoexcept

Definition at line 869 of file types.h.

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

References m_type, and TypeMask.

Referenced by to_string().

◆ operator!=

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

Definition at line 837 of file types.h.

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

References EntryType(), and operator==.

◆ operator==

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

Definition at line 836 of file types.h.

836{ 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 870 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: