PEBL 2.2
Psychology Experiment Building Language - Cross-platform psychological experiment development system
VCGGraph Class Reference

#include <VCG.h>

Public Member Functions

 VCGGraph ()
 Standard Constructor for the 'Graph' class.
 
 ~VCGGraph ()
 Standard Destructor for the 'Graph' class.
 
void SetTitle (const char *title)
 
void AddEdge (VCGEdge *edge)
 
void AddNode (VCGNode *node)
 
bool GetSplines () const
 
char * GetTitle () const
 
int GetWidth () const
 
int GetHeight () const
 
int GetX () const
 
int GetY () const
 
char * GetColor () const
 
void OutputNodes (std::ostream &out)
 
void OutputEdges (std::ostream &out)
 

Friends

std::ostream & operator<< (std::ostream &out, VCGGraph &v)
 

Detailed Description

Definition at line 61 of file VCG.h.

Constructor & Destructor Documentation

◆ VCGGraph()

VCGGraph::VCGGraph ( )

Standard Constructor for the 'Graph' class.

Definition at line 186 of file VCG.cpp.

186 :
187 mTitle(strdup("VCG Graph File for PEBL-Interpreted PCode Tree")),
188 mSplines(true),
189 mWidth(700),
190 mHeight(700),
191 mX(30),
192 mY(30),
193 mColor(strdup("blue"))
194{
195
196
197}

◆ ~VCGGraph()

VCGGraph::~VCGGraph ( )

Standard Destructor for the 'Graph' class.

Definition at line 202 of file VCG.cpp.

203{
204 free(mTitle);
205 free(mColor);
206}

Member Function Documentation

◆ AddEdge()

void VCGGraph::AddEdge ( VCGEdge edge)

Definition at line 209 of file VCG.cpp.

210{
211 mVCGEdges.push_front(*edge);
212}

Referenced by VCG::Evaluate().

◆ AddNode()

void VCGGraph::AddNode ( VCGNode node)

Definition at line 214 of file VCG.cpp.

215{
216
217 mVCGNodes.push_front(*node);
218
219}

Referenced by VCG::Evaluate().

◆ GetColor()

char * VCGGraph::GetColor ( ) const
inline

Definition at line 77 of file VCG.h.

77{return mColor;};

Referenced by operator<<().

◆ GetHeight()

int VCGGraph::GetHeight ( ) const
inline

Definition at line 74 of file VCG.h.

74{return mHeight;};

Referenced by operator<<().

◆ GetSplines()

bool VCGGraph::GetSplines ( ) const
inline

Definition at line 71 of file VCG.h.

71{return mSplines;};

◆ GetTitle()

char * VCGGraph::GetTitle ( ) const
inline

Definition at line 72 of file VCG.h.

72{return mTitle;}

Referenced by operator<<().

◆ GetWidth()

int VCGGraph::GetWidth ( ) const
inline

Definition at line 73 of file VCG.h.

73{return mWidth;};

Referenced by operator<<().

◆ GetX()

int VCGGraph::GetX ( ) const
inline

Definition at line 75 of file VCG.h.

75{return mX;};

Referenced by operator<<().

◆ GetY()

int VCGGraph::GetY ( ) const
inline

Definition at line 76 of file VCG.h.

76{return mY;};

Referenced by operator<<().

◆ OutputEdges()

void VCGGraph::OutputEdges ( std::ostream &  out)

Definition at line 268 of file VCG.cpp.

269{
270
271 list<VCGEdge>::iterator p = mVCGEdges.begin();
272
273 // cout << "/*Number of Edges: " << mVCGEdges.size() << "*/" << endl;
274 while(p != mVCGEdges.end())
275 {
276 out << *p << endl;
277 p++;
278 }
279 out << "\n";
280
281}

Referenced by operator<<().

◆ OutputNodes()

void VCGGraph::OutputNodes ( std::ostream &  out)

Definition at line 252 of file VCG.cpp.

253{
254
255
256 list<VCGNode>::iterator p = mVCGNodes.begin();
257
258 //cerr << "/*Number of Nodes: " << mVCGNodes.size() << "*/"<< endl;
259 while(p != mVCGNodes.end())
260 {
261 out << *p << endl;
262 p++;
263 }
264 out << "\n";
265
266}

Referenced by operator<<().

◆ SetTitle()

void VCGGraph::SetTitle ( const char *  title)
inline

Definition at line 67 of file VCG.h.

67{if(mTitle)free(mTitle); mTitle=strdup(title);};

Friends And Related Symbol Documentation

◆ operator<<

std::ostream & operator<< ( std::ostream &  out,
VCGGraph v 
)
friend

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