public

Inheritance Graph

graph BT
	ResourceAccessor
	ResourceAccessor --> ReferenceCounter
	VertexAccessor --> ResourceAccessor
	StructuredAccessor --> ResourceAccessor
	click ResourceAccessor "classUtil_1_1ResourceAccessor"
	click ReferenceCounter "classUtil_1_1ReferenceCounter"
	click VertexAccessor "classRendering_1_1VertexAccessor"
	click StructuredAccessor "classUtil_1_1StructuredAccessor"

Description

ResourceAccessor

Public Types

   
   
typedef Util::Reference < ResourceAccessor > Ref

Protected Functions

   
   
void assertRangeLocation(uint32_t index, uint32_t location) const
   
void assertAttribute(const StringIdentifier & id) const

Public Static Functions

   
   
Ref create(uint8_t * ptr, size_t size, ResourceFormat format)
   
Ref create(const ResourceRef & resource)

Public Functions

   
   
  ResourceAccessor(uint8_t * ptr, size_t size, ResourceFormat format)
   
  ResourceAccessor(const ResourceRef & resource)
   
  ~ResourceAccessor()
   
void readRaw(size_t index, uint8_t * targetPtr, size_t count)
   
void writeRaw(size_t index, const uint8_t * sourcePtr, size_t count)
template< typename T >  
void readValues(size_t index, uint32_t location, T * values, size_t count) const
template< typename T >  
T readValue(size_t index, uint32_t location) const
   
void readRawValue(size_t index, uint32_t location, uint8_t * data, size_t size) const
   
void readRawValue(size_t index, const StringIdentifier & id, uint8_t * data, size_t size) const
template< typename T >  
std::vector< T > readValues(size_t index, uint32_t location, size_t count) const
template< typename T >  
void readValues(size_t index, const StringIdentifier & id, T * values, size_t count) const
template< typename T >  
T readValue(size_t index, const StringIdentifier & id) const
template< typename T >  
std::vector< T > readValues(size_t index, const StringIdentifier & id, size_t count) const
template< typename T >  
void writeValues(size_t index, uint32_t location, const T * values, size_t count)
template< typename T >  
void writeValues(size_t index, const StringIdentifier & id, const T * values, size_t count)
template< typename T >  
void writeValue(size_t index, uint32_t location, const T & value)
template< typename T >  
void writeValue(size_t index, const StringIdentifier & id, const T & value)
   
void writeRawValue(size_t index, uint32_t location, const uint8_t * data, size_t size)
   
void writeRawValue(size_t index, const StringIdentifier & id, const uint8_t * data, size_t size)
template< typename T >  
void writeValues(size_t index, uint32_t location, const std::vector< T > & values)
template< typename T >  
void writeValues(size_t index, const StringIdentifier & id, const std::vector< T > & values)
   
const ResourceFormat & getFormat() const
   
size_t getDataSize() const
   
size_t getElementCount() const
   
uint32_t getAttributeLocation(const StringIdentifier & id) const

Documentation

typedef
Util::ResourceAccessor::Ref

public
 
 
typedef Util::Reference < ResourceAccessor > Ref

Defined in Util/Resources/ResourceAccessor.h:34


function
Util::ResourceAccessor::assertRangeLocation

protected const inline
     
     
void assertRangeLocation( uint32_t index,
  uint32_t location
) const    

Defined in Util/Resources/ResourceAccessor.h:31


function
Util::ResourceAccessor::assertAttribute

protected const inline
     
     
void assertAttribute( const StringIdentifier & id ) const

Defined in Util/Resources/ResourceAccessor.h:32


function
Util::ResourceAccessor::create

public static inline
     
     
Ref create( uint8_t * ptr,
  size_t size,
  ResourceFormat format
)    

Defined in Util/Resources/ResourceAccessor.h:35


function
Util::ResourceAccessor::create

public static inline
     
     
Ref create( const ResourceRef & resource )

Defined in Util/Resources/ResourceAccessor.h:36


function
Util::ResourceAccessor::ResourceAccessor

public explicit
     
     
ResourceAccessor( uint8_t * ptr,
  size_t size,
  ResourceFormat format
)    

Defined in Util/Resources/ResourceAccessor.h:38


function
Util::ResourceAccessor::ResourceAccessor

public explicit
     
     
ResourceAccessor( const ResourceRef & resource )

Defined in Util/Resources/ResourceAccessor.h:39


function
Util::ResourceAccessor::~ResourceAccessor

public virtual
   
   
~ResourceAccessor( )

Defined in Util/Resources/ResourceAccessor.h:40


function
Util::ResourceAccessor::readRaw

public
     
     
void readRaw( size_t index,
  uint8_t * targetPtr,
  size_t count
)    

Reads one or more elements without any conversion Reads count many elements from the resource at the given index targetPtr needs to be large enough to hold count many elements of the resources format size

