VR-Link API Documentation for HLA 1.3
mtlstream.h
Go to the documentation of this file.
00001 /*********************************************************************
00002 ** Copyright (c) 1992-2010 VT MAK
00003 ** All rights reserved.
00004 *********************************************************************/
00005 
00006 #ifndef mtlstream_H_
00007 #define mtlstream_H_
00008 
00012 
00013 #include <stdio.h>
00014 
00015 #ifdef DtUSE_UTILITIES_NAMESPACE
00016 namespace DtUSE_UTILITIES_NAMESPACE
00017 {
00018 #endif
00019 
00020 
00023 class DT_DLL_MTL DtlInputStream
00024 {
00025   public:
00026     DtlInputStream();
00027     virtual ~DtlInputStream() {} 
00028 
00029     virtual int peekc(void) = 0;
00030     virtual int ungetc(int c) = 0;
00031     virtual int fgetc(void) = 0;
00032     virtual int fgetc_past_whitespace(void) = 0;
00033     virtual int flush_until(char terminator) = 0;
00034 
00035     virtual int lineCount() { return lines;};
00036     virtual void incLineCount() { lines++;};
00037   protected:
00038     int lines;
00039 };
00040 
00043 class DT_DLL_MTL DtlFileInputStream : public DtlInputStream
00044 {
00045   public:
00046 
00049     DtlFileInputStream(FILE *);
00050     virtual ~DtlFileInputStream();
00051 
00052     int peekc(void);
00053     int ungetc(int c);
00054     int fgetc(void);
00055     int fgetc_past_whitespace(void);
00056     int flush_until(char terminator);
00057 
00058   private:
00059     FILE *fp;
00060 };
00061 
00064 class DT_DLL_MTL DtlStringInputStream : public DtlInputStream
00065 {
00066   public:
00067     DtlStringInputStream(char*);
00068     virtual ~DtlStringInputStream();
00069 
00070     int peekc(void);
00071     int ungetc(int c);
00072     int fgetc(void);
00073     int fgetc_past_whitespace(void);
00074     int flush_until(char terminator);
00075 
00076   private:
00077     char* input_string;
00078     int index;
00079 };
00080 
00081 #ifdef DtUSE_UTILITIES_NAMESPACE
00082 } 
00083 #endif
00084 
00085 #endif
00086 

Document ID: Generated on Mon May 14 08:06:18 EDT 2012 from SVN revision 114750
Copyright © 2005-2012 VT MÄK Inc. All Rights Reserved (www.mak.com)