GLC_CacheManager Class Reference

GLC_CacheManager : The 3D Rep Binary cache manager. More...

#include <glc_cachemanager.h>

List of all members.

Public Member Functions

Constructor

 GLC_CacheManager (const QString &path=QString())
 Default constructor.
 GLC_CacheManager (const GLC_CacheManager &)
 Copy constructor.
GLC_CacheManageroperator= (const GLC_CacheManager &)
 Assignement operator.
virtual ~GLC_CacheManager ()
 Destructor.
Get Functions

QString absolutePath () const
 Return the cache absolute path.
bool exists () const
 Return true if the cache dir exists.
bool isReadable () const
 Return true if the cache is is readable.
bool isWritable () const
 Return true if the cache is is writable.
bool isCashed (const QString &, const QString &) const
 Return True if the specified file is cashed in the specified context.
bool isUsable (const QDateTime &, const QString &, const QString &) const
 Return True if the cached file is usable.
GLC_BSRep binary3DRep (const QString &, const QString &) const
 Return the binary serialized representation of the specified file.
bool addToCache (const QString &, const GLC_3DRep &)
 Add the specified file in the cache.
bool compressionIsUsed () const
 Return true if the compression is used.
int compressionLevel () const
 Return the cache compression level.
Set Functions

bool setCachePath (const QString &)
 Set the cache file path.
void setCompressionUsage (bool use)
 Set the cache compression usage.
void setCompressionLevel (int level)
 Set the cache compression level.

Private Attributes

QDir m_Dir
 The cache directory.
bool m_UseCompression
 Compress Data.
int m_CompressionLevel
 The compression level.

Detailed Description

GLC_CacheManager : The 3D Rep Binary cache manager.

By default the binary rep are compressed with a default compression level

Definition at line 42 of file glc_cachemanager.h.


Constructor & Destructor Documentation

GLC_CacheManager::GLC_CacheManager ( const QString &  path = QString()  ) 

Default constructor.

Definition at line 27 of file glc_cachemanager.cpp.

References m_Dir.

GLC_CacheManager::GLC_CacheManager ( const GLC_CacheManager cacheManager  ) 

Copy constructor.

Definition at line 43 of file glc_cachemanager.cpp.

GLC_CacheManager::~GLC_CacheManager (  )  [virtual]

Destructor.

Definition at line 61 of file glc_cachemanager.cpp.


Member Function Documentation

QString GLC_CacheManager::absolutePath (  )  const [inline]

Return the cache absolute path.

Definition at line 68 of file glc_cachemanager.h.

bool GLC_CacheManager::addToCache ( const QString &  context,
const GLC_3DRep rep 
)
GLC_BSRep GLC_CacheManager::binary3DRep ( const QString &  context,
const QString &  fileName 
) const

Return the binary serialized representation of the specified file.

Definition at line 124 of file glc_cachemanager.cpp.

References m_Dir, and GLC_BSRep::suffix().

Referenced by GLC_3dxmlToWorld::create3DrepFrom3dxmlRep(), GLC_3dxmlToWorld::loadExternalRef3D(), and GLC_3dxmlToWorld::loadExternRepresentations().

bool GLC_CacheManager::compressionIsUsed (  )  const [inline]

Return true if the compression is used.

Definition at line 94 of file glc_cachemanager.h.

int GLC_CacheManager::compressionLevel (  )  const [inline]

Return the cache compression level.

Definition at line 98 of file glc_cachemanager.h.

bool GLC_CacheManager::exists (  )  const [inline]

Return true if the cache dir exists.

Definition at line 72 of file glc_cachemanager.h.

bool GLC_CacheManager::isCashed ( const QString &  context,
const QString &  fileName 
) const

Return True if the specified file is cashed in the specified context.

Definition at line 94 of file glc_cachemanager.cpp.

References isReadable(), m_Dir, and GLC_BSRep::suffix().

Referenced by isUsable().

bool GLC_CacheManager::isReadable (  )  const

Return true if the cache is is readable.

Definition at line 71 of file glc_cachemanager.cpp.

References m_Dir.

Referenced by isCashed().

bool GLC_CacheManager::isUsable ( const QDateTime &  timeStamp,
const QString &  context,
const QString &  fileName 
) const

Return True if the cached file is usable.

Definition at line 103 of file glc_cachemanager.cpp.

References isCashed(), GLC_BSRep::isUsable(), m_Dir, GLC_BSRep::setAbsoluteFileName(), and GLC_BSRep::suffix().

Referenced by GLC_3dxmlToWorld::create3DrepFrom3dxmlRep().

bool GLC_CacheManager::isWritable (  )  const

Return true if the cache is is writable.

Definition at line 83 of file glc_cachemanager.cpp.

References m_Dir.

Referenced by addToCache().

GLC_CacheManager & GLC_CacheManager::operator= ( const GLC_CacheManager cacheManager  ) 

Assignement operator.

Definition at line 52 of file glc_cachemanager.cpp.

References m_CompressionLevel, m_Dir, and m_UseCompression.

bool GLC_CacheManager::setCachePath ( const QString &  path  ) 

Set the cache file path.

Definition at line 170 of file glc_cachemanager.cpp.

References m_Dir.

void GLC_CacheManager::setCompressionLevel ( int  level  )  [inline]

Set the cache compression level.

Definition at line 117 of file glc_cachemanager.h.

void GLC_CacheManager::setCompressionUsage ( bool  use  )  [inline]

Set the cache compression usage.

Definition at line 113 of file glc_cachemanager.h.


Member Data Documentation

The compression level.

Definition at line 133 of file glc_cachemanager.h.

Referenced by addToCache(), and operator=().

QDir GLC_CacheManager::m_Dir [private]

Compress Data.

Definition at line 130 of file glc_cachemanager.h.

Referenced by addToCache(), and operator=().


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

SourceForge.net Logo

©2005-2011 Laurent Ribon