Defined in Util/Resources/ResourceAccessor.h:46


function
Util::ResourceAccessor::writeRaw

public
     
     
void writeRaw( size_t index,
  const uint8_t * sourcePtr,
  size_t count
)    

Writes one or more elements without any conversion Writes count many elements to the resource at the given index ptr needs to be large enough to hold count many elements of the resources format size

Defined in Util/Resources/ResourceAccessor.h:52


function
Util::ResourceAccessor::readValues

public const inline
     
template< typename T >    
void readValues( size_t index,
  uint32_t location,
  T * values,
  size_t count
) const    

Defined in Util/Resources/ResourceAccessor.h:55


function
Util::ResourceAccessor::readValue

public const inline
     
template< typename T >    
T readValue( size_t index,
  uint32_t location
) const    

Defined in Util/Resources/ResourceAccessor.h:61


function
Util::ResourceAccessor::readRawValue

public const inline
     
     
void readRawValue( size_t index,
  uint32_t location,
  uint8_t * data,
  size_t size
) const    

Defined in Util/Resources/ResourceAccessor.h:67


function
Util::ResourceAccessor::readRawValue

public const inline
     
     
void readRawValue( size_t index,
  const StringIdentifier & id,
  uint8_t * data,
  size_t size
) const    

Defined in Util/Resources/ResourceAccessor.h:72


function
Util::ResourceAccessor::readValues

public const inline
     
template< typename T >    
std::vector< T > readValues( size_t index,
  uint32_t location,
  size_t count
) const    

Defined in Util/Resources/ResourceAccessor.h:78


function
Util::ResourceAccessor::readValues

public const inline
     
template< typename T >    
void readValues( size_t index,
  const StringIdentifier & id,
  T * values,
  size_t count
) const    

Defined in Util/Resources/ResourceAccessor.h:85


function
Util::ResourceAccessor::readValue

public const inline
     
template< typename T >    
T readValue( size_t index,
  const StringIdentifier & id
) const    

Defined in Util/Resources/ResourceAccessor.h:91


function
Util::ResourceAccessor::readValues

public const inline
     
template< typename T >    
std::vector< T > readValues( size_t index,
  const StringIdentifier & id,
  size_t count
) const    

Defined in Util/Resources/ResourceAccessor.h:97


function
Util::ResourceAccessor::writeValues

public inline
     
template< typename T >    
void writeValues( size_t index,
  uint32_t location,
  const T * values,
  size_t count
)    

Defined in Util/Resources/ResourceAccessor.h:103


function
Util::ResourceAccessor::writeValues

public inline
     
template< typename T >    
void writeValues( size_t index,
  const StringIdentifier & id,
  const T * values,
  size_t count
)    

Defined in Util/Resources/ResourceAccessor.h:110


function
Util::ResourceAccessor::writeValue

public inline
     
template< typename T >    
void writeValue( size_t index,
  uint32_t location,
  const T & value
)    

Defined in Util/Resources/ResourceAccessor.h:115


function
Util::ResourceAccessor::writeValue

public inline
     
template< typename T >    
void writeValue( size_t index,
  const StringIdentifier & id,
  const T & value
)    

Defined in Util/Resources/ResourceAccessor.h:120


function
Util::ResourceAccessor::writeRawValue

public inline
     
     
void writeRawValue( size_t index,
  uint32_t location,
  const uint8_t * data,
  size_t size
)    

Defined in Util/Resources/ResourceAccessor.h:124


function
Util::ResourceAccessor::writeRawValue

public inline
     
     
void writeRawValue( size_t index,
  const StringIdentifier & id,
  const uint8_t * data,
  size_t size
)    

Defined in Util/Resources/ResourceAccessor.h:129


function
Util::ResourceAccessor::writeValues

public inline
     
template< typename T >    
void writeValues( size_t index,
  uint32_t location,
  const std::vector< T > & values
)    

Defined in Util/Resources/ResourceAccessor.h:134


function
Util::ResourceAccessor::writeValues

public inline
     
template< typename T >    
void writeValues( size_t index,
  const StringIdentifier & id,
  const std::vector< T > & values
)    

Defined in Util/Resources/ResourceAccessor.h:139


function
Util::ResourceAccessor::getFormat

public const inline
   
   
const ResourceFormat & getFormat( ) const

Defined in Util/Resources/ResourceAccessor.h:143


function
Util::ResourceAccessor::getDataSize

public const inline
   
   
size_t getDataSize( ) const

Defined in Util/Resources/ResourceAccessor.h:144


function
Util::ResourceAccessor::getElementCount

public const inline
   
   
size_t getElementCount( ) const

Defined in Util/Resources/ResourceAccessor.h:145


function
Util::ResourceAccessor::getAttributeLocation

public const inline
     
     
uint32_t getAttributeLocation( const StringIdentifier & id ) const

Defined in Util/Resources/ResourceAccessor.h:146