#include <AttributeCache.h>

Public Types | |
| typedef std::string | ObjectHandle |
| typedef std::string | HeaderHandle |
| typedef std::string | AttributeHandle |
Public Member Functions | |
| AttributeCache (const std::string &filename, IndexedIO::OpenMode mode) | |
| Open the cache, using the specified open mode. | |
| void | write (const ObjectHandle &obj, const AttributeHandle &attr, const Object *data) |
| Write a piece of data associated with the specified object and attribute to the cache. | |
| void | writeHeader (const HeaderHandle &hdr, const Object *data) |
| Write data associated with the specified header to the cache. | |
| ObjectPtr | read (const ObjectHandle &obj, const AttributeHandle &attr) |
| CompoundObjectPtr | read (const ObjectHandle &obj) |
| ObjectPtr | readHeader (const HeaderHandle &hdr) |
| CompoundObjectPtr | readHeader () |
| void | objects (std::vector< ObjectHandle > &objs) |
| Retrieve the list of object handles from the cache. | |
| void | headers (std::vector< HeaderHandle > &hds) |
| Retrieve the list of header handles from the cache. | |
| void | attributes (const ObjectHandle &obj, std::vector< AttributeHandle > &attrs) |
| void | attributes (const ObjectHandle &obj, const std::string regex, std::vector< AttributeHandle > &attrs) |
| bool | contains (const ObjectHandle &obj) |
| Determines whether or not the cache contains the specified object. | |
| bool | contains (const ObjectHandle &obj, const AttributeHandle &attr) |
| Determines whether or not the cache contains the specified object and attribute. | |
| void | remove (const ObjectHandle &obj) |
| Removes an object from the cache file. | |
| void | remove (const ObjectHandle &obj, const AttributeHandle &attr) |
| Removes an object's attribute from the cache file. | |
| void | removeHeader (const HeaderHandle &hdr) |
| Removes a header from the cache file. | |
Static Protected Member Functions | |
| static void | checkName (const std::string &name) |
Protected Attributes | |
| IndexedIOInterfacePtr | m_io |
| typedef std::string IECore::AttributeCache::AttributeHandle |
| typedef std::string IECore::AttributeCache::HeaderHandle |
| typedef std::string IECore::AttributeCache::ObjectHandle |
| AttributeCache::AttributeCache | ( | const std::string & | filename, | |
| IndexedIO::OpenMode | mode | |||
| ) |
Open the cache, using the specified open mode.
References IECore::IndexedIO::Append, IECoreMaya::MeshOpHolderUtil::create(), IECore::HeaderGenerator::header(), m_io, IECore::IndexedIO::Read, IECore::IndexedIO::Write, and writeHeader().
| void AttributeCache::attributes | ( | const ObjectHandle & | obj, | |
| const std::string | regex, | |||
| std::vector< AttributeHandle > & | attrs | |||
| ) |
Retrieve the list of attribute handles that match the given regex from the specified objects. Throws an exception if the object is not within the cache.
References IECore::IndexedIO::Directory, and m_io.
| void AttributeCache::attributes | ( | const ObjectHandle & | obj, | |
| std::vector< AttributeHandle > & | attrs | |||
| ) |
Retrieve the list of attribute handles from the specified objects. Throws an exception if the object is not within the cache.
References IECore::IndexedIO::Directory, and m_io.
| void AttributeCache::checkName | ( | const std::string & | name | ) | [static, protected] |
Referenced by write(), and writeHeader().
| bool AttributeCache::contains | ( | const ObjectHandle & | obj, | |
| const AttributeHandle & | attr | |||
| ) |
| bool AttributeCache::contains | ( | const ObjectHandle & | obj | ) |
| void IECore::AttributeCache::headers | ( | std::vector< HeaderHandle > & | hds | ) |
Retrieve the list of header handles from the cache.
| void IECore::AttributeCache::objects | ( | std::vector< ObjectHandle > & | objs | ) |
Retrieve the list of object handles from the cache.
| CompoundObjectPtr AttributeCache::read | ( | const ObjectHandle & | obj | ) |
Read a piece of data associated with the specified object from the cache. Returns a CompoundObject with attribute as keys. Throws an exception if the requested data is not present in the cache.
References IECore::IndexedIO::Directory, IECore::Object::load(), and m_io.
| ObjectPtr AttributeCache::read | ( | const ObjectHandle & | obj, | |
| const AttributeHandle & | attr | |||
| ) |
Read a piece of data associated with the specified object and attribute from the cache. Throws an exception if the requested data is not present in the cache.
References IECore::Object::load(), and m_io.
| CompoundObjectPtr AttributeCache::readHeader | ( | ) |
Read all header data present in the cache. Creates a CompoundObject with the header names as keys.
References IECore::IndexedIO::Directory, IECore::Object::load(), and m_io.
| ObjectPtr AttributeCache::readHeader | ( | const HeaderHandle & | hdr | ) |
Read data associated with the specified header from the cache. Throws an exception if the requested header is not present in the cache.
References IECore::Object::load(), and m_io.
| void AttributeCache::remove | ( | const ObjectHandle & | obj, | |
| const AttributeHandle & | attr | |||
| ) |
| void AttributeCache::remove | ( | const ObjectHandle & | obj | ) |
| void AttributeCache::removeHeader | ( | const HeaderHandle & | hdr | ) |
| void AttributeCache::write | ( | const ObjectHandle & | obj, | |
| const AttributeHandle & | attr, | |||
| const Object * | data | |||
| ) |
Write a piece of data associated with the specified object and attribute to the cache.
References checkName(), m_io, and IECore::Object::save().
| void AttributeCache::writeHeader | ( | const HeaderHandle & | hdr, | |
| const Object * | data | |||
| ) |
Write data associated with the specified header to the cache.
References checkName(), m_io, and IECore::Object::save().
Referenced by AttributeCache().
IndexedIOInterfacePtr IECore::AttributeCache::m_io [protected] |
Referenced by AttributeCache(), attributes(), contains(), read(), readHeader(), remove(), removeHeader(), write(), and writeHeader().
1.5.8