Logo Search packages:      
Sourcecode: libgdf version File versions  Download package

gdf::Channel::Channel ( const SignalHeader sig_hdr )

Constructor.

Channel length is initialized to channel's samples_per_record.

Definition at line 80 of file Channel.cpp.

    {
        m_signalheader = sig_hdr;

        size_t length = sig_hdr->get_samples_per_record( );

        switch( m_signalheader->get_datatype( ) )
        {
        case INT8:
            {
                m_data = new ChannelData<int8>( length );
            } break;
        case UINT8:
            {
                m_data = new ChannelData<uint8>( length );
            } break;
        case INT16:
            {
                m_data = new ChannelData<int16>( length );
            } break;
        case UINT16:
            {
                m_data = new ChannelData<uint16>( length );
            } break;
        case INT32:
            {
                m_data = new ChannelData<int32>( length );
            } break;
        case UINT32:
            {
                m_data = new ChannelData<uint32>( length );
            } break;
        case INT64:
            {
                m_data = new ChannelData<int64>( length );
            } break;
        case UINT64:
            {
                m_data = new ChannelData<uint64>( length );
            } break;
        case FLOAT32:
            {
                m_data = new ChannelData<float32>( length );
            } break;
        case FLOAT64:
            {
                m_data = new ChannelData<float64>( length );
            } break;
        default: throw exception::invalid_type_id( boost::lexical_cast<std::string>(m_signalheader->get_datatype( )) ); break;
        }
    }

Generated by  Doxygen 1.6.0   Back to index