libGDF
Record.h
00001 //
00002 // This file is part of libGDF.
00003 //
00004 // libGDF is free software: you can redistribute it and/or modify
00005 // it under the terms of the GNU Lesser General Public License as
00006 // published by the Free Software Foundation, either version 3 of
00007 // the License, or (at your option) any later version.
00008 //
00009 // libGDF is distributed in the hope that it will be useful,
00010 // but WITHOUT ANY WARRANTY; without even the implied warranty of
00011 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00012 // GNU Lesser General Public License for more details.
00013 //
00014 // You should have received a copy of the GNU Lesser General Public License
00015 // along with libGDF.  If not, see <http://www.gnu.org/licenses/>.
00016 //
00017 // Copyright 2010 Martin Billinger
00018 
00019 #ifndef __RECORD_H_INCLUDED__
00020 #define __RECORD_H_INCLUDED__
00021 
00022 #include "GDF/Channel.h"
00023 #include "pointerpool.h"
00024 #include <vector>
00025 #include <list>
00026 
00027 namespace gdf {
00028 
00029     class GDFHeaderAccess;
00030 
00032     class Record
00033     {
00034     private:
00036         Record( const GDFHeaderAccess *hdr );
00037 
00038     public:
00039 
00041         Record( const Record &other );
00042 
00044         virtual ~Record( );
00045 
00047         void clear( );
00048 
00050         void operator=( const Record &other );
00051 
00053 
00058         void fill( );
00059 
00061         bool isFull( ) const;
00062 
00064         bool isEmpty( ) const;
00065 
00067         Channel *getChannel( const size_t chan_idx );
00068 
00069         friend std::ostream &operator<<( std::ostream &out, const Record &c );
00070         friend std::istream &operator>>( std::istream &in, Record &c );
00071 
00072         friend class RecordBuffer;
00073         friend class Reader;
00074         //friend class PointerPool<Record>;
00075 
00076     private:
00077         std::vector< Channel* > channels;
00078     };
00079 
00081     std::ostream &operator<<( std::ostream &out, const Record &r );
00082 
00084     std::istream &operator>>( std::istream &in, Record &r );
00085 }
00086 
00087 #endif
 All Data Structures Functions Variables Friends