VR-Forces 4.10 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
cSVReaderWriter.h
Go to the documentation of this file.
1 /*******************************************************************************
2 ** Copyright (c) 2007 MAK Technologies, Inc.
3 ** All rights reserved.
4 *******************************************************************************/
5 /*******************************************************************************
6 ** $RCSfile: csvReaderWriter.h,v $ $Revision: 1.4 $ $State: Exp $
7 ** Created: 4/4/07 MEM
8 *******************************************************************************/
9 
12 
20 
21 #ifndef DtCSVReaderWriter_H_
22 #define DtCSVReaderWriter_H_
23 
24 #include "stdio.h"
25 #include <vlutil/vlString.h>
30 #include <vlutil/vlMachineTypes.h>
32 #include <vlutil/vlFilename.h>
33 #include <list>
34 
35 #include "vrfutil/vrfutilDefines.h"
37 {
38 public:
39 
40 
43 
48  parentRegistry = NULL, bool readonly = false);
50  parentRegistry = NULL, bool readonly = false);
51 
53  DtCSVReaderWriter(const DtString& name, const DtCSVReaderWriter& orig,
54  DtReaderWriterRegistry* parentRegistry = NULL);
55  DtCSVReaderWriter(const DtSymbolString& name, const DtCSVReaderWriter& orig,
56  DtReaderWriterRegistry* parentRegistry = NULL);
57 
59  const DtCSVReaderWriter& operator=(const DtCSVReaderWriter& orig);
60 
62  virtual ~DtCSVReaderWriter();
63 
68  virtual void putSelf(std::string& fp, int indentLevel = 0,
69  bool writeUnspecified = false, const DtFilename& path =
70  DtFilename::nullFilename());
71 
75  virtual void getSelf( FILE* fp);
76 
79  virtual void writeSelf(std::string& fp, int indentLevel = 0,
80  bool writeUnspecified = false,
81  const DtFilename& path = DtFilename::nullFilename());
82 
86  virtual const char* readerWriterType() const;
87 
89  typedef std::vector<std::string> DtCSVLineEntry;
90 
91 protected:
92 
94  virtual void putData(std::string& fp, int indentLevel = 0);
95  virtual bool getData(FILE* fp);
96 
97  //Not virtual, simple reads in a line of a csv file for parsing
98  bool readLine(FILE * fp, DtString& line );
99 
100 };
101 
102 
103 
104 #endif
virtual const char * readerWriterType() const
Used to supply a string type that this reader writer type is.
Definition: symbolString.h:20
File: csvReaderWriter.h.
Definition: cSVReaderWriter.h:36
virtual DtlObjPtr getData(DtlObjPtr args, const SearchPaths &searchPaths, const DtVariableBindingsList &variableBindings)
Definition: readerWriter.h:85
Definition: readerWriterRegistry.h:39
virtual void writeSelf(std::string &fp, int indentLevel=0, bool writeUnspecified=false, const DtFilename &path=DtFilename::nullFilename())
Called from putSelf, calls myRegistry.putSelf which in turn calls putSelf on each reader/writer in th...
std::vector< std::string > DtCSVLineEntry
Stores a parsed csv line.
Definition: cSVReaderWriter.h:89
virtual void getSelf(DtlObjPtr args, const DtReaderWriter::SearchPaths &searchPaths=SearchPaths(), const DtVariableBindingsList &variableBindings=nullVariableReference())
Top level to read itself from an input stream.
virtual void putSelf(std::string &fp, int indentLevel=0, bool writeUnspecified=false, const DtFilename &path=DtFilename::nullFilename())
Top level call to write itself to file.
virtual void putData(std::string &fp, int indentLevel=0)
Deriving class overrides these to get/put class specific data.
#define DT_DLL_vrfutil
This file is used to determine how to build Disable inconsistent dll linkage warning Visual Studio 6...
Definition: vrfutilDefines.h:34
const DtReaderWriter & operator=(const DtReaderWriter &orig)
assignment operator

Document ID: Generated on Tue Sep 21 17:42:52 EDT 2021 from SVN revision 234861
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)