Main Page | Modules | Class Hierarchy | Alphabetical List | Compound List | File List | Compound Members | Related Pages

TIdentification.h

00001 /*
00002 
00003   MusicXML Library
00004   Copyright (C) 2003  Grame
00005 
00006   This library is free software; you can redistribute it and/or
00007   modify it under the terms of the GNU Lesser General Public
00008   License as published by the Free Software Foundation; either
00009   version 2.1 of the License, or (at your option) any later version.
00010 
00011   This library is distributed in the hope that it will be useful,
00012   but WITHOUT ANY WARRANTY; without even the implied warranty of
00013   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00014   Lesser General Public License for more details.
00015 
00016   You should have received a copy of the GNU Lesser General Public
00017   License along with this library; if not, write to the Free Software
00018   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00019 
00020   Grame Research Laboratory, 9 rue du Garet, 69001 Lyon - France
00021   grame@grame.fr
00022 
00023 */
00024 
00025 #ifndef __TIdentification__
00026 #define __TIdentification__
00027 
00028 #include "exports.h"
00029 #include "TScoreVisitor.h"
00030 
00031 #include <string>
00032 
00033 namespace MusicXML 
00034 {
00035 
00045 class EXP TCreator : public visitable, public smartable {
00046     public:
00047         EXP friend SMARTP<TCreator> newCreator();
00048 
00049         virtual void accept(TScoreVisitor& visitor);
00050 
00051         void    setType(const string& type);
00052         void    setName(const string& name);
00053 
00054         const string&   getType() const     { return fType; }
00055         const string&   getName() const     { return fName; }
00056 
00057    protected:
00058        TCreator() {}
00059         virtual ~TCreator() {}
00060    private:
00062         string  fType;
00064         string  fName;
00065 };
00066 typedef SMARTP<TCreator> SCreator;
00067 
00076 class EXP TRights : public visitable, public smartable {
00077     
00078     public:
00079         EXP friend SMARTP<TRights> newRights();
00080         
00081         virtual void accept(TScoreVisitor& visitor);
00082         const string&   getType() const     { return fType; }
00083         const string&   getRight() const    { return fRights; }
00084         
00085         void    setType(const string& type);
00086         void    setRights(const string& rights);
00087 
00088     protected:
00089         TRights() {}
00090         virtual ~TRights() {}
00091     private:
00093         string  fType;
00094         string  fRights;
00095 };
00096 typedef SMARTP<TRights> SRights;
00097 
00113 class EXP TEncoding : public visitable, public smartable {
00114     
00115     public:     
00116         EXP friend SMARTP<TEncoding> newEncoding();
00117 
00118         virtual void accept(TScoreVisitor& visitor);
00119         
00120         void setDate (const string& date);
00121         void setEncoder (const string& encoder);
00122         void setEncoderType (const string& etype);
00123         void setSoftware (const string& soft);
00124         void setDescription (const string& desc);
00125 
00126         const string& getDate () const          { return fDate; }
00127         const string& getEncoder () const       { return fEncoder; }
00128         const string& getEncoderType () const   { return fEncoderType; }
00129         const string& getSoftware () const      { return fSoftware; }
00130         const string& getDescription () const   { return fDescription; }
00131 
00132    protected:
00133         TEncoding() {}
00134         virtual ~TEncoding() {}
00135    private:
00137         string  fDate;
00139         string  fEncoder;
00141         string  fEncoderType;
00143         string  fSoftware;
00145         string  fDescription;
00146 };
00147 typedef SMARTP<TEncoding> SEncoding;
00148 
00159 class EXP TIdentification : public visitable, public smartable {
00160     
00161     public:
00162         EXP friend SMARTP<TIdentification> newIdentification();
00163 
00164         virtual void accept(TScoreVisitor& visitor);
00165 
00166         long add (const SCreator& creator);
00167         long add (const SRights& rights);
00168         void setSource (const string& src);
00169         
00170         vvector<SCreator>&  creators()      { return fCreatorList; }
00171         vvector<SRights>&   rights()        { return fRightsList; }
00172         const string&       getSource()     { return fSource; }
00173 
00174         SEncoding&          encoding()      { return fEncoding; }
00175 
00176     protected:
00177         TIdentification() {}
00178         virtual ~TIdentification() {}
00179     private:
00180         vvector<SCreator> fCreatorList;
00181         vvector<SRights>  fRightsList;
00182         SEncoding       fEncoding;
00183         string          fSource;
00184 // miscellaneous are ignored: to be implemented
00185 //        vector<string>    fMiscellaneaous;
00186 };
00187 typedef SMARTP<TIdentification> SIdentification;
00188 
00189 } // namespace MusicXML
00190 
00191 
00192 #endif

Generated on Tue Mar 23 09:49:43 2004 for LibMusicXML by doxygen 1.3.3