Envision
A visual programming IDE for object-oriented languages
List of all members | Public Member Functions | Private Attributes | Static Private Attributes
FilePersistence::XMLModel Class Reference

Public Member Functions

 XMLModel ()
 
 XMLModel (const QString &filename)
 
virtual ~XMLModel ()
 
void beginLoadChildNode (const QString &nodeName)
 
void beginSaveChildNode (const QString &tag)
 
QString documentText () const
 
void endLoadChildNode ()
 
void endSaveChildNode ()
 
QStringList getChildrenNames () const
 
QDomElement getCurrentElement () const
 
Model::NodeIdType getId () const
 
QString getName () const
 
QString getType () const
 
bool goToElement (Model::NodeIdType id, bool startFromRoot=true)
 
void goToFirstChild ()
 
void goToParent ()
 
void goToRoot ()
 
bool hasChild (const QString &nodeName) const
 
bool hasChildren () const
 
bool hasNext () const
 
void importChildFromXML (QDomElement child)
 
bool isDouble () const
 
bool isInteger () const
 
bool isString () const
 
double loadDoubleValue () const
 
int loadIntValue () const
 
void loadNext ()
 
QString loadStringValue () const
 
void saveDoubleValue (double value)
 
void saveIntValue (int value)
 
void saveNext (const QString &tag)
 
void saveStringValue (const QString &value)
 
void setDocumentText (const QString &text)
 
void setId (Model::NodeIdType id)
 
void setName (const QString &name)
 

Private Attributes

QDomDocument doc
 
QDomElement elem
 
QList< QDomElement > elemStack
 

Static Private Attributes

static const int MAX_DOUBLE_PRECISION = 15
 
static const char * XML_DOM_TYPE = "EnvisionFilePersistence"
 

Constructor & Destructor Documentation

◆ XMLModel() [1/2]

FilePersistence::XMLModel::XMLModel ( )

◆ XMLModel() [2/2]

FilePersistence::XMLModel::XMLModel ( const QString &  filename)

◆ ~XMLModel()

FilePersistence::XMLModel::~XMLModel ( )
virtual

Member Function Documentation

◆ beginLoadChildNode()

void FilePersistence::XMLModel::beginLoadChildNode ( const QString &  nodeName)

◆ beginSaveChildNode()

void FilePersistence::XMLModel::beginSaveChildNode ( const QString &  tag)

◆ documentText()

QString FilePersistence::XMLModel::documentText ( ) const

◆ endLoadChildNode()

void FilePersistence::XMLModel::endLoadChildNode ( )

◆ endSaveChildNode()

void FilePersistence::XMLModel::endSaveChildNode ( )

◆ getChildrenNames()

QStringList FilePersistence::XMLModel::getChildrenNames ( ) const

◆ getCurrentElement()

QDomElement FilePersistence::XMLModel::getCurrentElement ( ) const

◆ getId()

Model::NodeIdType FilePersistence::XMLModel::getId ( ) const

◆ getName()

QString FilePersistence::XMLModel::getName ( ) const

◆ getType()

QString FilePersistence::XMLModel::getType ( ) const

◆ goToElement()

bool FilePersistence::XMLModel::goToElement ( Model::NodeIdType  id,
bool  startFromRoot = true 
)

◆ goToFirstChild()

void FilePersistence::XMLModel::goToFirstChild ( )

◆ goToParent()

void FilePersistence::XMLModel::goToParent ( )

◆ goToRoot()

void FilePersistence::XMLModel::goToRoot ( )

◆ hasChild()

bool FilePersistence::XMLModel::hasChild ( const QString &  nodeName) const

◆ hasChildren()

bool FilePersistence::XMLModel::hasChildren ( ) const

◆ hasNext()

bool FilePersistence::XMLModel::hasNext ( ) const

◆ importChildFromXML()

void FilePersistence::XMLModel::importChildFromXML ( QDomElement  child)

◆ isDouble()

bool FilePersistence::XMLModel::isDouble ( ) const

◆ isInteger()

bool FilePersistence::XMLModel::isInteger ( ) const

◆ isString()

bool FilePersistence::XMLModel::isString ( ) const

◆ loadDoubleValue()

double FilePersistence::XMLModel::loadDoubleValue ( ) const

◆ loadIntValue()

int FilePersistence::XMLModel::loadIntValue ( ) const

◆ loadNext()

void FilePersistence::XMLModel::loadNext ( )

◆ loadStringValue()

QString FilePersistence::XMLModel::loadStringValue ( ) const

◆ saveDoubleValue()

void FilePersistence::XMLModel::saveDoubleValue ( double  value)

◆ saveIntValue()

void FilePersistence::XMLModel::saveIntValue ( int  value)

◆ saveNext()

void FilePersistence::XMLModel::saveNext ( const QString &  tag)

◆ saveStringValue()

void FilePersistence::XMLModel::saveStringValue ( const QString &  value)

◆ setDocumentText()

void FilePersistence::XMLModel::setDocumentText ( const QString &  text)

◆ setId()

void FilePersistence::XMLModel::setId ( Model::NodeIdType  id)

◆ setName()

void FilePersistence::XMLModel::setName ( const QString &  name)

Member Data Documentation

◆ doc

QDomDocument FilePersistence::XMLModel::doc
private

◆ elem

QDomElement FilePersistence::XMLModel::elem
private

◆ elemStack

QList<QDomElement> FilePersistence::XMLModel::elemStack
private

◆ MAX_DOUBLE_PRECISION

const int FilePersistence::XMLModel::MAX_DOUBLE_PRECISION = 15
staticprivate

◆ XML_DOM_TYPE

const char * FilePersistence::XMLModel::XML_DOM_TYPE = "EnvisionFilePersistence"
staticprivate