GeopsyCore/DefaultSignalGroup.h
Go to the documentation of this file.
00001 /***************************************************************************
00002 **
00003 **  This file is part of GeopsyCore.
00004 **
00005 **  This library is free software; you can redistribute it and/or
00006 **  modify it under the terms of the GNU Lesser General Public
00007 **  License as published by the Free Software Foundation; either
00008 **  version 2.1 of the License, or (at your option) any later version.
00009 **
00010 **  This file is distributed in the hope that it will be useful, but WITHOUT
00011 **  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
00012 **  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
00013 **  License for more details.
00014 **
00015 **  You should have received a copy of the GNU Lesser General Public
00016 **  License along with this library; if not, write to the Free Software
00017 **  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
00018 **
00019 **  See http://www.geopsy.org for more information.
00020 **
00021 **  Created: 2011-05-20
00022 **  Authors:
00023 **    Marc Wathelet (ISTerre, Grenoble, France)
00024 **
00025 ***************************************************************************/
00026 
00027 #ifndef DEFAULTSIGNALGROUP_H
00028 #define DEFAULTSIGNALGROUP_H
00029 
00030 #include "GeopsyCoreDLLExport.h"
00031 #include "AbstractSignalGroup.h"
00032 
00033 namespace GeopsyCore {
00034 
00035   class GEOPSYCORE_EXPORT DefaultSignalGroup: public AbstractSignalGroup
00036   {
00037     TRANSLATIONS("DefaultSignalGroup");
00038   public:
00039     DefaultSignalGroup(SignalDB * database, AbstractSignalGroup * parent=0);
00040 
00041     virtual const QString& xml_tagName() const {return xmlDefaultSignalGroupTag;}
00042     static const QString xmlDefaultSignalGroupTag;
00043     virtual bool xml_inherits(const QString& tagName) const;
00044 
00045     virtual bool readOnly() const {return true;}
00046 
00047     virtual bool hasOwnSignal() const {return true;}
00048     virtual bool contains(int) const {return false;}
00049     virtual bool convertIds(const QHash<int, Signal *>&) {return true;}
00050     virtual void removeSignal(Signal *) {}
00051   protected:
00052     void xml_writeProperties(XML_WRITEPROPERTIES_ARGS) const;
00053     void xml_writeChildren(XML_WRITECHILDREN_ARGS) const;
00054     XMLMember xml_member(XML_MEMBER_ARGS);
00055 
00056     SignalDB * database() const {return _database;}
00057   private:
00058     SignalDB * _database;
00059   };
00060 
00061   class AllSignalsGroup: public DefaultSignalGroup
00062   {
00063   public:
00064     AllSignalsGroup(SignalDB * database, AbstractSignalGroup * parent=0);
00065 
00066     virtual SubSignalPool subPool() const;
00067   };
00068 
00069   class TemporarySignalsGroup: public DefaultSignalGroup
00070   {
00071   public:
00072     TemporarySignalsGroup(SignalDB * database, AbstractSignalGroup * parent=0);
00073 
00074     virtual SubSignalPool subPool() const;
00075   };
00076 
00077   class AllFilesGroup: public DefaultSignalGroup
00078   {
00079   public:
00080     AllFilesGroup(SignalDB * database, AbstractSignalGroup * parent=0);
00081 
00082     virtual SubSignalPool subPool() const;
00083   };
00084 
00085   class TemporaryFilesGroup: public DefaultSignalGroup
00086   {
00087   public:
00088     TemporaryFilesGroup(SignalDB * database, AbstractSignalGroup * parent=0);
00089 
00090     virtual SubSignalPool subPool() const;
00091   };
00092 
00093   class PermanentFilesGroup: public DefaultSignalGroup
00094   {
00095   public:
00096     PermanentFilesGroup(SignalDB * database, AbstractSignalGroup * parent=0);
00097 
00098     virtual SubSignalPool subPool() const;
00099   };
00100 
00101 
00102 } // namespace GeopsyCore
00103 
00104 #endif // DEFAULTSIGNALGROUP_H
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Defines