VR-Exchange 2.4 API Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
brokers/rprBroker/rprBroker/csvFileEntry.h
Go to the documentation of this file.
1 /*****************************************************************************
2  * Copyright (c) 2013 VT MAK
3  * All rights reserved.
4  ****************************************************************************/
5 
9 
10 #pragma once
11 
12 #include <rprBroker/dllExport.h>
13 #include <vl/hostStructs.h>
14 #include <vlutil/vlList.h>
15 
16 class DtCsvFileEntry;
17 
18 typedef DtCsvFileEntry* (*DtCsvFileEntryCreatorFcn)();
19 
20 // class DtCsvFileEntry:
21 //
22 // Is a generic class. It represents the entries that are parsed out of a csv file by the csv
23 // file reader. Children classes will derive their own entrie from this that their own derived readers
24 // know how to parse
25 
27 {
28 public:
29 
30  static DtCsvFileEntry* creator();
31 
32  // constructor
33  DtCsvFileEntry( const DtString & name );
34 
35  // copy constructor
36  DtCsvFileEntry( const DtCsvFileEntry& orig );
37 
38  // destructor
39  virtual ~DtCsvFileEntry();
40 
41  // assignment operator
42  DtCsvFileEntry& operator = ( const DtCsvFileEntry& orig );
43 
44  // Clone entry
45  virtual DtCsvFileEntry* clone();
46 
47  // operator[]
48  // For the default implementation, return
49  // a field in the list of fields.
50  // Returns DtString::nullString() for
51  // indices that are out of range
52  virtual DtString& operator[](int idx);
53 
54  virtual const DtString& operator[](int idx) const;
55 
56  // parseFrom
57  // A generic tokenizer that busts up the line
58  // into string fields and stores them into
59  // the myFields member.
60  virtual void parseFrom(const DtString& sLine);
61 
62  //Entry's name
63  virtual const DtString & name() const;
64 
65  // emptyList()
66  // For the default implementation, delete
67  // the string fields in the member list.
68  virtual void emptyList();
69 
70  // length()
71  // For the default implementation,
72  // return the number of fields available.
73  virtual int length() const;
74 
75 protected:
76 
77  // default constructor
79 
80 protected:
81 
82  DtString myName;
83  DtList myFields;
84 
85 };

Document ID: Generated on Thu Jul 23 10:25:22 EDT 2015 from SVN revision 155065
Copyright © 2005-2014 VT MÄK. All Rights Reserved (www.mak.com)