Skip to content
Snippets Groups Projects
Commit 1a01403d authored by Oliver Bock's avatar Oliver Bock
Browse files

- Improved memory management (QPointer)

- Use namespaces properly

git-svn-id: https://svn.origo.ethz.ch/fidelity@19 53d1999f-d1a8-4366-aa61-588fded17473
parent a71b719e
No related branches found
No related tags found
No related merge requests found
...@@ -20,24 +20,27 @@ ...@@ -20,24 +20,27 @@
#include "VOTD.h" #include "VOTD.h"
Fidelity::Common::VOTD::VOTD() namespace Fidelity {
namespace Common {
VOTD::VOTD()
{ {
initAttributes(); initAttributes();
} }
Fidelity::Common::VOTD::VOTD(QString content) VOTD::VOTD(QString content)
{ {
m_Content = content; m_Content = content;
initAttributes(); initAttributes();
} }
Fidelity::Common::VOTD::~VOTD() VOTD::~VOTD()
{ {
} }
bool Fidelity::Common::VOTD::buildXml(QDomElement* parent) bool VOTD::buildXml(QDomElement* parent)
{ {
parent->setTagName("TD"); parent->setTagName("TD");
...@@ -54,25 +57,27 @@ bool Fidelity::Common::VOTD::buildXml(QDomElement* parent) ...@@ -54,25 +57,27 @@ bool Fidelity::Common::VOTD::buildXml(QDomElement* parent)
} }
void Fidelity::Common::VOTD::setEncoding(QString new_var) void VOTD::setEncoding(QString new_var)
{ {
m_Encoding = new_var; m_Encoding = new_var;
} }
QString Fidelity::Common::VOTD::Encoding() QString VOTD::Encoding()
{ {
return m_Encoding; return m_Encoding;
} }
void Fidelity::Common::VOTD::setContent(QString new_var) void VOTD::setContent(QString new_var)
{ {
m_Content = new_var; m_Content = new_var;
} }
QString Fidelity::Common::VOTD::Content() QString VOTD::Content()
{ {
return m_Content; return m_Content;
} }
void Fidelity::Common::VOTD::initAttributes() void VOTD::initAttributes()
{} {}
}}
...@@ -21,6 +21,7 @@ ...@@ -21,6 +21,7 @@
#ifndef VOTD_H #ifndef VOTD_H
#define VOTD_H #define VOTD_H
#include <QObject>
#include <QString> #include <QString>
#include <QDomElement> #include <QDomElement>
...@@ -34,7 +35,7 @@ namespace Fidelity { ...@@ -34,7 +35,7 @@ namespace Fidelity {
* See this URL for the latest definition: http://www.ivoa.net/Documents/latest/VOT.html * See this URL for the latest definition: http://www.ivoa.net/Documents/latest/VOT.html
* For the time being only XML and binary based output is supported... * For the time being only XML and binary based output is supported...
*/ */
class VOTD class VOTD : public QObject
{ {
public: public:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment