BioInt
1.02.00
BioInt: An integrative biological object-oriented application framework and interpreter
|
00001 /**************************************************************************** 00002 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 00003 The BioBhasha : The Biologist's Programming Language 00004 Version 1.0 (19th December 2001) 00005 Prasad, B.V.L.S. 00006 Contact: burrashiva@yahoo.com 00007 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 00008 *****************************************************************************/ 00009 #ifndef BIOHELPERCLASS_H 00010 #define BIOHELPERCLASS_H 00011 00012 using namespace std; 00013 00014 #include <string> 00015 00016 /***************************************************************************** 00017 * 00018 * COMMENTARY on Each Class/Concept: Hows and Whys: 00019 * 00020 * BioHelperClass: 00021 * This is one of the Most Extensively used Class. This forms the 00022 * BackBone of all the File Format Parsers. With out Conceptualizing 00023 * this Class, BioBhasha would not have come to this stage. The logic 00024 * is very much same as the String Class of Java. But, This Logic 00025 * was extended by My friend, K.VamsiMohan, HP.india.com. I am thankful 00026 * for the help and in many many discussions. 00027 * Basically, it reads in a string, and can convert the portion of the string into 00028 * double(floating) numbers or Long(integer) numbers or Strings. 00029 * The Functions expect: 00030 * a) 1st Argument: the String to be Parsed 00031 * b) 2nd Argument: From where Parsing should start 00032 * c) 3rd Argument: Where parsing should stop. 00033 * Depending on the return type, it returns the required pattern. 00034 * ****************************************************************************/ 00035 00036 class BioHelperClass { 00037 00038 public: 00039 00040 // the functions are static to avoid multiple instances. 00041 // The function names are self-explanatory, I believe. 00042 static float readFloat(const string& str,const int& startingPosition,const int& endingPosition); 00043 00044 static long readLong(const string& str,const int& startingPosition,const int& endingPosition); 00045 00046 static string readString(const string& str,const int& startingPosition,const int& endingPosition); 00047 //Added on 10.12.2012 00048 static string readString(const string& str, const int& startingPosition); 00049 00050 }; 00051 00052 00053 #endif