Skip to main content

The TypeSpecifier Class Reference

Wrapper class for a number of boolean properties. More...

Declaration

class TypeSpecifier { ... }

Included Headers

#include <src/types.h>

Friends Index

booloperator==
booloperator!=

Public Constructors Index

TypeSpecifier ()

Public Member Functions Index

voidreset ()
voidmerge (const TypeSpecifier &other)
std::stringto_string () const

Description

Wrapper class for a number of boolean properties.

The properties are packed together, and initialized to false.

Definition at line 653 of file types.h.

Friends

operator!=

friend bool const TypeSpecifier & t1, const TypeSpecifier & t2
inline

Definition at line 676 of file types.h.

676 friend inline bool operator!=(const TypeSpecifier &t1,const TypeSpecifier &t2)
677 {
678 return !(operator==(t1,t2));
679 }

References operator== and TypeSpecifier.

operator==

friend bool const TypeSpecifier & t1, const TypeSpecifier & t2
inline

Definition at line 667 of file types.h.

667 friend inline bool operator==(const TypeSpecifier &t1,const TypeSpecifier &t2)
668 {
669 bool eq = true;
670#define TSPEC(x) eq = eq && (t1.m_is##x == t2.m_is##x);
672#undef TSPEC
673 return eq;
674 }

References TYPE_SPECIFIERS and TypeSpecifier.

Referenced by operator!=.

Public Constructors

TypeSpecifier()

TypeSpecifier::TypeSpecifier ()
inline

Definition at line 656 of file types.h.

Reference reset.

Referenced by merge, operator!= and operator==.

Public Member Functions

merge()

void TypeSpecifier::merge (const TypeSpecifier & other)
inline

Definition at line 660 of file types.h.

660 void merge(const TypeSpecifier &other)
661 {
662#define TSPEC(x) m_is##x = m_is##x || other.is##x();
664#undef TSPEC
665 }

References TYPE_SPECIFIERS and TypeSpecifier.

reset()

void TypeSpecifier::reset ()
inline

Definition at line 658 of file types.h.

658 void reset() { std::memset(this, 0, sizeof(*this)); }

Referenced by TypeSpecifier.

to_string()

std::string TypeSpecifier::to_string ()
inline

Definition at line 682 of file types.h.

682 std::string to_string() const
683 {
684 std::string result="[";
685 bool first=true;
686#define TSPEC(x) \
687 if (m_is##x) { \
688 if (!first) result+=","; \
689 result+=#x; first=false; \
690 }
692#undef TSPEC
693 result+="]";
694 return result;
695 }

Reference TYPE_SPECIFIERS.

Referenced by fmt::formatter< TypeSpecifier >::format and printNavTree.


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


Generated via doxygen2docusaurus by Doxygen 1.14.0.