FreeFOAM The Cross-Platform CFD Toolkit
graph Class Reference

Class to create, store and output qgraph files. More...

#include <OpenFOAM/graph.H>


Detailed Description

Class to create, store and output qgraph files.

Source files

Definition at line 59 of file graph.H.

+ Inheritance diagram for graph:
+ Collaboration diagram for graph:

List of all members.

Classes

class  writer
 Abstract base class for a graph writer. More...
struct  xy

Public Member Functions

 graph (const string &title, const string &xName, const string &yName, const scalarField &x)
 Construct from title and labels (no curves)
 graph (const string &title, const string &xName, const string &yName, const scalarField &x, const scalarField &y)
 Construct from title, labels and y data for 1 curve.
 graph (const string &title, const string &xName, const string &yName, Istream &is)
 Construct from Istream given title and labels.
 graph (Istream &is)
 Construct from Istream.
const stringtitle () const
const stringxName () const
const stringyName () const
const scalarFieldx () const
scalarFieldx ()
const scalarFieldy () const
scalarFieldy ()
void writeTable (Ostream &) const
 Write out graph data as a simple table.
void write (Ostream &, const word &format) const
 Write graph to stream in given format.
void write (const fileName &fName, const word &format) const
 Write graph to file in given format.
- Public Member Functions inherited from HashPtrTable< curve >
 HashPtrTable (const label size=128)
 Construct given initial table size.
 HashPtrTable (Istream &, const INew &)
 Construct from Istream using given Istream constructor class.
 HashPtrTable (Istream &)
 Construct from Istream using default Istream constructor class.
 HashPtrTable (const HashPtrTable< curve, word, string::hash > &)
 Construct as copy.
 ~HashPtrTable ()
curveremove (iterator &)
 Remove and return the pointer specified by given iterator.
bool erase (iterator &)
 Erase an hashedEntry specified by given iterator.
void clear ()
 Clear all entries from table.
void operator= (const HashPtrTable< curve, word, string::hash > &)
- Public Member Functions inherited from HashTable< curve *, word, string::hash >
bool set (const word &, const curve *&newElmt)
 Assign a new hashedEntry, overwriting existing entries.
 HashTable (const label size=128)
 Construct given initial table size.
 HashTable (Istream &, const label size=128)
 Construct from Istream.
 HashTable (const HashTable< curve *, word, string::hash > &)
 Construct as copy.
 HashTable (const Xfer< HashTable< curve *, word, string::hash > > &)
 Construct by transferring the parameter contents.
 ~HashTable ()
label size () const
 Return number of elements in table.
bool empty () const
 Return true if the hash table is empty.
bool found (const word &) const
 Return true if hashedEntry is found in table.
iterator find (const word &)
 Find and return an iterator set at the hashedEntry.
const_iterator find (const word &) const
 Find and return an const_iterator set at the hashedEntry.
List< wordtoc () const
 Return the table of contents.
List< wordsortedToc () const
 Return the table of contents as a sorted list.
OstreamprintInfo (Ostream &) const
 Print information.
bool insert (const word &, const curve *&newElmt)
 Insert a new hashedEntry.
bool erase (const iterator &)
 Erase an hashedEntry specified by given iterator.
bool erase (const word &)
 Erase an hashedEntry specified by given key if in table.
label erase (const UList< word > &)
 Remove entries given by the listed keys from this HashTable.
label erase (const HashTable< AnyType, word, AnyHash > &)
 Remove entries given by the given keys from this HashTable.
void resize (const label newSize)
 Resize the hash table for efficiency.
void clearStorage ()
 Clear the table entries and the table itself.
void transfer (HashTable< curve *, word, string::hash > &)
 Transfer the contents of the argument table into this table.
Xfer< HashTable< curve *, word,
string::hash > > 
xfer ()
 Transfer contents to the Xfer container.
curve *& operator[] (const word &)
 Find and return an hashedEntry.
const curve *& operator[] (const word &) const
 Find and return an hashedEntry.
curve *& operator() (const word &)
 Find and return an hashedEntry, create it null if not present.
void operator= (const HashTable< curve *, word, string::hash > &)
 Assignment.
bool operator== (const HashTable< curve *, word, string::hash > &) const
 Equality. Two hash tables are equal if all contents of first are.
bool operator!= (const HashTable< curve *, word, string::hash > &) const
 The opposite of the equality operation. Takes linear time.
iterator begin ()
 iterator set to the begining of the HashTable
const_iterator begin () const
 const_iterator set to the beginning of the HashTable
const iterator & end ()
 iterator set to beyond the end of the HashTable
const const_iterator & end () const
 const_iterator set to beyond the end of the HashTable
const_iterator cbegin () const
 const_iterator set to the beginning of the HashTable
const const_iterator & cend () const
 const_iterator set to beyond the end of the HashTable

Friends

Ostreamoperator<< (Ostream &, const graph &)
 Ostream Operator.

Additional Inherited Members

- Public Types inherited from HashPtrTable< curve >
typedef HashTable< curve
*, word, string::hash >
::iterator 
iterator
typedef HashTable< curve
*, word, string::hash >
::const_iterator 
const_iterator
- Public Types inherited from HashTable< curve *, word, string::hash >
typedef curvevalue_type
 Type of values the HashTable contains.
typedef curve *& reference
 Type that can be used for storing into HashTable::value_type.
typedef const curve *& const_reference
 Type that can be used for storing into constant.
typedef label size_type
 The type that can represent the size of a HashTable.

Constructor & Destructor Documentation

graph ( const string title,
const string xName,
const string yName,
const scalarField x 
)

Construct from title and labels (no curves)

Definition at line 65 of file graph.C.

graph ( const string title,
const string xName,
const string yName,
const scalarField x,
const scalarField y 
)

Construct from title, labels and y data for 1 curve.

Definition at line 80 of file graph.C.

References curve::curveStyle::CONTINUOUS, and insert().

graph ( const string title,
const string xName,
const string yName,
Istream is 
)

Construct from Istream given title and labels.

Definition at line 98 of file graph.C.

graph ( Istream is)

Construct from Istream.

Definition at line 113 of file graph.C.


Member Function Documentation

const string& title ( ) const
inline

Definition at line 150 of file graph.H.

Referenced by gnuplotGraph::write(), and xmgrGraph::write().

const string& xName ( ) const
inline

Definition at line 155 of file graph.H.

Referenced by gnuplotGraph::write(), jplotGraph::write(), and xmgrGraph::write().

const string& yName ( ) const
inline

Definition at line 160 of file graph.H.

Referenced by gnuplotGraph::write(), and xmgrGraph::write().

scalarField& x ( )
inline

Definition at line 171 of file graph.H.

void writeTable ( Ostream os) const
void write ( Ostream os,
const word format 
) const

Write graph to stream in given format.

Definition at line 212 of file graph.C.

References graph::writer::New().

Referenced by Foam::makeGraph(), and graph::write().

void write ( const fileName fName,
const word format 
) const

Write graph to file in given format.

Definition at line 218 of file graph.C.

References Foam::endl(), IOstream::good(), OFstream::name(), graph::writer::New(), WarningIn, and graph::write().


Friends And Related Function Documentation

Ostream& operator<< ( Ostream ,
const graph  
)
friend

Ostream Operator.

Definition at line 237 of file graph.C.


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