1. /* sstr.h by K.Tsuru */
  2. // file ID = 60
  3. #ifndef STRING_NUMBER_H
  4. #define STRING_NUMBER_H
  5. /********************
  6. StringToNumber class
  7. *********************/
  8. class StringToNumber : public SNumber {
  9. char *intPart; //integer part
  10. uint intLen;
  11. char *decPart; //decimal part
  12. uint decLen;
  13. char *expPart;
  14. uint expLen;
  15. int snRdxExp; //exponent
  16. int snSign; //sign
  17. void GetDigit(const char* s);//eliminate iregal character and get "xxxPart" 601
  18. void Analyze(); //602
  19. StringToNumber(); // cannot use
  20. StringToNumber(const StringToNumber& sn); // cannot use
  21. StringToNumber& operator=(const StringToNumber& sn);// has no body.
  22. public:
  23. //It can use Sign(), Head() etc. of SNumber class.
  24. int RdxExp() const { return snRdxExp; }//not inclued in SNumber class
  25. StringToNumber(const char *s)
  26. : SNumber(UNKNOWN), intPart(NULL), intLen(0), decPart(NULL),
  27. decLen(0), expPart(NULL), expLen(0), snRdxExp(0), snSign(UNDECIDED){
  28. GetDigit(s); Analyze();
  29. }
  30. ~StringToNumber(); // 603
  31. };
  32. #endif // STRING_NUMBER_H

sstr.h : last modifiled at 2016/09/04 14:21:36(1,074 bytes)
created at 2016/04/11 11:18:59
The creation time of this html file is 2017/10/11 16:07:52 (Wed Oct 11 16:07:52 2017).