MicroModelicaCCompiler  4.5.3
macros.hpp File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define DEFINE_TYPE(X)
 
#define DEFINE_LIST(X)
 
#define _MMOC_S(s)   newAST_String(s)
 
#define GET_AS(X, Y)   AST_##X##_##Y getAs##Y();
 
#define GET_AS_IMP(X, Y)   AST_##X##_##Y AST_##X##_::getAs##Y() { return dynamic_cast<AST_##X##_##Y>(this); }
 
#define DEFINE_PRINTER(X)   ostream &operator<<(ostream &os, const X &x);
 
#define DEFINE_CLASS_PRINTER(X)   friend ostream &operator<<(ostream &os, const X##_ &x);
 
#define CLASSP_PRINTER_IMP(X)
 
#define CLASS_PRINTER_IMP(X)
 
#define DEFINE_ORDER_REL(X)   bool operator<(const X##_ &other) const;
 
#define ORDER_REL_IMP(X)
 

Macro Definition Documentation

◆ _MMOC_S

#define _MMOC_S (   s)    newAST_String(s)

Definition at line 32 of file macros.hpp.

◆ CLASS_PRINTER_IMP

#define CLASS_PRINTER_IMP (   X)
Value:
ostream &operator<<(ostream &os, const X##_ &e) \
{ \
os << e.print(); \
return os; \
} \
CLASSP_PRINTER_IMP(X)

Definition at line 46 of file macros.hpp.

◆ CLASSP_PRINTER_IMP

#define CLASSP_PRINTER_IMP (   X)
Value:
ostream &operator<<(ostream &os, const X &e) \
{ \
os << *e; \
return os; \
}

Definition at line 40 of file macros.hpp.

◆ DEFINE_CLASS_PRINTER

#define DEFINE_CLASS_PRINTER (   X)    friend ostream &operator<<(ostream &os, const X##_ &x);

Definition at line 39 of file macros.hpp.

◆ DEFINE_LIST

#define DEFINE_LIST (   X)
Value:
typedef std::list<X> *X##List; \
typedef std::list<X>::iterator X##ListIterator; \
typedef std::list<X>::reverse_iterator X##ListReverseIterator;

Definition at line 28 of file macros.hpp.

◆ DEFINE_ORDER_REL

#define DEFINE_ORDER_REL (   X)    bool operator<(const X##_ &other) const;

Definition at line 55 of file macros.hpp.

◆ DEFINE_PRINTER

#define DEFINE_PRINTER (   X)    ostream &operator<<(ostream &os, const X &x);

Definition at line 38 of file macros.hpp.

◆ DEFINE_TYPE

#define DEFINE_TYPE (   X)
Value:
class X##_; \
typedef X##_ *X;

Definition at line 25 of file macros.hpp.

◆ GET_AS

#define GET_AS (   X,
 
)    AST_##X##_##Y getAs##Y();

Definition at line 33 of file macros.hpp.

◆ GET_AS_IMP

#define GET_AS_IMP (   X,
 
)    AST_##X##_##Y AST_##X##_::getAs##Y() { return dynamic_cast<AST_##X##_##Y>(this); }

Definition at line 34 of file macros.hpp.

◆ ORDER_REL_IMP

#define ORDER_REL_IMP (   X)
Value:
bool X##_::operator<(const X##_ &other) const \
{ \
std::stringstream cmp_this; \
std::stringstream cmp_other; \
cmp_this << *this; \
cmp_other << other; \
return cmp_this.str() < cmp_other.str(); \
}

Definition at line 56 of file macros.hpp.

operator<<
ostream & operator<<(ostream &os, const AST_CompositionElement &ce)
Definition: ast_builder.cpp:243