LibGLShader::FileSynchronizer Class Reference

#include <FileSynchronizer.h>

Inheritance diagram for LibGLShader::FileSynchronizer:

LibGLShader::ShaderObject LibGLShader::ShaderObject

List of all members.

Public Member Functions

 FileSynchronizer (const std::string &fileName, bool isFileCleanNow=false)
FileSynchronizeroperator= (const FileSynchronizer &rhs)
virtual bool isDirty (bool updateTimestamp=false, bool *outSuccess=NULL)
 Polls the OS for whether or not the underlying file's last modified timestamp or filesize has changed since the last time isDirty was called with updateTimestamp set to true.
bool setClean (bool *outSuccess=NULL)
 Updates the internal cache of file attributes, in effect setting the underlying file to be 'clean'.
std::string getFileName () const
virtual std::string getShaderObjectTypeString () const
 FileSynchronizer (const std::string &fileName, bool isFileCleanNow=false)
FileSynchronizeroperator= (const FileSynchronizer &rhs)
virtual bool isDirty (bool updateTimestamp=false, bool *outSuccess=NULL)
 Polls the OS for whether or not the underlying file's last modified timestamp or filesize has changed since the last time isDirty was called with updateTimestamp set to true.
bool setClean (bool *outSuccess=NULL)
 Updates the internal cache of file attributes, in effect setting the underlying file to be 'clean'.
std::string getFileName () const
virtual std::string getShaderObjectTypeString () const

Protected Member Functions

 FileSynchronizer (const FileSynchronizer &copy)
 FileSynchronizer (const FileSynchronizer &copy)

Protected Attributes

std::string m_fileName
time_t m_lastModified
off_t m_lastKnownSize


Constructor & Destructor Documentation

LibGLShader::FileSynchronizer::FileSynchronizer ( const std::string &  fileName,
bool  isFileCleanNow = false 
) [inline]

LibGLShader::FileSynchronizer::FileSynchronizer ( const FileSynchronizer copy  )  [inline, protected]

LibGLShader::FileSynchronizer::FileSynchronizer ( const std::string &  fileName,
bool  isFileCleanNow = false 
) [inline]

LibGLShader::FileSynchronizer::FileSynchronizer ( const FileSynchronizer copy  )  [inline, protected]


Member Function Documentation

FileSynchronizer& LibGLShader::FileSynchronizer::operator= ( const FileSynchronizer rhs  )  [inline]

bool LibGLShader::FileSynchronizer::isDirty ( bool  updateTimestamp = false,
bool *  outSuccess = NULL 
) [virtual]

Polls the OS for whether or not the underlying file's last modified timestamp or filesize has changed since the last time isDirty was called with updateTimestamp set to true.

Parameters:
updateTimestamp will update the internal cache of file attributes, in effect setting the underlying file to be 'clean'
outSuccess denotes whether or not the OS query was successful (if non-NULL)
Returns:
true if the file has changed since the last cache, and will return false if either the file is clean or if an error occurred

bool LibGLShader::FileSynchronizer::setClean ( bool *  outSuccess = NULL  )  [inline]

Updates the internal cache of file attributes, in effect setting the underlying file to be 'clean'.

Parameters:
outSuccess denotes whether or not the operation was successful (if non-NULL)
Returns:
true if the file has changed since the last time it was synchronized

std::string LibGLShader::FileSynchronizer::getFileName (  )  const [inline]

Returns:
the name of the file this class is synchronizing

virtual std::string LibGLShader::FileSynchronizer::getShaderObjectTypeString (  )  const [inline, virtual]

from ShaderObject

Returns:
the type of this object in a human-readable form

Implements LibGLShader::ShaderObject.

FileSynchronizer& LibGLShader::FileSynchronizer::operator= ( const FileSynchronizer rhs  )  [inline]

virtual bool LibGLShader::FileSynchronizer::isDirty ( bool  updateTimestamp = false,
bool *  outSuccess = NULL 
) [virtual]

Polls the OS for whether or not the underlying file's last modified timestamp or filesize has changed since the last time isDirty was called with updateTimestamp set to true.

Parameters:
updateTimestamp will update the internal cache of file attributes, in effect setting the underlying file to be 'clean'
outSuccess denotes whether or not the OS query was successful (if non-NULL)
Returns:
true if the file has changed since the last cache, and will return false if either the file is clean or if an error occurred

bool LibGLShader::FileSynchronizer::setClean ( bool *  outSuccess = NULL  )  [inline]

Updates the internal cache of file attributes, in effect setting the underlying file to be 'clean'.

Parameters:
outSuccess denotes whether or not the operation was successful (if non-NULL)
Returns:
true if the file has changed since the last time it was synchronized

std::string LibGLShader::FileSynchronizer::getFileName (  )  const [inline]

Returns:
the name of the file this class is synchronizing

virtual std::string LibGLShader::FileSynchronizer::getShaderObjectTypeString (  )  const [inline, virtual]

from ShaderObject

Returns:
the type of this object in a human-readable form

Implements LibGLShader::ShaderObject.


Member Data Documentation


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

Generated on Sat Sep 20 04:06:21 2008 for CS123Support by  doxygen 1.5.6