Main Page | Namespace List | Class Hierarchy | Class List | Directories | File List | Namespace Members | Class Members

FD::UIDocument Class Reference

#include <UIDocument.h>

Inheritance diagram for FD::UIDocument:

Inheritance graph
[legend]
Collaboration diagram for FD::UIDocument:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 UIDocument (std::string _name)
virtual ~UIDocument ()
virtual void load ()
virtual void loadXML (xmlNodePtr root)
virtual void loadFromMemory (const char *mem, int size)
void setCategory (const std::string &cat)
const std::string & getCategory ()
void setComments (const std::string &comments)
const std::string & getComments ()
void setModified ()
void resetModified ()
bool isModified ()
UINetworkaddNetwork (std::string name, UINetwork::Type type)
UINetworkaddNetwork (xmlNodePtr xmlNet)
void removeNetwork (UINetwork *toRemove)
bool isUntitled ()
virtual const std::string & getName ()
const std::string & getPath ()
virtual void save ()
char * saveToMemory (int &size)
void addParameterText (std::string name, std::string value, std::string type)
UINetworkgetNetworkNamed (const std::string &n)
std::vector< ItemInfo * > getNetInputs (const std::string &netName)
std::vector< ItemInfo * > getNetOutputs (const std::string &netName)
std::vector< ItemInfo * > getNetParams (const std::string &netName)
std::string getDescription (const std::string &type)
void printOn (std::ostream &out=std::cout) const
std::vector< UINetwork * > get_networks ()
std::vector< DocParameterDataText * > get_textParams ()
virtual UINetworknewNetwork (const std::string &_name, UINetwork::Type type)
virtual UINetworknewNetwork (xmlNodePtr _net)
Networkbuild (const std::string &_name, const ParameterSet &params)
std::set< std::string > genCode (std::ostream &out, const std::string &functName, bool localIncludes=false)
void exportNetwork (const std::string &networkName, const std::string &fileName)
void importNetwork (const std::string &fileName)
virtual void run ()
virtual void run (ParameterSet &p)
virtual void setFullPath (const std::string &fullpath)
void updateNetInfo (UINetwork *net)
void updateAllNetworks ()
virtual void updateAllSubnetTerminals (const std::string _nettype, const std::string _terminalname, UINetTerminal::NetTermType _terminaltype, bool _remove)
UINodeRepository & getRepository ()

Static Public Member Functions

static NetworkbuildExternal (const std::string &type, const std::string &_name, const ParameterSet &params)
static std::string findExternal (const std::string &filename, char *searchPath="FLOWDESIGNER_PATH", bool include_home=true, bool fullPathOutput=true)
static void genCodeExternal (const std::string &type, std::ostream &out, int &id, std::set< std::string > &nodeList)

Protected Member Functions

virtual void error (char *err)

Protected Attributes

std::vector< UINetwork * > networks
bool modified
UINodeRepository subnetInfo
std::vector< DocParameterDataText * > textParams
std::vector< ParameterText * > docInputs
std::vector< ParameterText * > docOutputs
std::vector< ParameterText * > docParams
std::string docName
std::string path
bool untitled
bool destroyed
std::string category
std::string m_comments

Detailed Description

GUI-independent memory representation for an XML FlowDesigner document
Author:
: Jean-Marc Valin


Constructor & Destructor Documentation

FD::UIDocument::UIDocument std::string  _name  ) 
 

Document constructor with name, DOES NOT load the document (document created as untitled)

virtual FD::UIDocument::~UIDocument  )  [virtual]
 

Virtual destructor


Member Function Documentation

UINetwork* FD::UIDocument::addNetwork xmlNodePtr  xmlNet  ) 
 

Add a network to the document from an XML node (used in load())

UINetwork* FD::UIDocument::addNetwork std::string  name,
UINetwork::Type  type
 

Add a network to the document

void FD::UIDocument::exportNetwork const std::string &  networkName,
const std::string &  fileName
 

