VR-Exchange 2.2 API Documentation
Home
Modules
Namespaces
Classes
Files
Examples
Libraries
File List
File Members
include
broker
include/broker/csvFileEntry.h
Go to the documentation of this file.
1
/*********************************************************************
2
** Copyright (c) 1992-2010 VT MAK
3
** All rights reserved.
4
*********************************************************************/
5
#pragma once
6
7
#include <vl/hostStructs.h>
8
#include <vlutil/vlList.h>
9
#include <namespace.h>
10
11
class
DtCsvFileEntry
;
12
13
typedef
DtCsvFileEntry
* (*DtCsvFileEntryCreatorFcn)();
14
15
// class DtCsvFileEntry:
16
//
17
// Is a generic class. It represents the entries that are parsed out of a csv file by the csv
18
// file reader. Children classes will derive their own entrie from this that their own derived readers
19
// know how to parse
20
21
class
DT_DLL_BROKER
DtCsvFileEntry
22
{
23
// constructors
24
public
:
25
26
// constructor
27
DtCsvFileEntry
(
const
DtString
& name);
28
29
// destructor
30
virtual
~
DtCsvFileEntry
();
31
32
// copy constructor
33
DtCsvFileEntry
(
const
DtCsvFileEntry
& orig);
34
35
// operators
36
public
:
37
// Clone entry
38
virtual
DtCsvFileEntry
* clone();
39
40
// assignment operator
41
DtCsvFileEntry
& operator=(
const
DtCsvFileEntry
& orig);
42
43
// accessors & mutators
44
public
:
45
// emptyList()
46
// For the default implementation, delete
47
// the string fields in the member list.
48
virtual
void
emptyList();
49
50
// length()
51
// For the default implementation,
52
// return the number of fields available.
53
virtual
int
length()
const
;
54
55
//Entry's name
56
virtual
const
DtString
& name()
const
;
57
58
// operator[]
59
// For the default implementation, return
60
// a field in the list of fields.
61
// Returns DtString::nullString() for
62
// indices that are out of range
63
virtual
DtString
& operator[](
int
idx);
64
65
virtual
const
DtString
& operator[](
int
idx)
const
;
66
67
// parseFrom
68
// A generic tokenizer that busts up the line
69
// into string fields and stores them into
70
// the myFields member.
71
virtual
void
parseFrom(
const
DtString
& sLine);
72
73
// static creator
74
public
:
75
76
static
DtCsvFileEntry
* creator();
77
78
protected
:
79
80
// default constructor
81
DtCsvFileEntry
();
82
83
protected
:
84
DtString
myName
;
85
DtList
myFields
;
86
87
};
88
Document ID: Generated on Mon Apr 15 17:15:50 EDT 2013 from SVN revision 126154
Copyright © 2005-2012 VT MÄK. All Rights Reserved (
www.mak.com
)