hecl
High-Level Extensible Combiner Language and Resource Database
Public Member Functions | Protected Types | Protected Member Functions | Friends | List of all members
HECL::Database::ObjectBase Class Reference

Base object to subclass for integrating with key project operations. More...

#include <HECLDatabase.hpp>

Collaboration diagram for HECL::Database::ObjectBase:
Collaboration graph

Public Member Functions

 ObjectBase (const SystemString &path)
 
const SystemString & getPath () const
 

Protected Types

enum  DataEndianness { DE_NONE, DE_BIG, DE_LITTLE }
 Byte-order of target system. More...
 
enum  DataPlatform { DP_NONE, DP_GENERIC, DP_REVOLUTION, DP_CAFE }
 Data-formats of target system. More...
 
typedef std::function< void(const void *data, size_t len)> FDataAppender
 
typedef std::function< void(ObjectBase *)> FDepAdder
 

Protected Member Functions

virtual bool _cookObject (FDataAppender dataAppender, DataEndianness endianness, DataPlatform platform)
 Optional private method implemented by CProjectObject subclasses to cook objects. More...
 
virtual void _gatherDeps (FDepAdder depAdder)
 Optional private method implemented by CProjectObject subclasses to resolve dependencies. More...
 

Friends

class Project
 

Detailed Description

Base object to subclass for integrating with key project operations.

All project objects are provided with IDataObject pointers to their database entries. Subclasses register themselves with a type registry so instances are automatically constructed when performing operations like cooking and packaging.

DO NOT CONSTRUCT THIS OR SUBCLASSES DIRECTLY!!

Member Enumeration Documentation

Byte-order of target system.

Enumerator
DE_BIG 

Big-endian (PowerPC)

DE_LITTLE 

Little-endian (Intel)

Data-formats of target system.

Enumerator
DP_GENERIC 

Scanline textures and 3-way shader bundle (GLSL, HLSL, SPIR-V)

DP_REVOLUTION 

Tiled textures and GX register buffers

DP_CAFE 

Swizzled textures and R700 shader objects

Member Function Documentation

virtual bool HECL::Database::ObjectBase::_cookObject ( FDataAppender  dataAppender,
DataEndianness  endianness,
DataPlatform  platform 
)
inlineprotectedvirtual

Optional private method implemented by CProjectObject subclasses to cook objects.

Parameters
dataAppendersubclass calls this function zero or more times to provide cooked-data linearly
endiannessbyte-order to target
platformdata-formats to target
Returns
true if cook succeeded

This method is called during IProject::cookPath(). Part of the cooking process may include embedding database-refs to dependencies. This method should store the 64-bit value provided by IDataObject::id() when doing this.

virtual void HECL::Database::ObjectBase::_gatherDeps ( FDepAdder  depAdder)
inlineprotectedvirtual

Optional private method implemented by CProjectObject subclasses to resolve dependencies.

Parameters
depAddersubclass calls this function zero or more times to register each dependency

This method is called during IProject::packagePath(). Dependencies registered via this method will eventually have this method called on themselves as well. This is a non-recursive operation, no need for subclasses to implement recursion-control.


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