// // Copyright 2009 Illumina, Inc. // // This software is covered by the "Illumina Genome Analyzer Software // License Agreement" and the "Illumina Source Code License Agreement", // and certain third party copyright/licenses, and any user of this // source file is bound by the terms therein (see accompanying files // Illumina_Genome_Analyzer_Software_License_Agreement.pdf and // Illumina_Source_Code_License_Agreement.pdf and third party // copyright/license notices). // // /// \file /// \author Ivan Mikoulitch /// #ifndef __STRINGSPLITTERJET_H #define __STRINGSPLITTERJET_H #include "SamMD/stdafx.h" class StringSplitterJet { public: StringSplitterJet(char*, char separator='\t'); /* inline string GetString(int start_index) { int start = indexes_[start_index-1]+1; string str(&buffer_[start]); return str; } */ inline char* GetString(int start_index) { int start = indexes_[start_index-1]+1; return &buffer_[start]; } inline int GetNumElements() { return num_elements; } private: char separator_; char* buffer_; int indexes_[32]; int num_elements; void ProcessString(); }; #endif