1 /* $Id: bed_track_record.hpp 543641 2017-08-11 16:19:22Z ludwigf $ 2 * =========================================================================== 3 * 4 * PUBLIC DOMAIN NOTICE 5 * National Center for Biotechnology Information 6 * 7 * This software/database is a "United States Government Work" under the 8 * terms of the United States Copyright Act. It was written as part of 9 * the author's official duties as a United States Government employee and 10 * thus cannot be copyrighted. This software/database is freely available 11 * to the public for use. The National Library of Medicine and the U.S. 12 * Government have not placed any restriction on its use or reproduction. 13 * 14 * Although all reasonable efforts have been taken to ensure the accuracy 15 * and reliability of the software and data, the NLM and the U.S. 16 * Government do not and cannot warrant the performance or results that 17 * may be obtained by using this software or data. The NLM and the U.S. 18 * Government disclaim all warranties, express or implied, including 19 * warranties of performance, merchantability or fitness for any particular 20 * purpose. 21 * 22 * Please cite the author in any work or product based on this material. 23 * 24 * =========================================================================== 25 * 26 * Authors: Frank Ludwig 27 * 28 * File Description: BED file track line data 29 * 30 */ 31 32 #ifndef OBJTOOLS_WRITERS___BED_TRACK_RECORD__HPP 33 #define OBJTOOLS_WRITERS___BED_TRACK_RECORD__HPP 34 35 #include <objects/general/User_object.hpp> 36 37 BEGIN_NCBI_SCOPE 38 BEGIN_objects_SCOPE 39 40 // ============================================================================ 41 /// Encapsulation of a track line in the BED file format. For the most part, 42 /// BED track line consist of key value pairs. Some of the keys are part of the 43 /// actual spec and have a defined meaning. 44 /// 45 class CBedTrackRecord 46 // ============================================================================ 47 { 48 public: CBedTrackRecord()49 CBedTrackRecord() {}; ~CBedTrackRecord()50 ~CBedTrackRecord() {}; 51 52 bool Assign(const CSeq_annot&); 53 bool Write(CNcbiOstream&); 54 55 bool UseScore() const; 56 57 protected: 58 bool xImportKeyValuePairs( 59 const CUser_object&); 60 std::string xGetKeyValue( 61 const std::string&) const; 62 63 string mName; 64 string mTitle; 65 std::map<std::string, std::string> mKeyValuePairs; 66 }; 67 68 END_objects_SCOPE 69 END_NCBI_SCOPE 70 71 #endif // OBJTOOLS_WRITERS___BED_TRACK_RECORD__HPP 72