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

class DtMtlParameterDbWriter:

Instances of DtMtlParameterDbWriter are used to save DtMtlParameterDb parameter database objects to file in MTL format (DtReaderWriter) format.

Public Member Functions

 DtMtlParameterDbWriter ()
 
virtual ~DtMtlParameterDbWriter ()
 
virtual bool write (DtMtlParameterDb *parameterDb, const DtFilename &opdFilename, const DtFilename &opeDirectory=DtFilename::nullFilename())
 
virtual DtFilename generateFilename (const DtString &rdrWriterName, const DtObjectType &objectType) const
 
virtual bool writeParameterFile (const DtFilename &parameterFilename, DtVrfObjectParameters *parameters) const
 

Static Public Member Functions

static void prePutSelfCb (DtReaderWriter *readerWriterObject, std::string &fp, void *userData)
 

Protected Member Functions

virtual DtMtlParameterDbFileDatacreateParameterDbFileData ()
 
virtual bool writeTopLevelParameterDbFile (const DtMtlParameterDbFileData &parameterFileData, const DtFilename &parameterDbFile) const
 
virtual void processPrePutSelfCb (DtReaderWriter *readerWriterObject, std::string &fp)
 
virtual DtFilename getPath (const DtFilename &newFormatParamDbFile)
 
virtual void writeEntry (DtMtlParameterDbFileData *parameterDb, DtMtlParameterDbEntry *paramDbEntry, const DtFilename &parameterDbFile, const DtFilename &opeDirectory)
 
virtual void preWrite (const DtMtlParameterDbFileData &, const DtFilename &, std::string &) const
 
virtual void postWrite (const DtMtlParameterDbFileData &, const DtFilename &, std::string &) const
 
virtual DtFilename generateOpeDirectory (const DtFilename &parameterDbFile, const DtFilename &opeDirectory)
 

Protected Attributes

DtFilename myOpeDirectory
 

Private Member Functions

 DtMtlParameterDbWriter (const DtMtlParameterDbWriter &orig)
 
DtMtlParameterDbWriteroperator= (const DtMtlParameterDbWriter &orig)
 

Constructor & Destructor Documentation

DtMtlParameterDbWriter::DtMtlParameterDbWriter ( )

default constructor

virtual DtMtlParameterDbWriter::~DtMtlParameterDbWriter ( )
virtual

destructor

DtMtlParameterDbWriter::DtMtlParameterDbWriter ( const DtMtlParameterDbWriter orig)
private

copy constructor - not implemented

Member Function Documentation

virtual bool DtMtlParameterDbWriter::write ( DtMtlParameterDb parameterDb,
const DtFilename &  opdFilename,
const DtFilename &  opeDirectory = DtFilename::nullFilename() 
)
virtual

Write MTL format parameter database to given opdFilename. If opdFilename does not have a .opd extension, it adds the extension. opeDirectory is a directory to write individual parameter entry files (*.ope). If no directory is specified, creates a directory with the same path as the opdFilename, and with the same name as the opdFilename, minus the .opd extensions.

static void DtMtlParameterDbWriter::prePutSelfCb ( DtReaderWriter readerWriterObject,
std::string &  fp,
void *  userData 
)
static

Callback invoked before DtReaderWriter::putSelf() is called. Uses DtReaderWriterCommentMap to look up comments associated with DtReaderWriter object. If one exists, writes out comment to file. (Comment assoicated with symbol will appear immediately before it in the file.)

virtual DtFilename DtMtlParameterDbWriter::generateFilename ( const DtString rdrWriterName,
const DtObjectType objectType 
) const
virtual

Generates an object parameter entry file (*.ope) filename from a string and an object type (used to auto-generate filenames when converting existing single file format parameter databases).

virtual bool DtMtlParameterDbWriter::writeParameterFile ( const DtFilename &  parameterFilename,
DtVrfObjectParameters parameters 
) const
virtual

Writes object parameter entry file.

virtual DtMtlParameterDbFileData* DtMtlParameterDbWriter::createParameterDbFileData ( )
protectedvirtual

Factory method that creates a the DtReaderWriter data object written to the parameter database file in write().

virtual bool DtMtlParameterDbWriter::writeTopLevelParameterDbFile ( const DtMtlParameterDbFileData parameterFileData,
const DtFilename &  parameterDbFile 
) const
protectedvirtual

Writes the top level parameter database object (the DtReaderWriter contents of the parameter database file).

virtual void DtMtlParameterDbWriter::processPrePutSelfCb ( DtReaderWriter readerWriterObject,
std::string &  fp 
)
protectedvirtual
virtual DtFilename DtMtlParameterDbWriter::getPath ( const DtFilename &  newFormatParamDbFile)
protectedvirtual

Utility function for obtaining path from a filename.

virtual void DtMtlParameterDbWriter::writeEntry ( DtMtlParameterDbFileData parameterDb,
DtMtlParameterDbEntry paramDbEntry,
const DtFilename &  parameterDbFile,
const DtFilename &  opeDirectory 
)
protectedvirtual

Writes out a single parameter entry and returns the entry in the parameterDbFile data structure added.

virtual void DtMtlParameterDbWriter::preWrite ( const DtMtlParameterDbFileData ,
const DtFilename &  ,
std::string &   
) const
protectedvirtual

Called immediately before writing the main body of the file (from writeTopLevelParameterDb() call)

virtual void DtMtlParameterDbWriter::postWrite ( const DtMtlParameterDbFileData ,
const DtFilename &  ,
std::string &   
) const
protectedvirtual

Called immediately after writing the main body of the file (from writeTopLevelParameterDb() call)

virtual DtFilename DtMtlParameterDbWriter::generateOpeDirectory ( const DtFilename &  parameterDbFile,
const DtFilename &  opeDirectory 
)
protectedvirtual

Returns an ope directory combined of the two supplied directories.

DtMtlParameterDbWriter& DtMtlParameterDbWriter::operator= ( const DtMtlParameterDbWriter orig)
private

assignment operator - not implemented

Member Data Documentation

DtFilename DtMtlParameterDbWriter::myOpeDirectory
protected

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

Document ID: Generated on Mon Jun 20 00:38:30 EDT 2022 from SVN revision 244029
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)