Tekkotsu Homepage
Demos
Overview
Downloads
Dev. Resources
Reference
Credits

FileSystemDataSource::FileInfo Struct Reference

#include <FileSystemDataSource.h>

Inheritance diagram for FileSystemDataSource::FileInfo:

List of all members.


Detailed Description

stores basic information regarding each file in the queue, including routines for loading to and from disk

Definition at line 104 of file FileSystemDataSource.h.


Public Member Functions

 FileInfo ()
 default constructor
 FileInfo (const std::string &name, float time)
 basic constructor, provide name and lifetime, data and size are left empty until later prepare() is called
 FileInfo (const FileInfo &fi)
 shallow copy constructor -- doesn't copy data (have to call prepare() to reload)
FileInfooperator= (const FileInfo &fi)
 shallow assignment -- doesn't copy data (have to call prepare() to reload)
virtual ~FileInfo ()
 destructor
virtual void prepare ()
 make sure data is in physical memory for imminent usage
virtual void done ()
 we can let the data out of memory if needed
virtual void release ()
 if data is in an allocated region, free it

Public Attributes

std::string filename
 the path to the file to load
float lifetime
 time for which this frame is "current", before next frame should be sent
char * data
 loaded/parsed contents of filename, all ready to send, just need to copy into message
unsigned int size
 size of buffer pointed to by data (may be decompressed/processed, different than file size...)
bool prepared
 true if prepare() has been called

Constructor & Destructor Documentation

FileInfo (  )  [inline]

default constructor

Definition at line 106 of file FileSystemDataSource.h.

FileInfo ( const std::string &  name,
float  time 
) [inline]

basic constructor, provide name and lifetime, data and size are left empty until later prepare() is called

Definition at line 108 of file FileSystemDataSource.h.

FileInfo ( const FileInfo fi  )  [inline]

shallow copy constructor -- doesn't copy data (have to call prepare() to reload)

Definition at line 110 of file FileSystemDataSource.h.

virtual ~FileInfo (  )  [inline, virtual]

destructor

Definition at line 114 of file FileSystemDataSource.h.


Member Function Documentation

FileInfo& operator= ( const FileInfo fi  )  [inline]

shallow assignment -- doesn't copy data (have to call prepare() to reload)

Definition at line 112 of file FileSystemDataSource.h.

void prepare (  )  [virtual]

make sure data is in physical memory for imminent usage

Reimplemented in FileSystemImageSource::ImageInfo.

Definition at line 384 of file FileSystemDataSource.cc.

Referenced by FileSystemImageSource::ImageInfo::prepare().

void done (  )  [virtual]

we can let the data out of memory if needed

Definition at line 441 of file FileSystemDataSource.cc.

Referenced by release().

void release (  )  [virtual]

if data is in an allocated region, free it

Definition at line 452 of file FileSystemDataSource.cc.

Referenced by operator=(), FileSystemImageSource::ImageInfo::prepare(), and ~FileInfo().


Member Data Documentation

std::string filename

the path to the file to load

Definition at line 120 of file FileSystemDataSource.h.

Referenced by done(), operator=(), FileSystemImageSource::ImageInfo::prepare(), prepare(), and release().

float lifetime

time for which this frame is "current", before next frame should be sent

Definition at line 121 of file FileSystemDataSource.h.

Referenced by operator=().

char* data

loaded/parsed contents of filename, all ready to send, just need to copy into message

Definition at line 122 of file FileSystemDataSource.h.

Referenced by done(), FileSystemImageSource::ImageInfo::prepare(), prepare(), and release().

unsigned int size

size of buffer pointed to by data (may be decompressed/processed, different than file size...)

Definition at line 123 of file FileSystemDataSource.h.

Referenced by done(), FileSystemImageSource::ImageInfo::prepare(), prepare(), and release().

bool prepared

true if prepare() has been called

Definition at line 124 of file FileSystemDataSource.h.

Referenced by done(), FileSystemImageSource::ImageInfo::prepare(), and prepare().


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

Tekkotsu Hardware Abstraction Layer 4.0
Generated Thu Nov 22 01:01:21 2007 by Doxygen 1.5.4