PCL
|
Element of a file data cache. More...
#include <FileDataCache.h>
Public Member Functions | |
virtual | ~FileDataCacheItem () |
void | Assign (const FileDataCacheItem &item) |
double | DaysSinceLastUsed () const |
bool | ModifiedSince (FileTime t) const |
bool | operator< (const FileDataCacheItem &item) const |
bool | operator== (const FileDataCacheItem &item) const |
Public Attributes | |
IsoString | key |
Cache key. Allows different cache entries for the same file. | |
TimePoint | lastUsed |
Time this cache item was last used. | |
String | path |
Full path to the file represented by this item. | |
TimePoint | time |
Cached file time. | |
Protected Member Functions | |
FileDataCacheItem (const FileDataCacheItem &)=default | |
virtual void | AssignData (const FileDataCacheItem &item) |
virtual bool | DeserializeData (const IsoStringList &tokens) |
virtual IsoStringList | SerializedData () const |
virtual bool | ValidateData () const |
Static Protected Member Functions | |
static bool | DeserializeMatrices (Array< DMatrix > &matrices, IsoStringList::const_iterator &start, const IsoStringList &tokens) |
static bool | DeserializeMatrix (DMatrix &matrix, IsoStringList::const_iterator &start, const IsoStringList &tokens) |
static bool | DeserializeMultiVector (DMultiVector &multivector, IsoStringList::const_iterator &start, const IsoStringList &tokens) |
static bool | DeserializeVector (DVector &vector, IsoStringList::const_iterator &start, const IsoStringList &tokens) |
static IsoStringList | SerializedMatrices (const Array< DMatrix > &matrices) |
static IsoStringList | SerializedMatrix (const DMatrix &matrix) |
static IsoStringList | SerializedMultiVector (const DMultiVector &multivector) |
static IsoStringList | SerializedVector (const DVector &vector) |
This class represents a file in a FileDataCache object. This is a basic cache item structure to transport a file's full path, known time of last modification, and the time of last cache access.
Reimplementing this class is normally necessary to store additional data associated with cached files.
Definition at line 83 of file FileDataCache.h.
|
inlinevirtual |
Virtual destructor.
Definition at line 95 of file FileDataCache.h.
|
protecteddefault |
Copy constructor.
|
inline |
|
inlineprotectedvirtual |
Assigns additional data stored in another file cache item.
The default implementation does nothing. This virtual member function should be reimplemented by derived classes, when necessary, to ensure persistence of reimplementation-specific data.
Definition at line 163 of file FileDataCache.h.
|
inline |
Returns the amount of days elapsed since the time this cache item was last used.
Definition at line 149 of file FileDataCache.h.
References pcl::TimePoint::Now().
|
inlineprotectedvirtual |
Retrieves additional data from an ordered list of UTF-8 string tokens. Returns true iff the data were successfully retrieved.
The default implementation returns true. This virtual member function should be reimplemented by derived classes when necessary for retrieval of reimplementation-specific data.
Definition at line 188 of file FileDataCache.h.
|
staticprotected |
Deserializes an array of floating-point matrices from the specified ordered list of tokens, parsing the necessary tokens starting from the specified start iterator.
|
staticprotected |
Deserializes a floating-point matrix from the specified ordered list of tokens, parsing the necessary tokens starting from the specified start iterator.
|
staticprotected |
Deserializes a floating-point multivector from the specified ordered list of tokens, parsing the necessary tokens starting from the specified start iterator.
|
staticprotected |
Deserializes a floating-point vector from the specified ordered list of tokens, parsing the necessary tokens starting from the specified start iterator.
|
inline |
Returns true iff the file represented by this cache item was last modified before the specified file time t.
Definition at line 139 of file FileDataCache.h.
References pcl::FileTime::milliseconds.
|
inline |
Returns true iff this object precedes another cache item. File cache items are sorted by full file paths in ascending order.
Definition at line 123 of file FileDataCache.h.
|
inline |
Returs true iff this object represents the same file as another cache item.
Definition at line 114 of file FileDataCache.h.
References path.
|
inlineprotectedvirtual |
Returns an ordered list of UTF-8 strings representing the additional data stored in this cache item.
The default implementation returns an empty string list. This virtual member function should be reimplemented by derived classes when necessary to allow this root base class to access reimplementation-specific data.
Definition at line 175 of file FileDataCache.h.
|
staticprotected |
Returns a string list serialization of an array of floating-point matrices.
|
staticprotected |
Returns a string list serialization of a floating-point matrix.
|
staticprotected |
Returns a string list serialization of a floating-point multivector.
|
staticprotected |
Returns a string list serialization of a floating-point vector.
|
inlineprotectedvirtual |
Returns true iff the additional data stored in this cache item is valid.
The default implementation returns true. This virtual member function should be reimplemented by derived classes, when necessary, for the validation of reimplementation-specific data.
Definition at line 200 of file FileDataCache.h.