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.5.1 
00007 // Author:          Aaron Darling 
00008 // Modified by:     
00009 // Copyright:       (c) Aaron Darling 
00010 // Licenses:        See COPYING file for details
00011 /////////////////////////////////////////////////////////////////////////////
00012 
00013 
00014 #include <string>
00015 #include "gn/gnBaseSource.h"
00016 #include "gn/gnSourceQualifier.h"
00017 
00018 gnSourceQualifier::gnSourceQualifier(){
00019         m_source = NULL;
00020         m_name = "";
00021         m_start = 0;
00022         m_length = 0;
00023 }
00024 gnSourceQualifier::gnSourceQualifier( gnBaseSource* source, string& name, uint32 begin, uint32 length ){
00025         m_source = source;
00026         m_name = name;
00027         m_start = begin;
00028         m_length = length;
00029 }
00030 gnSourceQualifier::gnSourceQualifier(const gnSourceQualifier& s){
00031         m_source = s.m_source;
00032         m_start = s.m_start;
00033         m_length = s.m_length;
00034         m_name = string(s.m_name);
00035 }
00036 gnSourceQualifier::~gnSourceQualifier(){
00037 };
00038 string gnSourceQualifier::GetValue() const{
00039         Array<char> array_buf( m_length );
00040         char* buf = array_buf.data;
00041         uint32 readBytes = m_length;
00042         m_source->Read(m_start, buf, readBytes);
00043         string rval(buf, readBytes);
00044         return rval;
00045 }

Generated on Sun Feb 2 19:28:59 2003 for libGenome by doxygen1.3-rc3