VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Types | Public Member Functions | Protected Member Functions
DtCSVReaderWriter Class Reference

File: csvReaderWriter.h.

Class: DtCSVReaderWriter

Description:

Inheritance diagram for DtCSVReaderWriter:
Inheritance graph
[legend]

Public Types

typedef std::vector< std::string > DtCSVLineEntry
 
- Public Types inherited from DtReaderWriter
typedef std::vector
< DtSymbolString
aliasContainer
 
typedef std::vector
< DtSymbolString >::iterator 
aliasIter
 
typedef std::vector
< DtSymbolString >
::const_iterator 
aliasConstIter
 
typedef std::vector< DtFilename > SearchPaths
 
typedef std::pair
< DtSymbolString, DtString
DtVariableNameType
 
typedef DtReaderWriterFactory *(* DtReaderWriterFactoryCreatorFcn )()
 

Public Member Functions

 DtCSVReaderWriter ()
 
 DtCSVReaderWriter (const DtString &name, DtReaderWriterRegistry *parentRegistry=NULL, bool readonly=false)
 
 DtCSVReaderWriter (const DtSymbolString &name, DtReaderWriterRegistry *parentRegistry=NULL, bool readonly=false)
 
 DtCSVReaderWriter (const DtString &name, const DtCSVReaderWriter &orig, DtReaderWriterRegistry *parentRegistry=NULL)
 
 DtCSVReaderWriter (const DtSymbolString &name, const DtCSVReaderWriter &orig, DtReaderWriterRegistry *parentRegistry=NULL)
 
const DtCSVReaderWriteroperator= (const DtCSVReaderWriter &orig)
 
virtual ~DtCSVReaderWriter ()
 
virtual void putSelf (std::string &fp, int indentLevel=0, bool writeUnspecified=false, const DtFilename &path=DtFilename::nullFilename())
 
virtual void getSelf (FILE *fp)
 
virtual void writeSelf (std::string &fp, int indentLevel=0, bool writeUnspecified=false, const DtFilename &path=DtFilename::nullFilename())
 
virtual const charreaderWriterType () const
 
- Public Member Functions inherited from DtReaderWriter
 DtReaderWriter ()
 
 DtReaderWriter (const DtString &name, DtReaderWriterRegistry *parentRegistry=NULL, bool readonly=false)
 
 DtReaderWriter (const DtSymbolString &name, DtReaderWriterRegistry *parentRegistry=NULL, bool readonly=false)
 
 DtReaderWriter (const DtString &name, const DtReaderWriter &orig, DtReaderWriterRegistry *parentRegistry=NULL)
 
 DtReaderWriter (const DtSymbolString &name, const DtReaderWriter &orig, DtReaderWriterRegistry *parentRegistry=NULL)
 
 DtReaderWriter (const DtReaderWriter &, DtReaderWriterRegistry *parentRegistry=NULL)
 
const DtReaderWriteroperator= (const DtReaderWriter &orig)
 
bool operator== (const DtReaderWriter &) const
 
bool operator!= (const DtReaderWriter &rhs)
 
virtual ~DtReaderWriter ()
 
virtual void postPutSelf ()
 
virtual void prePutSelf ()
 
virtual void getSelf (DtlObjPtr args, const DtReaderWriter::SearchPaths &searchPaths=SearchPaths(), const DtVariableBindingsList &variableBindings=nullVariableReference())
 
virtual void postGetSelf ()
 
virtual void preGetSelf ()
 
virtual DtSymbolString name () const
 
virtual void addAlias (const DtSymbolString &alias)
 
virtual void addAlias (const DtString &alias)
 
virtual bool hasAlias (const DtSymbolString &alias)
 
virtual const aliasContaineraliases () const
 
virtual void setReadonly (bool flag)
 
bool isReadonly () const
 
virtual void reset ()
 
virtual int alignment () const
 
virtual bool variableIsBound () const
 
virtual void unbindVariable ()
 
virtual void setName (const DtString &)
 
virtual const charxmlType () const
 
virtual DtString prettyPrint () const
 
std::string debugText () const
 
virtual void bindVariables (DtVariableBindingsList variableBindings)
 
virtual std::list
< DtVariableNameType
unboundVariables () const
 
bool invalid () const
 
virtual bool hasChild (const DtReaderWriter *p) const
 
virtual bool hasVariableReference () const
 
virtual void bindLocalVariables (const DtVariableBindingsList &variableBindings)
 
