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

Member Enumeration Documentation

◆ CategoryBits

Enumerator
None 
Compound 
Scope 
File 
CompoundDoc 
Doc 
TypeMask 
CategoryMask 

Definition at line 666 of file types.h.

667 {
668 None = 0,
669 Compound = (1<<16),
670 Scope = (1<<17),
671 File = (1<<18),
672 CompoundDoc = (1<<19),
673 Doc = (1<<20),
674 TypeMask = 0x0000FFFF,
675 CategoryMask = 0xFFFF0000
676 };
@ None
Definition types.h:668
@ Scope
Definition types.h:670
@ File
Definition types.h:671
@ CategoryMask
Definition types.h:675
@ Compound
Definition types.h:669
@ TypeMask
Definition types.h:674
@ Doc
Definition types.h:673
@ CompoundDoc
Definition types.h:672

◆ TypeName

enum EntryType::TypeName
private
Enumerator
ENTRY_TYPES 

Definition at line 658 of file types.h.

659 {
660#define ETYPE(x,bits) \
661 x,
663#undef ETYPE
664 };
@ ENTRY_TYPES
Definition types.h:662

Constructor & Destructor Documentation

◆ EntryType()

EntryType::EntryType ( int t)
inlineexplicitprivate

Definition at line 677 of file types.h.

677: m_type(t) {}
unsigned int m_type
Definition types.h:688

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

679 {
680 std::string result;
681 if (m_type&Compound) result+=",Compound";
682 if (m_type&Scope) result+=",Scope";
683 if (m_type&File) result+=",File";
684 if (m_type&CompoundDoc) result+=",CompoundDoc";
685 return result;
686 }

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

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

References CompoundDoc, and m_type.

Referenced by buildClassDocList(), and isClassSection().

◆ isDoc()

bool EntryType::isDoc ( ) const
inline

Definition at line 642 of file types.h.

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

References Doc, and m_type.

Referenced by addMemberDocs().

◆ isFile()

bool EntryType::isFile ( ) const
inline

Definition at line 640 of file types.h.

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

References File, and m_type.

Referenced by buildFileList().

◆ isScope()

bool EntryType::isScope ( ) const
inline

Definition at line 639 of file types.h.

639{ 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 643 of file types.h.

644 {
645 switch (type())
646 {
647#define ETYPE(x,bits) \
648 case x : return "["+std::string(#x)+bits_to_string()+"]";
650#undef ETYPE
651 }
652 return "[unknown]";
653 }
TypeName type() const
Definition types.h:687

References ENTRY_TYPES, and type().

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

◆ type()

TypeName EntryType::type ( ) const
inlineprivate

Definition at line 687 of file types.h.

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

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

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

References EntryType(), and operator==.

◆ operator==

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

Definition at line 654 of file types.h.

654{ 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: