OpenADFortTk (including Open64 and OpenAnalysis references)
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
sexp::ostream Class Reference

#include <sexpostream.h>

Inheritance diagram for sexp::ostream:
Inheritance graph
Collaboration diagram for sexp::ostream:
Collaboration graph

Classes

class  Exception
 

Public Member Functions

 ostream (std::streambuf *sb)
 
virtual ~ostream ()
 
template<class T >
void Atom (int xflags, const T &val)
 
template<class T >
void Atom (const T &val)
 
void BegAtom (int xflags=IOFlags::NONE)
 
void EndAtom ()
 
void BegList (int xflags=IOFlags::NONE) throw (Exception)
 
void EndList ()
 
void Quote ()
 
void BegComment ()
 
void EndComment ()
 
void Comment (const char *str)
 
void EscapeString (const char *val)
 
void EndLine ()
 
void Indent ()
 
void IndentIncr ()
 
void IndentDecr ()
 
bool IsIndent ()
 
void SetIndentAmnt (int amnt)
 
void SetIndentStep (int step)
 
int GetIndentAmnt ()
 
int GetIndentStep ()
 
template<>
void Atom (int xflags, const char *const &val)
 

Private Types

enum  State {
  INIT = 0x00000001, DEFAULT = 0x00000002, LIST_OPEN = 0x00000004, STMASK = 0xff000000,
  ERR = 0x10000000, ATOM_OPEN = 0x20000000, COMMENT = 0x40000000
}
 
enum  Action {
  QUOTE, BEG_ATOM, END_ATOM, BEG_LIST,
  END_LIST, BEG_COMMENT, END_COMMENT, END_LINE,
  INDENT
}
 
typedef std::list< int > SListStack
 

Private Member Functions

 ostream (const ostream &x)
 
ostreamoperator= (const ostream &x)
 
void AddSpaceIfNecessary (int flags)
 
bool IsState (State st)
 
void SetState (State st)
 
bool IsStateError ()
 
void SetStateError ()
 
bool IsStateQ (State st)
 
void SetStateQ (State st)
 
void ResetStateQ (State st)
 
bool IsStateQClear ()
 
bool WasAction (Action a)
 
void SetAction (Action a)
 

Private Attributes

SListStack slistStack
 
int curAtomFlags
 
unsigned int state
 
Action lastAction
 
int indentAmnt
 
int indentStep
 

Detailed Description

Definition at line 56 of file sexpostream.h.

Member Typedef Documentation

typedef std::list<int> sexp::ostream::SListStack
private

Definition at line 169 of file sexpostream.h.

Member Enumeration Documentation

enum sexp::ostream::Action
private
Enumerator
QUOTE 
BEG_ATOM 
END_ATOM 
BEG_LIST 
END_LIST 
BEG_COMMENT 
END_COMMENT 
END_LINE 
INDENT 

Definition at line 187 of file sexpostream.h.

enum sexp::ostream::State
private
Enumerator
INIT 
DEFAULT 
LIST_OPEN 
STMASK 
ERR 
ATOM_OPEN 
COMMENT 

Definition at line 173 of file sexpostream.h.

Constructor & Destructor Documentation

sexp::ostream::ostream ( std::streambuf *  sb)

Definition at line 36 of file sexpostream.cxx.

References curAtomFlags, indentAmnt, indentStep, INIT, sexp::IOFlags::NONE, SetState(), and state.

Here is the call graph for this function:

sexp::ostream::~ostream ( )
virtual

Definition at line 48 of file sexpostream.cxx.

sexp::ostream::ostream ( const ostream x)
private

Member Function Documentation

void sexp::ostream::AddSpaceIfNecessary ( int  flags)
private

Definition at line 317 of file sexpostream.cxx.

References INDENT, sexp::IOFlags::IsFlag(), and sexp::IOFlags::L_NONEMPTY.

Here is the call graph for this function:

void sexp::ostream::Atom ( int  xflags,
const char *const &  val 
)

Definition at line 56 of file sexpostream.cxx.

References sexp::IOFlags::A_DQUOTE, sexp::BegAtom(), sexp::EndAtom(), sexp::EscapeString(), sexp::IOFlags::IsFlag(), and val.

Here is the call graph for this function:

template<class T >
void sexp::ostream::Atom ( int  xflags,
const T &  val 
)

Definition at line 236 of file sexpostream.h.

References sexp::BegAtom(), sexp::EndAtom(), and val.

Referenced by sexp::operator<<().

Here is the call graph for this function:

template<class T >
void sexp::ostream::Atom ( const T &  val)
inline

Definition at line 88 of file sexpostream.h.

References Atom(), and sexp::IOFlags::NONE.

Referenced by Atom().

Here is the call graph for this function:

void sexp::ostream::BegAtom ( int  xflags = IOFlags::NONE)
void sexp::ostream::BegComment ( )

Definition at line 238 of file sexpostream.cxx.

Referenced by sexp::BegComment().

void sexp::ostream::BegList ( int  xflags = IOFlags::NONE)
throw (Exception
)

Definition at line 149 of file sexpostream.cxx.

References f, sexp::IndentIncr(), sexp::IOFlags::L_NONEMPTY, and sexp::IOFlags::SetFlag().

Referenced by sexp::BegList(), and sexp::operator<<().

Here is the call graph for this function:

void sexp::ostream::Comment ( const char *  str)

Definition at line 269 of file sexpostream.cxx.

References sexp::BegComment(), and sexp::EndComment().

Referenced by sexp::operator<<().

Here is the call graph for this function:

void sexp::ostream::EndAtom ( )

Definition at line 117 of file sexpostream.cxx.

References sexp::IOFlags::A_DQUOTE, sexp::IOFlags::A_HEX, sexp::IOFlags::A_OCT, sexp::IOFlags::IsFlag(), and sexp::IOFlags::NONE.

Referenced by sexp::EndAtom().

Here is the call graph for this function:

void sexp::ostream::EndComment ( )

Definition at line 254 of file sexpostream.cxx.

References sexp::EndLine().

Referenced by sexp::EndComment().

Here is the call graph for this function:

void sexp::ostream::EndLine ( )

Definition at line 297 of file sexpostream.cxx.

References sexp::Indent().

Referenced by sexp::EndLine().

Here is the call graph for this function:

void sexp::ostream::EndList ( )

Definition at line 181 of file sexpostream.cxx.

References sexp::IndentDecr().

Referenced by sexp::EndList().

Here is the call graph for this function:

void sexp::ostream::EscapeString ( const char *  val)

Definition at line 282 of file sexpostream.cxx.

Referenced by sexp::operator<<().

int sexp::ostream::GetIndentAmnt ( )
inline

Definition at line 150 of file sexpostream.h.

References indentAmnt.

int sexp::ostream::GetIndentStep ( )
inline

Definition at line 151 of file sexpostream.h.

References indentStep.

void sexp::ostream::Indent ( )

Definition at line 306 of file sexpostream.cxx.

References INDENT.

Referenced by sexp::Indent().

void sexp::ostream::IndentDecr ( )
inline

Definition at line 145 of file sexpostream.h.

References indentAmnt, and indentStep.

Referenced by sexp::IndentDecr().

void sexp::ostream::IndentIncr ( )
inline

Definition at line 144 of file sexpostream.h.

References indentAmnt, and indentStep.

Referenced by sexp::IndentIncr().

bool sexp::ostream::IsIndent ( )
inline

Definition at line 146 of file sexpostream.h.

References indentAmnt, and indentStep.

bool sexp::ostream::IsState ( State  st)
inlineprivate

Definition at line 198 of file sexpostream.h.

References state.

bool sexp::ostream::IsStateError ( )
inlineprivate

Definition at line 202 of file sexpostream.h.

References ERR, and state.

bool sexp::ostream::IsStateQ ( State  st)
inlineprivate

Definition at line 205 of file sexpostream.h.

References state.

bool sexp::ostream::IsStateQClear ( )
inlineprivate

Definition at line 209 of file sexpostream.h.

References state, and STMASK.

ostream& sexp::ostream::operator= ( const ostream x)
inlineprivate

Definition at line 160 of file sexpostream.h.

void sexp::ostream::Quote ( )

Definition at line 211 of file sexpostream.cxx.

Referenced by sexp::Quote().

void sexp::ostream::ResetStateQ ( State  st)
inlineprivate

Definition at line 207 of file sexpostream.h.

References state.

void sexp::ostream::SetAction ( Action  a)
inlineprivate

Definition at line 213 of file sexpostream.h.

References lastAction.

void sexp::ostream::SetIndentAmnt ( int  amnt)
inline

Definition at line 148 of file sexpostream.h.

References indentAmnt.

Referenced by sexp::operator<<().

void sexp::ostream::SetIndentStep ( int  step)
inline

Definition at line 149 of file sexpostream.h.

References indentStep.

Referenced by sexp::operator<<().

void sexp::ostream::SetState ( State  st)
inlineprivate

Definition at line 199 of file sexpostream.h.

References state, and STMASK.

Referenced by ostream().

void sexp::ostream::SetStateError ( )
inlineprivate

Definition at line 203 of file sexpostream.h.

References ERR, and state.

void sexp::ostream::SetStateQ ( State  st)
inlineprivate

Definition at line 206 of file sexpostream.h.

References state.

bool sexp::ostream::WasAction ( Action  a)
inlineprivate

Definition at line 212 of file sexpostream.h.

References lastAction.

Member Data Documentation

int sexp::ostream::curAtomFlags
private

Definition at line 217 of file sexpostream.h.

Referenced by ostream().

int sexp::ostream::indentAmnt
private

Definition at line 221 of file sexpostream.h.

Referenced by GetIndentAmnt(), IndentDecr(), IndentIncr(), IsIndent(), ostream(), and SetIndentAmnt().

int sexp::ostream::indentStep
private

Definition at line 222 of file sexpostream.h.

Referenced by GetIndentStep(), IndentDecr(), IndentIncr(), IsIndent(), ostream(), and SetIndentStep().

Action sexp::ostream::lastAction
private

Definition at line 219 of file sexpostream.h.

Referenced by SetAction(), and WasAction().

SListStack sexp::ostream::slistStack
private

Definition at line 216 of file sexpostream.h.

unsigned int sexp::ostream::state
private

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