Sirikata
Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes
Sirikata::Graphics::CDNArchive Class Reference

A specialization of Ogre::Archive which gets its data through Meru's ResourceManager, and therefore indirectly via the web. More...

#include <CDNArchive.hpp>

Inheritance diagram for Sirikata::Graphics::CDNArchive:
Collaboration diagram for Sirikata::Graphics::CDNArchive:

List of all members.

Public Member Functions

 CDNArchive (CDNArchiveFactory *owner, const Ogre::String &name, const Ogre::String &archType)
 ~CDNArchive ()
bool isCaseSensitive () const
void load ()
void unload ()
Ogre::DataStreamPtr open (const Ogre::String &filename) const
Ogre::DataStreamPtr open (const Ogre::String &filename, bool readonly=true) const
Ogre::StringVectorPtr list (bool recursive=true, bool dirs=false)
Ogre::FileInfoListPtr listFileInfo (bool recursive=true, bool dirs=false)
Ogre::StringVectorPtr find (const Ogre::String &pattern, bool recursive=true, bool dirs=false)
bool exists (const Ogre::String &filename)
Ogre::FileInfoListPtr findFileInfo (const Ogre::String &pattern, bool recursive=true, bool dirs=false)

Static Public Member Functions

static String canonicalizeHash (const String &filename)
 This function takes a hash-based URI or filename and extracts the salient bits--- i.e.

Private Member Functions

time_t getModifiedTime (const Ogre::String &)

Private Attributes

unsigned int mNativeFileArchive
CDNArchiveFactorymOwner

Detailed Description

A specialization of Ogre::Archive which gets its data through Meru's ResourceManager, and therefore indirectly via the web.

See Ogre's documentation for details on the interface.


Constructor & Destructor Documentation

Sirikata::Graphics::CDNArchive::CDNArchive ( CDNArchiveFactory owner,
const Ogre::String &  name,
const Ogre::String &  archType 
)
Sirikata::Graphics::CDNArchive::~CDNArchive ( )

Member Function Documentation

std::string Sirikata::Graphics::CDNArchive::canonicalizeHash ( const String &  filename) [static]

This function takes a hash-based URI or filename and extracts the salient bits--- i.e.

everything past the hint about where to get the hash based filename i.e. mhash://meru/1bf00deadbeef turns into 1bf00deadbeef This function also strips quotes as well as a preceeding %_%% (CDN_REPLACING_MATERIAL_STREAM_HINT)

References CDN_REPLACING_MATERIAL_STREAM_HINT, and Sirikata::SHA256::hex_size.

Referenced by exists(), and open().

bool Sirikata::Graphics::CDNArchive::exists ( const Ogre::String &  filename)
Ogre::StringVectorPtr Sirikata::Graphics::CDNArchive::find ( const Ogre::String &  pattern,
bool  recursive = true,
bool  dirs = false 
)
Ogre::FileInfoListPtr Sirikata::Graphics::CDNArchive::findFileInfo ( const Ogre::String &  pattern,
bool  recursive = true,
bool  dirs = false 
)
time_t Sirikata::Graphics::CDNArchive::getModifiedTime ( const Ogre::String &  ) [private]
bool Sirikata::Graphics::CDNArchive::isCaseSensitive ( ) const
Ogre::StringVectorPtr Sirikata::Graphics::CDNArchive::list ( bool  recursive = true,
bool  dirs = false 
)
Ogre::FileInfoListPtr Sirikata::Graphics::CDNArchive::listFileInfo ( bool  recursive = true,
bool  dirs = false 
)
void Sirikata::Graphics::CDNArchive::load ( )
Ogre::DataStreamPtr Sirikata::Graphics::CDNArchive::open ( const Ogre::String &  filename,
bool  readonly = true 
) const
Ogre::DataStreamPtr Sirikata::Graphics::CDNArchive::open ( const Ogre::String &  filename) const
void Sirikata::Graphics::CDNArchive::unload ( )

Member Data Documentation

Referenced by CDNArchive(), and ~CDNArchive().

Referenced by CDNArchive(), exists(), open(), and ~CDNArchive().


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