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

Wrapper class for the Entry type. More...

#include <src/types.h>

Public Member Functions

ENTRY_TYPES bool isCompound () const
bool isScope () const
bool isFile () const
bool isCompoundDoc () const
bool isDoc () const
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

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

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

Member Enumeration Documentation

◆ CategoryBits

Enumerator
None 
Compound 
Scope 
File 
CompoundDoc 
Doc 
TypeMask 
CategoryMask 

Definition at line 828 of file types.h.

829 {
830 None = 0,
831 Compound = (1<<16),
832 Scope = (1<<17),
833 File = (1<<18),
834 CompoundDoc = (1<<19),
835 Doc = (1<<20),
836 TypeMask = 0x0000FFFF,
837 CategoryMask = 0xFFFF0000
838 };
@ None
Definition types.h:830
@ Scope
Definition types.h:832
@ File
Definition types.h:833
@ CategoryMask
Definition types.h:837
@ Compound
Definition types.h:831
@ TypeMask
Definition types.h:836
@ Doc
Definition types.h:835
@ CompoundDoc
Definition types.h:834

◆ TypeName

enum EntryType::TypeName
private
Enumerator
ENTRY_TYPES 

Definition at line 820 of file types.h.

821 {
822#define ETYPE(x,bits) \
823 x,
825#undef ETYPE
826 };
@ ENTRY_TYPES
Definition types.h:824

Constructor & Destructor Documentation

◆ EntryType()

EntryType::EntryType ( int t)
inlineexplicitprivate

Definition at line 839 of file types.h.

839: m_type(t) {}
unsigned int m_type
Definition types.h:850

References m_type.

Referenced by operator!=, and operator==.

Member Function Documentation

◆ bits_to_string()

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

Definition at line 840 of file types.h.

841 {
842 std::string result;
843 if (m_type&Compound) result+=",Compound";
844 if (m_type&Scope) result+=",Scope";
845 if (m_type&File) result+=",File";
846 if (m_type&CompoundDoc) result+=",CompoundDoc";
847 return result;
848 }

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

◆ isCompound()

ENTRY_TYPES bool EntryType::isCompound ( ) const
inline

◆ isCompoundDoc()

bool EntryType::isCompoundDoc ( ) const
inline

Definition at line 803 of file types.h.

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

References CompoundDoc, and m_type.

Referenced by buildClassDocList(), and isClassSection().

◆ isDoc()

bool EntryType::isDoc ( ) const
inline

Definition at line 804 of file types.h.

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

References Doc, and m_type.

Referenced by addMemberDocs().

◆ isFile()

bool EntryType::isFile ( ) const
inline

Definition at line 802 of file types.h.

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

References File, and m_type.

Referenced by buildFileList().

◆ isScope()

bool EntryType::isScope ( ) const
inline

Definition at line 801 of file types.h.

801{ 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 805 of file types.h.

806 {
807 switch (type())
808 {
809#define ETYPE(x,bits) \
810 case x : return "["+std::string(#x)+bits_to_string()+"]";
812#undef ETYPE
813 }
814 return "[unknown]";
815 }
TypeName type() const
Definition types.h:849

References ENTRY_TYPES, and type().

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

◆ type()

TypeName EntryType::type ( ) const
inlineprivate

Definition at line 849 of file types.h.

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

References m_type, and TypeMask.

Referenced by to_string().

Friends And Related Symbol Documentation

◆ operator!=

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

Definition at line 817 of file types.h.

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

References EntryType(), and operator==.

◆ operator==

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

Definition at line 816 of file types.h.

816{ 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

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