Tekkotsu Homepage
Demos
Overview
Downloads
Dev. Resources
Reference
Credits

FileInfo Struct Reference

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

#include <FileSystemDataSource.h>

Inheritance diagram for FileInfo:

Detailed Description

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

Definition at line 128 of file FileSystemDataSource.h.

List of all members.

Public Member Functions

 FileInfo ()
 default constructor
 FileInfo (const std::string &name, double time)
 basic constructor, provide name and lifetime, data and size are left empty until later prepare() is called
 FileInfo (const FileInfo &o)
 copy constructor, adds reference to the source's data (shallow copy)
FileInfooperator= (const FileInfo &o)
 assignment operator, adds reference to the source's data (shallow copy)
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
const char * getData () const
size_t getSize () const
void setData (char *d, size_t s)
bool isPrepared () const

Public Attributes

std::string filename
 the path to the file to load
double lifetime
 duration for which this frame is "current", before next frame should be sent

Protected Attributes

char * data
 loaded/parsed contents of filename, all ready to send, just need to copy into message
size_t size
 size of buffer pointed to by data (may be decompressed/processed, different than file size...)
unsigned int * refcount
 maintain a reference count of the data (just across FileInfo instances...)
bool prepared
 true if prepare() has been called

Constructor & Destructor Documentation

FileInfo (  ) 

default constructor

Definition at line 130 of file FileSystemDataSource.h.

FileInfo ( const std::string &  name,
double  time 
)

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

Definition at line 132 of file FileSystemDataSource.h.

FileInfo ( const FileInfo o  ) 

copy constructor, adds reference to the source's data (shallow copy)

Definition at line 134 of file FileSystemDataSource.h.

virtual ~FileInfo (  )  [virtual]

destructor

Definition at line 144 of file FileSystemDataSource.h.


Member Function Documentation

void done (  )  [virtual]

we can let the data out of memory if needed

Definition at line 528 of file FileSystemDataSource.cc.

Referenced by FileInfo::release().

const char* getData (  )  const

Definition at line 150 of file FileSystemDataSource.h.

Referenced by FileSystemImageSource::sendData().

size_t getSize (  )  const

Definition at line 151 of file FileSystemDataSource.h.

bool isPrepared (  )  const

Definition at line 153 of file FileSystemDataSource.h.

FileInfo& operator= ( const FileInfo o  ) 

assignment operator, adds reference to the source's data (shallow copy)

Definition at line 136 of file FileSystemDataSource.h.

void prepare (  )  [virtual]

make sure data is in physical memory for imminent usage

Reimplemented in ImageInfo.

Definition at line 469 of file FileSystemDataSource.cc.

void release (  )  [virtual]

if data is in an allocated region, free it

Definition at line 539 of file FileSystemDataSource.cc.

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

void setData ( char *  d,
size_t  s 
)

Definition at line 152 of file FileSystemDataSource.h.

Referenced by ImageInfo::prepare().


Member Data Documentation

char* data [protected]

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

Definition at line 158 of file FileSystemDataSource.h.

Referenced by FileInfo::done(), FileInfo::getData(), FileInfo::operator=(), ImageInfo::prepare(), FileInfo::prepare(), FileInfo::release(), and FileInfo::setData().

double lifetime

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

Definition at line 156 of file FileSystemDataSource.h.

Referenced by FileInfo::operator=().

bool prepared [protected]

true if prepare() has been called

Definition at line 161 of file FileSystemDataSource.h.

Referenced by FileInfo::done(), FileInfo::isPrepared(), ImageInfo::prepare(), and FileInfo::prepare().

unsigned int* refcount [protected]

maintain a reference count of the data (just across FileInfo instances...)

Definition at line 160 of file FileSystemDataSource.h.

Referenced by FileInfo::FileInfo(), FileInfo::operator=(), FileInfo::prepare(), FileInfo::release(), and FileInfo::setData().

size_t size [protected]

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

Definition at line 159 of file FileSystemDataSource.h.

Referenced by FileInfo::done(), FileInfo::getSize(), FileInfo::operator=(), ImageInfo::prepare(), FileInfo::prepare(), FileInfo::release(), and FileInfo::setData().


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

Tekkotsu Hardware Abstraction Layer 5.1CVS
Generated Mon May 9 05:01:41 2016 by Doxygen 1.6.3