TuttleOFX
1
|
00001 #ifndef _SEQUENCE_PARSER_FILE_HPP_ 00002 #define _SEQUENCE_PARSER_FILE_HPP_ 00003 00004 #include <FileObject.hpp> 00005 00006 namespace sequenceParser { 00007 00008 class File : public FileObject 00009 { 00010 00011 public: 00012 00013 File( const boost::filesystem::path& directory, const std::string& filename, const EMaskOptions& options ) : 00014 FileObject( directory, eMaskTypeFile, options ), 00015 _filename( filename ) { } 00016 00017 File( const File& other ) 00018 : FileObject( other ) 00019 , _filename( other._filename ) 00020 {} 00021 00022 ~File() { } 00023 00024 public: 00025 std::ostream& getCout( std::ostream& os ) const; 00026 00027 std::vector<boost::filesystem::path> getFiles() const; 00028 00029 inline std::string getAbsoluteFilename() const 00030 { 00031 return ( getAbsoluteDirectory() / _filename ).string(); 00032 } 00033 00034 inline std::string getFilename() const 00035 { 00036 return _filename; 00037 } 00038 00039 inline void clear() 00040 { 00041 FileObject::clear(); 00042 _filename.clear(); 00043 } 00044 00045 File* clone() const { return new File(*this); } 00046 00047 private: 00048 std::string _filename; 00049 }; 00050 00051 } 00052 00053 #endif 00054