virtual void recordUpdateTime () const
 
virtual bool changedSinceLastChecked ()
 
virtual bool peekChangedSinceLastChecked () const
 
virtual DtlObjPtr getData (DtlObjPtr args, const SearchPaths &searchPaths, const DtVariableBindingsList &variableBindings)
 
virtual void setValueSpecified (bool specified, bool recurse=false)
 
virtual bool valueSpecified () const
 
virtual bool isVariableReference () const
 
virtual void setIsVariableReference (bool value)
 
virtual void clearAllVariableReferenceFlags ()
 
virtual DtSymbolString variableName () const
 
virtual void setVariableName (const DtSymbolString variableName)
 
virtual const DtReaderWriterdefaultRWValue () const
 
virtual DtReaderWriterdefaultRWValue ()
 
virtual void setDefaultRWValue (DtReaderWriter *)
 
virtual bool checkAndSetDefaultRWValue (DtlObjPtr args, const DtReaderWriter::SearchPaths &searchPaths=SearchPaths(), const DtVariableBindingsList &variableBindings=nullVariableReference())
 
const DtReaderWriterRegistryregistry () const
 
DtReaderWriterRegistryregistry ()
 
virtual DtPropertyInterfaceproperty ()
 
virtual const DtPropertyInterfaceproperty () const
 
virtual DtString toXml () const
 
virtual DtRwVariableBindingsgenerateVariableBindings () const
 
virtual bool toXml (const DtFilename &) const
 
virtual bool fromXml (const DtString &)
 
virtual bool fromXmlFile (const DtFilename &)
 
virtual void putSelf (DtEnvironmentSP, DtEnvValueSP parent) const
 
virtual void putData (DtEnvironmentSP, DtEnvValueSP value) const
 
virtual void putVariableReference (DtEnvironmentSP, DtEnvValueSP value) const
 
virtual void getSelf (const DtEnvironmentSP, const DtEnvValueSP root, const SearchPaths &searchPaths=SearchPaths(), const DtVariableBindingsList &bindings=DtVariableBindingsList())
 
virtual void getData (const DtEnvironmentSP, const DtEnvValueSP, const SearchPaths &searchPaths=SearchPaths(), const DtVariableBindingsList &bindings=DtVariableBindingsList())
 
virtual void unrecognizedItem (const DtEnvironmentSP env, const DtEnvValueSP root, const SearchPaths &searchPaths, const DtVariableBindingsList &varBindings)
 
virtual void getVariableReference (DtEnvironmentSP, DtEnvValueSP value)
 

Protected Member Functions

virtual void putData (std::string &fp, int indentLevel=0)
 
virtual bool getData (FILE *fp)
 
bool readLine (FILE *fp, DtString &line)
 
- Protected Member Functions inherited from DtReaderWriter
virtual void bindToRwAsVariable (const DtReaderWriter *rw)
 

Additional Inherited Members

- Static Public Member Functions inherited from DtReaderWriter
static void putIndent (std::string &fp, int indentLevel)
 
static const
DtVariableBindingsList
nullVariableReference ()
 
static void setPostGetSelfCallback (DtGetSelfCallbackFcn fcn, void *usrData)
 
static void setPrePutSelfCallback (DtPutSelfCallbackFcn fcn, void *usrData)
 
static void setPutIndent (bool)
 
static bool putIndent ()
 
static const chartheXmlType ()
 
static const DtFilename & appPath ()
 
static void setFactoryCreatorFunction (DtReaderWriterFactoryCreatorFcn fcn)
 
static void createReaderWriterFactory ()
 
static void cleanupFactory ()
 
static DtReaderWriterFactoryfactory ()
 
static void setOutputStream (DtOutputStream *stream)
 
static DtOutputStream & outputStream ()
 
static DtReaderWritercreateFromXmlFile (const DtFilename &, bool createAsProperty=false)
 
static DtReaderWritercreateFromXml (const DtString &, bool createAsProperty=false)
 
static DtReaderWritercreateFromEnvironment (DtEnvironmentSP, bool createAsProperty=false)
 
static DtString getAttribute (DtEnvironmentSP env, const DtString &name, DtEnvValueSP root)
 
- Protected Attributes inherited from DtReaderWriter
const DtSymbolString myName
 
DtReaderWriterRegistry myRegistry
 
DtReaderWriterRegistrymyParentRegistry
 
bool myValueSpecified
 
