Brief description of class still missing. More...
#include <SeedLinkServer.h>
Public Member Functions | |
void | addStation (SeedLinkStation *station) |
SubSignalPool | allSignals () const |
const SeedLinkStation * | at (int index) const |
QString | beginTime () const |
void | clear () |
int | count () const |
int | indexOf (SeedLinkStation *station) const |
QList< int > | indexOf (QRegExp networkStation) const |
QString | organization () const |
QString | software () const |
virtual void | xml_attributes (XML_ATTRIBUTES_ARGS) const |
virtual bool | xml_setAttributes (XML_SETATTRIBUTES_ARGS) |
virtual const QString & | xml_tagName () const |
~SeedLinkServer () | |
Static Public Attributes | |
static const QString | xmlSeedLinkServerTag = "seedlink" |
Protected Member Functions | |
virtual XMLMember | xml_member (XML_MEMBER_ARGS) |
virtual void | xml_polish (XML_POLISH_ARGS) |
virtual void | xml_writeChildren (XML_WRITECHILDREN_ARGS) const |
Brief description of class still missing.
Full description of class still missing
void GeopsySLink::SeedLinkServer::addStation | ( | SeedLinkStation * | station | ) | [inline] |
{append(station);}
References GeopsyCore::SubSignalPool::addSignal(), GeopsySLink::SeedLinkStation::at(), GeopsySLink::SeedLinkStation::count(), GeopsySLink::SeedLinkStream::signal(), and TRACE.
{ TRACE; SubSignalPool subPool; for(const_iterator it=begin(); it!=end(); it++) { const SeedLinkStation * stat=*it; int n=stat->count(); for(int i=0; i<n; i++) { const SeedLinkStream * stream=stat->at(i); Signal * sig=stream->signal(); if(sig) { subPool.addSignal(sig); } } } return subPool; }
const SeedLinkStation* GeopsySLink::SeedLinkServer::at | ( | int | index | ) | const [inline] |
QString GeopsySLink::SeedLinkServer::beginTime | ( | ) | const [inline] |
{return _beginTime;}
void GeopsySLink::SeedLinkServer::clear | ( | ) |
References TRACE.
Referenced by GeopsySLink::SeedLink::stations(), GeopsySLink::SeedLink::streams(), and ~SeedLinkServer().
{ TRACE; qDeleteAll(*static_cast<QList<SeedLinkStation *> *>(this)); QList<SeedLinkStation *>::clear(); }
int GeopsySLink::SeedLinkServer::count | ( | ) | const [inline] |
Referenced by indexOf(), and GeopsySLinkGui::SeedLinkStreamItem::rowCount().
{return QList<SeedLinkStation *>::count();}
int GeopsySLink::SeedLinkServer::indexOf | ( | SeedLinkStation * | station | ) | const [inline] |
Referenced by GeopsySLinkGui::SeedLinkStreamItem::parent(), and GeopsySLinkGui::SeedLinkLoader::selectStreams().
{return QList<SeedLinkStation *>::indexOf(station);}
QList< int > GeopsySLink::SeedLinkServer::indexOf | ( | QRegExp | networkStation | ) | const |
References at(), count(), GeopsySLink::SeedLinkStation::name(), GeopsySLink::SeedLinkStation::network(), and TRACE.
QString GeopsySLink::SeedLinkServer::organization | ( | ) | const [inline] |
{return _organization;}
QString GeopsySLink::SeedLinkServer::software | ( | ) | const [inline] |
{return _software;}
void GeopsySLink::SeedLinkServer::xml_attributes | ( | XML_ATTRIBUTES_ARGS | ) | const [virtual] |
Reimplemented from QGpCoreTools::XMLClass.
References TRACE.
{ TRACE; Q_UNUSED(context); static const QString keys[]={ "software", "organization", "started" }; attributes.add(keys[0], _software); attributes.add(keys[1], _organization); attributes.add(keys[2], _beginTime); }
XMLMember GeopsySLink::SeedLinkServer::xml_member | ( | XML_MEMBER_ARGS | ) | [protected, virtual] |
Re-implement this function to offer XML restore (children and properties) support to your class.
From tag and map (with contains the attibute value) return a unique identifier under the format of a XMLMember. XMLMember is initialized with 3 types of contructors:
Map of attributes can be inspected in this way (can be achived also in xml_setProperty()):
static const QString tmp("childrenName"); XMLRestoreAttributeIterator it=map.find(tmp); if(it!=map.end()) { // found attribute "childrenName" }
If the map of attributes is not used:
Q_UNUSED(attributes); if(tag=="x1") return XMLMember(0); else if(tag=="y1") return XMLMember(1); else if(tag=="x2") return XMLMember(2); else if(tag=="y2") return XMLMember(3); else return XMLMember(XMLMember::Unknown);
Arithmetic operations + and - apply to XMLMember to avoid confusion of property id numbers between inherited objects. Offset 3 corresponds to the number of properties defined in this object.
if(tag=="anInteger") return XMLMember(0); else if(tag=="aString") return XMLMember(1); else if(tag=="aDouble") return XMLMember(2); return AbstractLine::xml_member(tag, attributes, context)+3;
For the arguments of this function use Macro XML_MEMBER_ARGS.
Reimplemented from QGpCoreTools::XMLClass.
References TRACE.
void GeopsySLink::SeedLinkServer::xml_polish | ( | XML_POLISH_ARGS | ) | [protected, virtual] |
Reimplemented from QGpCoreTools::XMLClass.
References GeopsySLink::SeedLinkStation::lessThan(), and TRACE.
{ TRACE; Q_UNUSED(context); qSort(begin(), end(), SeedLinkStation::lessThan); }
bool GeopsySLink::SeedLinkServer::xml_setAttributes | ( | XML_SETATTRIBUTES_ARGS | ) | [virtual] |
Reimplemented from QGpCoreTools::XMLClass.
References QGpCoreTools::StringSection::size(), and TRACE.
{ TRACE; Q_UNUSED(context); for(XMLRestoreAttributeIterator it=attributes.begin(); it!= attributes.end(); it++ ) { const StringSection& att=it.key(); if(att.size()<2) return false; switch (att[1].unicode()) { case 't': if(att=="started" ) _beginTime=it.value().toString(); else return false; break; case 'r': if(att=="organization" ) _organization=it.value().toString(); else return false; break; case 'o': if(att=="software" ) _software=it.value().toString(); else return false; break; default: return false; } } return true; }
virtual const QString& GeopsySLink::SeedLinkServer::xml_tagName | ( | ) | const [inline, virtual] |
Implements QGpCoreTools::XMLClass.
{return xmlSeedLinkServerTag;}
void GeopsySLink::SeedLinkServer::xml_writeChildren | ( | XML_WRITECHILDREN_ARGS | ) | const [protected, virtual] |
Reimplemented from QGpCoreTools::XMLClass.
References TRACE.
{ TRACE; for(const_iterator it=begin(); it!=end(); it++ ) { XMLSaveAttributes attributes; (*it)->xml_attributes(attributes, context); (*it)->xml_save(s, context, attributes); } }
const QString GeopsySLink::SeedLinkServer::xmlSeedLinkServerTag = "seedlink" [static] |