Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   Related Pages  

rdIO.h

00001 // rdIO.h
00002 //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
00003 // Copyright 2000 Realistic Dynamics, Inc.
00004 // All rights reserved.
00005 //
00006 // Please do not read, copy, distribute, or use without permission.
00007 // Contact: Frank C. Anderson, fca@RealisticDynamics.com
00008 //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
00009 #ifndef __rdIO_h__
00010 #define __rdIO_h__
00011 
00012 
00013 // INCLUDES
00014 #include "rdTools.h"
00015 
00016 
00017 // DEFINES
00018 const int rdIO_STRLEN = 2048;
00019 const int rdIO_STRING_INCREMENT = 2048;
00020 
00021 
00022 //=============================================================================
00023 //=============================================================================
00030 class RDTOOLS_API rdIO {
00031 
00032 //=============================================================================
00033 // DATA
00034 //=============================================================================
00035 public:
00037    static const int STRLEN;
00039    static const int STRING_INCREMENT;
00040 
00041 private:
00042    // NUMBER OUTPUT
00044    static bool _Scientific;
00046    static int _Pad;
00048    static int _Precision;
00050    static char _DoubleFormat[256];
00051 
00052 
00053 //=============================================================================
00054 // METHODS
00055 //=============================================================================
00056 public:
00057    // NUMBER OUTPUT FORMAT
00058    static void SetScientific(bool aTrueFalse);
00059    static bool GetScientific();
00060    static void SetDigitsPad(int aPad);
00061    static int GetDigitsPad();
00062    static void SetPrecision(int aPlaces);
00063    static int GetPrecision();
00064    static const char*
00065       GetDoubleOutputFormat();
00066 private:
00067    static void ConstructDoubleOutputFormat();
00068 
00069 public:
00070    // READ
00071    static char* ReadToTokenLine(FILE *aFP,const char *aToken);
00072    static char* ReadLine(FILE *aFP);
00073    static int ComputeLineLength(FILE *aFP);
00074    static int ComputeNumberOfSteps(double aTI,double aTF,double aDT);
00075    static char* ReadCharacters(FILE *aFP,int aNChar);
00076    static FILE* OpenFile(const char *aFileName,const char *aMode);
00077 
00078 //=============================================================================
00079 }; // END CLASS rdIO
00080 //=============================================================================
00081 //=============================================================================
00082 
00083 #endif // __rdIO_h__

Generated on Wed Aug 20 02:17:06 2003 for Simulation Software by doxygen1.3