PEBL 2.2
Psychology Experiment Building Language - Cross-platform psychological experiment development system
VCG.cpp File Reference
#include "PNode.h"
#include "VCG.h"
#include "Variant.h"
#include <list>
#include <iostream>
#include <stdlib.h>
#include <stdio.h>
#include <strstream>

Go to the source code of this file.

Functions

ostream & operator<< (ostream &out, VCGGraph &v)
 
ostream & operator<< (ostream &out, VCGNode &v)
 
ostream & operator<< (ostream &out, VCGEdge &v)
 

Function Documentation

◆ operator<<() [1/3]

ostream & operator<< ( ostream &  out,
VCGEdge v 
)

Definition at line 372 of file VCG.cpp.

373{
374 //Output the beginning of a node:
375 out << "edge: { sourcename: \"" << v.GetFrom() << "\"\n";
376 out << " targetname: \"" << v.GetTo() << "\"\n";
377 out << " thickness: " << v.GetThickness() << "\n";
378 // out << " anchor: " << v.GetAnchor() << "\n";
379 out << " }\n";
380 return out;
381}
char * GetTo() const
Definition VCG.h:137
char * GetFrom() const
Definition VCG.h:136
int GetThickness() const
Definition VCG.h:135

References VCGEdge::GetFrom(), VCGEdge::GetThickness(), and VCGEdge::GetTo().

◆ operator<<() [2/3]

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

Definition at line 223 of file VCG.cpp.

224{
225
226 //Get Initial stuff:
227 out << "graph: { title: \"" << v.GetTitle() << "\"\n";
228 out << " splines: no\n";
229 out << " layoutalgorithm: tree\n";
230 out << " smanhattan_edges: yes\n";
231 out << " finetuning: yes\n";
232 out << " portsharing: no\n";
233 out << " treefactor: 0.2\n";
234 out << " width: " << v.GetWidth() << endl;
235 out << " height: " << v.GetHeight() << endl;
236 out << " x: " << v.GetX() << endl;
237 out << " y: " << v.GetY() << endl;
238 out << " color: " << v.GetColor() << endl;
239
240 //Now, output each Node;
241 v.OutputNodes(out);
242
243 //Now, output each edge;
244 v.OutputEdges(out);
245
246
247 //Cap off the end and return the entire stream
248 out << "\n}" << endl;
249 return out;
250}
int GetWidth() const
Definition VCG.h:73
void OutputNodes(std::ostream &out)
Definition VCG.cpp:252
char * GetColor() const
Definition VCG.h:77
char * GetTitle() const
Definition VCG.h:72
int GetHeight() const
Definition VCG.h:74
void OutputEdges(std::ostream &out)
Definition VCG.cpp:268
int GetY() const
Definition VCG.h:76
int GetX() const
Definition VCG.h:75

References VCGGraph::GetColor(), VCGGraph::GetHeight(), VCGGraph::GetTitle(), VCGGraph::GetWidth(), VCGGraph::GetX(), VCGGraph::GetY(), VCGGraph::OutputEdges(), and VCGGraph::OutputNodes().

◆ operator<<() [3/3]

ostream & operator<< ( ostream &  out,
VCGNode v 
)

Definition at line 325 of file VCG.cpp.

326{
327
328 //Output the beginning of a node:
329 out << "node: { title: \"" << v.GetTitle() << "\"\n";
330 out << " label: \"" << v.GetLabel() << "\"\n";
331 out << " shape: " << v.GetShape() << "\n";
332 out << " bordercolor: " << v.GetBorderColor() << "\n";
333 out << " }\n";
334 return out;
335}
char * GetLabel() const
Definition VCG.h:110
char * GetTitle() const
Definition VCG.h:109
char * GetShape() const
Definition VCG.h:111
char * GetBorderColor() const
Definition VCG.h:112

References VCGNode::GetBorderColor(), VCGNode::GetLabel(), VCGNode::GetShape(), and VCGNode::GetTitle().