GeNN  3.3.0
GPU enhanced Neuronal Networks (GeNN)
CodeStream Class Reference

Helper class for generating code - automatically inserts brackets, indents etc. More...

#include <codeStream.h>

Inheritance diagram for CodeStream:

Classes

struct  CB
 A close bracket marker. More...
 
struct  OB
 An open bracket marker. More...
 
class  Scope
 

Public Member Functions

 CodeStream ()
 
 CodeStream (std::ostream &stream)
 
void setSink (std::ostream &stream)
 

Friends

std::ostream & operator<< (std::ostream &s, const OB &ob)
 
std::ostream & operator<< (std::ostream &s, const CB &cb)
 

Detailed Description

Helper class for generating code - automatically inserts brackets, indents etc.

Based heavily on: https://stackoverflow.com/questions/15053753/writing-a-manipulator-for-a-custom-stream-class

Constructor & Destructor Documentation

◆ CodeStream() [1/2]

CodeStream::CodeStream ( )
inline

◆ CodeStream() [2/2]

CodeStream::CodeStream ( std::ostream &  stream)
inline

Member Function Documentation

◆ setSink()

void CodeStream::setSink ( std::ostream &  stream)
inline

Friends And Related Function Documentation

◆ operator<< [1/2]

std::ostream& operator<< ( std::ostream &  s,
const OB ob 
)
friend

◆ operator<< [2/2]

std::ostream& operator<< ( std::ostream &  s,
const CB cb 
)
friend

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