Sirikata
Public Member Functions | Private Member Functions | Private Attributes | Friends
Sirikata::Graphics::CDNArchiveFactory Class Reference

Archive factory for URLArchives, a specialization of Ogre::ArchiveFactory. More...

#include <CDNArchiveFactory.hpp>

Inheritance diagram for Sirikata::Graphics::CDNArchiveFactory:
Collaboration diagram for Sirikata::Graphics::CDNArchiveFactory:

List of all members.

Public Member Functions

 CDNArchiveFactory ()
 ~CDNArchiveFactory ()
const Ogre::String & getType () const
Ogre::Archive * createInstance (const Ogre::String &name)
void destroyInstance (Ogre::Archive *archive)
void addArchiveData (unsigned int archiveName, const String &uri, const Transfer::SparseData &rbuffer)
 Add a specific data stream to a package that will be hung onto until removeArchive is called.
unsigned int addArchive ()
 Adds a package to the CDNArchive that will stay open until all items are used Must be called from main thread.
unsigned int addArchive (const String &uri, const Transfer::SparseData &rbuffer)
 Adds a package to the CDNArchive and one instance of filename/data.
void removeArchive (unsigned int name)
 Removes a package from CDNArchive that may be later opened by ogre Must be called from main thread.
void clearArchive (unsigned int name)
 Removes all files from a CDNArchive.

Private Member Functions

void addArchiveDataNoLock (unsigned int archiveName, const Ogre::String &filename, const Transfer::SparseData &rbuffer)

Private Attributes

boost::mutex CDNArchiveMutex
std::map< unsigned int,
std::vector< Ogre::String > > 
CDNArchivePackages
std::tr1::unordered_map
< std::string,
Transfer::SparseData
CDNArchiveFiles
int mCurArchive

Friends

class CDNArchive

Detailed Description

Archive factory for URLArchives, a specialization of Ogre::ArchiveFactory.

See Ogre's documentation for interface details and documentation.


Constructor & Destructor Documentation

Sirikata::Graphics::CDNArchiveFactory::CDNArchiveFactory ( )
Sirikata::Graphics::CDNArchiveFactory::~CDNArchiveFactory ( )

Member Function Documentation

unsigned int Sirikata::Graphics::CDNArchiveFactory::addArchive ( )

Adds a package to the CDNArchive that will stay open until all items are used Must be called from main thread.

Referenced by Sirikata::Graphics::CDNArchive::CDNArchive().

unsigned int Sirikata::Graphics::CDNArchiveFactory::addArchive ( const String &  uri,
const Transfer::SparseData rbuffer 
)

Adds a package to the CDNArchive and one instance of filename/data.

void Sirikata::Graphics::CDNArchiveFactory::addArchiveData ( unsigned int  archiveName,
const String &  uri,
const Transfer::SparseData rbuffer 
)

Add a specific data stream to a package that will be hung onto until removeArchive is called.

void Sirikata::Graphics::CDNArchiveFactory::addArchiveDataNoLock ( unsigned int  archiveName,
const Ogre::String &  filename,
const Transfer::SparseData rbuffer 
) [private]
void Sirikata::Graphics::CDNArchiveFactory::clearArchive ( unsigned int  name)

Removes all files from a CDNArchive.

Must be called from main thread.

Ogre::Archive * Sirikata::Graphics::CDNArchiveFactory::createInstance ( const Ogre::String &  name)
void Sirikata::Graphics::CDNArchiveFactory::destroyInstance ( Ogre::Archive *  archive)
const Ogre::String & Sirikata::Graphics::CDNArchiveFactory::getType ( ) const

References name().

void Sirikata::Graphics::CDNArchiveFactory::removeArchive ( unsigned int  name)

Removes a package from CDNArchive that may be later opened by ogre Must be called from main thread.

Referenced by Sirikata::Graphics::CDNArchive::~CDNArchive().


Friends And Related Function Documentation

friend class CDNArchive [friend]

Member Data Documentation

std::tr1::unordered_map<std::string, Transfer::SparseData > Sirikata::Graphics::CDNArchiveFactory::CDNArchiveFiles [private]
std::map<unsigned int, std::vector <Ogre::String> > Sirikata::Graphics::CDNArchiveFactory::CDNArchivePackages [private]

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