Select Git revision
Oliver Bock authored
git-svn-id: https://svn.origo.ethz.ch/fidelity@25 53d1999f-d1a8-4366-aa61-588fded17473
VOFits.cpp 2.29 KiB
/*************************************************************************
* Copyright (C) 2007 by Oliver Bock *
* bock@tfh-berlin.de *
* *
* This file is part of Fidelity. *
* *
* Fidelity is free software: you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published *
* by the Free Software Foundation, version 3 of the License. *
* *
* Fidelity is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with Fidelity. If not, see <http://www.gnu.org/licenses/>. *
* *
*************************************************************************/
#include "VOFits.h"
Fidelity::Common::VOFits::VOFits()
{
initAttributes();
}
Fidelity::Common::VOFits::~VOFits()
{
if(m_Stream) delete m_Stream;
}
void Fidelity::Common::VOFits::initAttributes()
{}
bool Fidelity::Common::VOFits::buildXml(QDomElement* parent)
{
parent->setTagName("FITS");
QDomDocument doc = parent->ownerDocument();
if (!m_ExtNum.isEmpty()) {
parent->setAttribute("extnum", m_ExtNum);
}
if (m_Stream != NULL) {
QDomElement tag = doc.createElement("STREAM");
if(m_Stream->buildXml(&tag) == false) {
return(false);
}
parent->appendChild(tag);
}
return(true);
}
void Fidelity::Common::VOFits::setExtNum(QString new_var)
{
m_ExtNum = new_var;
}
QString Fidelity::Common::VOFits::ExtNum()
{
return m_ExtNum;
}
void Fidelity::Common::VOFits::setStream(VOStream* new_var)
{
m_Stream = new_var;
}
VOStream* Fidelity::Common::VOFits::Stream()
{
return m_Stream;
}