gnSourceQualifier.cpp Source File

Main Page Namespace List Class Hierarchy Alphabetical List Compound List File List Compound Members File Members

# gnSourceQualifier.cpp

Go to the documentation of this file.

    00001
    00002 // File:            gnSourceQualifier.cpp
    00003 // Purpose:         Source Qualifier class
    00004 // Description:     Provides an interface for Qualifier on disk.
    00005 // Changes:
    00006 // Version:         libGenome 0.1.0
    00007 // Author:          Aaron Darling
    00008 // Last Edited:     April 15, 2001, 11:13:00pm
    00009 // Modified by:
    00010 // Copyright:       (c) Aaron Darling
    00011 // Licenses:        Proprietary
    00013
    00014
    00015 #include <string>
    00016 #include "gn/gnBaseSource.h"
    00017 #include "gn/gnSourceQualifier.h"
    00018
    00019 gnSourceQualifier::gnSourceQualifier(){
    00020         m_source = NULL;
    00021         m_name = "";
    00022         m_start = 0;
    00023         m_length = 0;
    00024 }
    00025 gnSourceQualifier::gnSourceQualifier( gnBaseSource* source, string& name, uint32 begin, uint32 length ){
    00026         m_source = source;
    00027         m_name = name;
    00028         m_start = begin;
    00029         m_length = length;
    00030 }
    00031 gnSourceQualifier::gnSourceQualifier(const gnSourceQualifier& s){
    00032         m_source = s.m_source;
    00033         m_start = s.m_start;
    00034         m_length = s.m_length;
    00035         m_name = string(s.m_name);
    00036 }
    00037 gnSourceQualifier::~gnSourceQualifier(){
    00038 };
    00039 string gnSourceQualifier::GetValue() const{
    00040         char* buf = new char[m_length];
    00041         uint32 readBytes = m_length;
    00042         m_source->Read(m_start, buf, readBytes);
    00043         string rval(buf, readBytes);
    00044         return rval;
    00045 }