souffle  2.0.2-371-g6315b36
Public Member Functions | Private Attributes | Friends
souffle::ast::QualifiedName Class Reference

Qualified Name class defines fully/partially qualified names to identify objects in components. More...

#include <QualifiedName.h>

Collaboration diagram for souffle::ast::QualifiedName:
Collaboration graph

Public Member Functions

void append (std::string name)
 append qualifiers More...
 
bool empty () const
 check for emptiness More...
 
const std::vector< std::string > & getQualifiers () const
 get qualifiers More...
 
bool operator!= (const QualifiedName &other) const
 
bool operator< (const QualifiedName &other) const
 
QualifiedNameoperator= (const QualifiedName &)=default
 
QualifiedNameoperator= (QualifiedName &&)=default
 
bool operator== (const QualifiedName &other) const
 
void prepend (std::string name)
 prepend qualifiers More...
 
void print (std::ostream &out) const
 print qualified name More...
 
 QualifiedName ()
 
 QualifiedName (const char *name)
 
 QualifiedName (const QualifiedName &)=default
 
 QualifiedName (const std::string &name)
 
 QualifiedName (const std::vector< std::string > qualifiers)
 
 QualifiedName (QualifiedName &&)=default
 
std::string toString () const
 convert to a string separated by fullstop More...
 

Private Attributes

std::vector< std::string > qualifiers
 

Friends

std::ostream & operator<< (std::ostream &out, const QualifiedName &id)
 

Detailed Description

Qualified Name class defines fully/partially qualified names to identify objects in components.

Definition at line 39 of file QualifiedName.h.

Constructor & Destructor Documentation

◆ QualifiedName() [1/6]

souffle::ast::QualifiedName::QualifiedName ( )
inline

Definition at line 41 of file QualifiedName.h.

◆ QualifiedName() [2/6]

souffle::ast::QualifiedName::QualifiedName ( const std::string &  name)
inline

Definition at line 42 of file QualifiedName.h.

◆ QualifiedName() [3/6]

souffle::ast::QualifiedName::QualifiedName ( const char *  name)
inline

Definition at line 43 of file QualifiedName.h.

◆ QualifiedName() [4/6]

souffle::ast::QualifiedName::QualifiedName ( const std::vector< std::string >  qualifiers)
inline

Definition at line 44 of file QualifiedName.h.

References qualifiers.

◆ QualifiedName() [5/6]

souffle::ast::QualifiedName::QualifiedName ( const QualifiedName )
default

◆ QualifiedName() [6/6]

souffle::ast::QualifiedName::QualifiedName ( QualifiedName &&  )
default

Member Function Documentation

◆ append()

void souffle::ast::QualifiedName::append ( std::string  name)
inline

append qualifiers

Definition at line 51 of file QualifiedName.h.

55  {

◆ empty()

bool souffle::ast::QualifiedName::empty ( ) const
inline

check for emptiness

Definition at line 61 of file QualifiedName.h.

◆ getQualifiers()

const std::vector<std::string>& souffle::ast::QualifiedName::getQualifiers ( ) const
inline

get qualifiers

Definition at line 66 of file QualifiedName.h.

71  {

◆ operator!=()

bool souffle::ast::QualifiedName::operator!= ( const QualifiedName other) const
inline

Definition at line 81 of file QualifiedName.h.

◆ operator<()

bool souffle::ast::QualifiedName::operator< ( const QualifiedName other) const
inline

Definition at line 85 of file QualifiedName.h.

85  {
86  out << join(qualifiers, ".");
87  }
88 

References souffle::join(), and qualifiers.

Here is the call graph for this function:

◆ operator=() [1/2]

QualifiedName& souffle::ast::QualifiedName::operator= ( const QualifiedName )
default

◆ operator=() [2/2]

QualifiedName& souffle::ast::QualifiedName::operator= ( QualifiedName &&  )
default

◆ operator==()

bool souffle::ast::QualifiedName::operator== ( const QualifiedName other) const
inline

Definition at line 77 of file QualifiedName.h.

79  {

◆ prepend()

void souffle::ast::QualifiedName::prepend ( std::string  name)
inline

◆ print()

void souffle::ast::QualifiedName::print ( std::ostream &  out) const
inline

print qualified name

Definition at line 91 of file QualifiedName.h.

94  :
95  /* array of name qualifiers */

◆ toString()

std::string souffle::ast::QualifiedName::toString ( ) const
inline

convert to a string separated by fullstop

Definition at line 71 of file QualifiedName.h.

71  {
72  return qualifiers == other.qualifiers;
73  }
74 
75  bool operator!=(const QualifiedName& other) const {

References qualifiers.

Friends And Related Function Documentation

◆ operator<<

std::ostream& operator<< ( std::ostream &  out,
const QualifiedName id 
)
friend

Definition at line 95 of file QualifiedName.h.

Field Documentation

◆ qualifiers

std::vector<std::string> souffle::ast::QualifiedName::qualifiers
private

Definition at line 102 of file QualifiedName.h.

Referenced by operator<(), QualifiedName(), and toString().


The documentation for this class was generated from the following file:
souffle::ast::QualifiedName::qualifiers
std::vector< std::string > qualifiers
Definition: QualifiedName.h:102
souffle::ast::QualifiedName::QualifiedName
QualifiedName()
Definition: QualifiedName.h:41
souffle::ast::QualifiedName::operator!=
bool operator!=(const QualifiedName &other) const
Definition: QualifiedName.h:81
souffle::join
detail::joined_sequence< Iter, Printer > join(const Iter &a, const Iter &b, const std::string &sep, const Printer &p)
Creates an object to be forwarded to some output stream for printing sequences of elements interspers...
Definition: StreamUtil.h:175