Export a network into XML (for future import)

Author:
Dominic Letourneau (August 9 2004)
Parameters:
networkName The name of the network to export
fileName The name of the file to create, will be in XML format

std::set<std::string> FD::UIDocument::genCode std::ostream &  out,
const std::string &  functName,
bool  localIncludes = false
 

Generate C++ code for building the document, instead of using XML

const std::string& FD::UIDocument::getCategory  )  [inline]
 

Get the category of the document in the node menu

const std::string& FD::UIDocument::getComments  )  [inline]
 

Get comments from the document

virtual const std::string& FD::UIDocument::getName  )  [inline, virtual]
 

Document name (no path

const std::string& FD::UIDocument::getPath  )  [inline]
 

Document path

void FD::UIDocument::importNetwork const std::string &  fileName  ) 
 

Import a network from XML file

Author:
Dominic Letourneau (August 9 2004)
Parameters:
fileName The file containing the exported XML network

bool FD::UIDocument::isModified  )  [inline]
 

Has the document been modified since last saved?

bool FD::UIDocument::isUntitled  )  [inline]
 

Is the document untitled?

virtual void FD::UIDocument::load  )  [virtual]
 

Explicitly loads a document using the name specified at construction

virtual void FD::UIDocument::loadFromMemory const char *  mem,
int  size
[virtual]
 

Loads the document from memory

virtual void FD::UIDocument::loadXML xmlNodePtr  root  )  [virtual]
 

Loads the document from a parsed XML tree

void FD::UIDocument::printOn std::ostream &  out = std::cout  )  const [virtual]
 

A UIDocument can print itself

Implements FD::Object.

void FD::UIDocument::removeNetwork UINetwork toRemove  ) 
 

Remove and destroy network from the document

void FD::UIDocument::resetModified  )  [inline]
 

Resets the 'modified' flag

virtual void FD::UIDocument::save  )  [virtual]
 

Save the document to file specified in internal variables 'path' and 'docName'

char* FD::UIDocument::saveToMemory int &  size  ) 
 

Convert document to an XML string in memory

void FD::UIDocument::setCategory const std::string &  cat  )  [inline]
 

Set the category of the document in the node menu

void FD::UIDocument::setComments const std::string &  comments  )  [inline]
 

Set comments for the document

void FD::UIDocument::setModified  )  [inline]
 

Sets the 'modified' flag


Member Data Documentation

std::string FD::UIDocument::category [protected]
 

Category of the document, used when the document's MAIN network is to be inserted as a node

bool FD::UIDocument::destroyed [protected]
 

True if the object has already been destroyed (by superclass destructor)

std::vector<ParameterText *> FD::UIDocument::docInputs [protected]
 

Input for the document if used as an external node

std::string FD::UIDocument::docName [protected]
 

File name (no path)

std::vector<ParameterText *> FD::UIDocument::docOutputs [protected]
 

Output for the document if used as an external node

std::vector<ParameterText *> FD::UIDocument::docParams [protected]
 

Parameters for the document if used as an external node

std::string FD::UIDocument::m_comments [protected]
 

Comments inserted in the document

bool FD::UIDocument::modified [protected]
 

Flag is set to true anytime there's a change that hasn't been saved

std::vector<UINetwork *> FD::UIDocument::networks [protected]
 

Pointers to all networks included (defined) in the document

std::string FD::UIDocument::path [protected]
 

Document path

UINodeRepository FD::UIDocument::subnetInfo [protected]
 

Info about all internal networks that can be included as nodes - I think (should be cleaned up)

std::vector<DocParameterDataText *> FD::UIDocument::textParams [protected]
 

Document parameters (should be re-written)

bool FD::UIDocument::untitled [protected]
 

True if document has no real name yet


The documentation for this class was generated from the following file:
Generated on Wed Oct 5 14:30:05 2005 for FlowDesigner by  doxygen 1.4.4