bool myReadOnlyFlag
 
bool myIsVariableReference
 
DtSymbolString myVariableName
 
bool myVariableIsBound
 
DtReaderWritermyDefaultValue
 
aliasContainer myAliases
 
bool myInvalid
 
bool myChangedFlag
 
- Static Protected Attributes inherited from DtReaderWriter
static DtString theUnspecifiedValue
 
static DtGetSelfCallbackInfo thePostGetSelfCallback
 
static DtPutSelfCallbackInfo thePrePutSelfCallback
 
static const DtVariableBindingsList theEmptyVariableBindingsList
 
static bool theCreatorFcnSet
 
static DtReaderWriterFactorytheFactory
 
static
DtReaderWriterFactoryCreatorFcn 
theFactoryCreatorFcn
 
static bool thePutIndent
 
static DtOutputStream * theOutputStream
 

Member Typedef Documentation

typedef std::vector<std::string> DtCSVReaderWriter::DtCSVLineEntry

Stores a parsed csv line.

Constructor & Destructor Documentation

DtCSVReaderWriter::DtCSVReaderWriter ( )

default constructor

DtCSVReaderWriter::DtCSVReaderWriter ( const DtString name,
DtReaderWriterRegistry parentRegistry = NULL,
bool  readonly = false 
)

real constructor Setting the readonly flag prevents object from writing itself to the stream. By default, DtReaderWriter objects are read/write.

DtCSVReaderWriter::DtCSVReaderWriter ( const DtSymbolString name,
DtReaderWriterRegistry parentRegistry = NULL,
bool  readonly = false 
)
DtCSVReaderWriter::DtCSVReaderWriter ( const DtString name,
const DtCSVReaderWriter orig,
DtReaderWriterRegistry parentRegistry = NULL 
)

copy constructor

DtCSVReaderWriter::DtCSVReaderWriter ( const DtSymbolString name,
const DtCSVReaderWriter orig,
DtReaderWriterRegistry parentRegistry = NULL 
)
virtual DtCSVReaderWriter::~DtCSVReaderWriter ( )
virtual

destructor

Member Function Documentation

const DtCSVReaderWriter& DtCSVReaderWriter::operator= ( const DtCSVReaderWriter orig)

assignment operator

virtual void DtCSVReaderWriter::putSelf ( std::string &  fp,
int  indentLevel = 0,
bool  writeUnspecified = false,
const DtFilename &  path = DtFilename::nullFilename() 
)
virtual

Top level call to write itself to file. If write unspecified is true, will write entries that are unspecified. Path is passed down to all DtCSVReaderWriter members in its DtCSVReaderWriterRegistry (collection of child DtCSVReaderWriter nodes).

Reimplemented from DtReaderWriter.

Reimplemented in DtCombatIdentificationLevelTable.

virtual void DtCSVReaderWriter::getSelf ( FILE *  fp)
virtual

Top level to read itself from an input stream. searchPath is passed down to all DtCSVReaderWriter members in its DtCSVReaderWriterRegistry (collection of child DtCSVReaderWriter nodes).

virtual void DtCSVReaderWriter::writeSelf ( std::string &  fp,
int  indentLevel = 0,
bool  writeUnspecified = false,
const DtFilename &  path = DtFilename::nullFilename() 
)
virtual

Called from putSelf to write out individual data items.

Reimplemented from DtReaderWriter.

virtual const char* DtCSVReaderWriter::readerWriterType ( ) const
virtual

Used to supply a string type that this reader writer type is. This can be used in place of dynamic-casting. Also used by the opd editor to determine which type of control to create.

Reimplemented from DtReaderWriter.

Reimplemented in DtCombatIdentificationLevelTable, DtCombatIdentificationLevelTableEntry, and DtCombatIdentificationDetectionIntervalEntry.

virtual void DtCSVReaderWriter::putData ( std::string &  fp,
int  indentLevel = 0 
)
protectedvirtual

Deriving class overrides these to get/put class specific data.

Reimplemented from DtReaderWriter.

virtual bool DtCSVReaderWriter::getData ( FILE *  fp)
protectedvirtual
bool DtCSVReaderWriter::readLine ( FILE *  fp,
DtString line 
)
protected

The documentation for this class was generated from the following file:

Document ID: Generated on Wed Mar 27 22:49:11 EDT 2024 from SVN revision 264633
Copyright © 2005-2024 MAK Technologies. All Rights Reserved (www.mak.com)