80 bool emitNewLine =
true)
const;
108 virtual void emitEndIf(std::ostream& stm)
const;
129 void emitVar(
CppVar* varObj, std::ostream& stm,
bool skipName)
const;
143 bool emitNewLine)
const;
149 bool emitNewLine)
const;
153 bool skipParamName)
const;
164 : emittingType_(kRaw)
186 bool emitNewLine)
const
196 bool emitNewLine)
const
208 indentation.
emit(stm);
Helper class to manage indentation while writing C++ file from AST.
void emit(std::ostream &stm) const
Responsible for emitting C/C++ source from CppAst data structure.
virtual void emitMacroCall(CppMacroCall *macroCallObj, std::ostream &stm, CppIndent indentation=CppIndent()) const
virtual void emitEnum(CppEnum *enmObj, std::ostream &stm, bool emitNewLine, CppIndent indentation=CppIndent()) const
virtual void emitFwdDecl(CppFwdClsDecl *fwdClsDeclObj, std::ostream &stm, CppIndent indentation=CppIndent()) const
virtual void emitVarType(CppVarType *varTypeObj, std::ostream &stm) const
virtual void emitHashIf(CppHashIf *hashIfObj, std::ostream &stm) const
virtual void emitIfBlock(CppIfBlock *ifBlock, std::ostream &stm, CppIndent indentation=CppIndent()) const
virtual void emitParamList(CppParamVector *paramListObj, std::ostream &stm) const
virtual void emitUsingDecl(CppUsingDecl *usingDecl, std::ostream &stm, CppIndent indentation=CppIndent()) const
@ kHeader
No function definition is emitted unless it is explicitly inline.
@ kRaw
No intelligence is applied and things are emitted as is.
@ kSource
No method declaration is emitted unless it is part of the class that is defined in the same file.
virtual void emitEndIf(std::ostream &stm) const
virtual void emitConstructor(CppConstructor *ctorObj, std::ostream &stm, CppIndent indentation=CppIndent()) const
EmittingType getEmittingType() const
void emitVarDecl(std::ostream &stm, CppVarDecl &varDecl, bool skipName) const
virtual void emitExpr(CppExpr *exprObj, std::ostream &stm, CppIndent indentation=CppIndent()) const
virtual void emitDoBlock(CppDoWhileBlock *doBlock, std::ostream &stm, CppIndent indentation=CppIndent()) const
virtual void emitSwitchBlock(CppSwitchBlock *switchBlock, std::ostream &stm, CppIndent indentation=CppIndent()) const
virtual void emitInclude(CppInclude *includeObj, std::ostream &stm) const
virtual void emitTypeConverter(CppTypeConverter *typeConverterObj, std::ostream &stm, CppIndent indentation=CppIndent()) const
virtual void emitDestructor(CppDestructor *dtorObj, std::ostream &stm, CppIndent indentation=CppIndent()) const
void emitTemplSpec(CppTemplateParamList *templSpec, std::ostream &stm, CppIndent indentation) const
virtual void emitTypedefList(CppTypedefList *typedefList, std::ostream &stm, CppIndent indentation=CppIndent()) const
virtual void emitDefine(CppDefine *defineObj, std::ostream &stm) const
virtual void emitBlob(CppBlob *blobObj, std::ostream &stm, bool formatLineStarts, CppIndent indentation) const
EmittingType emittingType_
virtual void emitDocComment(CppDocComment *docCommentObj, std::ostream &stm, CppIndent indentation=CppIndent()) const
virtual void emitTypedef(CppTypedefName *typedefName, std::ostream &stm, CppIndent indentation=CppIndent()) const
virtual void emitCompound(CppCompound *compoundObj, std::ostream &stm, CppIndent indentation=CppIndent(), bool emitNewLine=true) const
virtual void emitFunctionPtr(CppFunctionPointer *funcPtrObj, std::ostream &stm, bool emitNewLine, CppIndent indentation=CppIndent()) const
virtual void emitVarList(CppVarList *varListObj, std::ostream &stm, CppIndent indentation=CppIndent()) const
void setEmittingType(EmittingType type)
virtual void emitPragma(CppPragma *pragmaObj, std::ostream &stm) const
virtual void emitUndef(CppUndef *undefObj, std::ostream &stm) const
virtual void emitForBlock(CppForBlock *forBlock, std::ostream &stm, CppIndent indentation=CppIndent()) const
virtual void emitVar(CppVar *varObj, std::ostream &stm, CppIndent indentation=CppIndent()) const
virtual void emitExprAtom(CppExprAtom &exprObj, std::ostream &stm, CppIndent indentation=CppIndent()) const
virtual void emitWhileBlock(CppWhileBlock *whileBlock, std::ostream &stm, CppIndent indentation=CppIndent()) const
virtual void emit(CppObj *cppObj, std::ostream &stm, CppIndent indentation=CppIndent()) const
void emitFunctionPtr(CppFunctionPointer *funcPtrObj, std::ostream &stm, CppIndent indentation, bool skipName, bool emitNewLine) const
virtual void emitFunction(CppFunction *funcObj, std::ostream &stm, bool emitNewLine, CppIndent indentation=CppIndent()) const
std::vector< std::unique_ptr< CppTemplateParam > > CppTemplateParamList
CppAccessType accessType(CppObj *cppObj)
std::vector< CppObjPtr > CppParamVector
std::ostream & operator<<(std::ostream &stm, CppIndent &indentation)
A stream of text that represents some content in a C++ program.
Some blocks have common structure like if, while, and do-while.
All classes, structs, unions, and namespaces can be classified as a Compound object.
An individual expression.
An expression in a C/C++ program.
Function pointer type definition using typedef, e.g.
Represents all variants of #if preprocessors.
An abstract class that is used as base class of all other classes.
List of variables declared in a line without repeating its type, e.g.
Class to represent C++ variable definition.