MetaCC::CodeSnippet Class Reference

#include <metacc_compilation.h>

List of all members.


Detailed Description

Code snippet.

Definition at line 13 of file metacc_compilation.h.

Public Member Functions

void append (std::string text_line)
 Append new line of text to end of the snippet.
std::string & operator[] (unsigned int line_num)
 Access individual lines of this snippet.
const std::string & operator[] (unsigned int line_num) const
 Access individual lines of this snippet (const).
unsigned int lines () const
 Return count of text lines in this snippet.
void line_up ()
 Line text to the left margin nicely.
void replace_all (std::string tag, std::string replacement)
 Find and replace all entries of "tag" with "replacement" in the snippet.


Member Function Documentation

void MetaCC::CodeSnippet::append ( std::string  text_line  ) 

Append new line of text to end of the snippet.

Definition at line 17 of file metacc_compilation.cpp.

std::string & MetaCC::CodeSnippet::operator[] ( unsigned int  line_num  ) 

Access individual lines of this snippet.

Definition at line 22 of file metacc_compilation.cpp.

const std::string & MetaCC::CodeSnippet::operator[] ( unsigned int  line_num  )  const

Access individual lines of this snippet (const).

Definition at line 27 of file metacc_compilation.cpp.

unsigned int MetaCC::CodeSnippet::lines (  )  const

Return count of text lines in this snippet.

Definition at line 33 of file metacc_compilation.cpp.

Referenced by MetaCC::Compilation::generate_code(), and MetaCC::Compilation::generate_code_for_exec_function().

void MetaCC::CodeSnippet::line_up (  ) 

Line text to the left margin nicely.

Definition at line 39 of file metacc_compilation.cpp.

Referenced by MetaCC::Compilation::generate_code(), and MetaCC::Compilation::generate_code_for_exec_function().

void MetaCC::CodeSnippet::replace_all ( std::string  tag,
std::string  replacement 
)

Find and replace all entries of "tag" with "replacement" in the snippet.

Definition at line 94 of file metacc_compilation.cpp.


The documentation for this class was generated from the following files:
Generated on Sat Sep 9 03:50:56 2006 for Openem APIs by  doxygen 1.4.7