Cogs.Core
Public Member Functions | Static Public Member Functions | Public Attributes | Static Public Attributes | List of all members
Cogs::Core::SeaCurrentsExtension Struct Reference
Inheritance diagram for Cogs::Core::SeaCurrentsExtension:
Cogs::Core::Extension

Public Member Functions

virtual bool initializeStatic () override
 Initialize extension statically.
 
virtual const char * getExtensionKey () const override
 Get the extensions unique key, used to check for extension presence and retrieve extension specific data from the context.
 
virtual const void * getPublicAPI () const override
 Retrieve a pointer to a struct containing all publicly available function pointers.
 
virtual bool initialize (Context *context) override
 Initialize extension for the given context.
 
template<>
std::string readAttribute (hid_t ownerId, const StringView &name)
 
template<>
hid_t getTypeId ()
 
template<>
hid_t getTypeId ()
 
template<>
hid_t getTypeId ()
 
template<>
hid_t getTypeId ()
 
- Public Member Functions inherited from Cogs::Core::Extension
virtual bool initializeStatic ()
 Initialize extension statically.
 
virtual bool initialize (Context *)
 Initialize extension for the given context.
 
virtual void cleanup (Context *)
 Cleanup context bound extension content.
 
virtual const char * getExtensionKey () const =0
 Get the extensions unique key, used to check for extension presence and retrieve extension specific data from the context.
 
virtual void * getSymbolPointer (const char *) const
 Get pointer to symbol defined by extension.
 
virtual const void * getPublicAPI () const
 Retrieve a pointer to a struct containing all publicly available function pointers.
 

Static Public Member Functions

static bool loadFromMemory (void *ctx, EntityId entityId, const char *extension, void *data, size_t dataSize, uint64_t timestamp, int utmZone=-1)
 
static bool loadFromFile (void *context, EntityId entityId, const char *filename, uint64_t timestamp, int utmZone=-1)
 
template<typename T >
static T readAttribute (hid_t ownerId, const StringView &name)
 
template<typename T >
static hid_t getTypeId ()
 

Public Attributes

SeaCurrentsModuleAPI api
 

Static Public Attributes

static constexpr const char * cExtensionKey = "SeaCurrents"
 

Detailed Description

Definition at line 57 of file SeaCurrentsExtension.cpp.

Constructor & Destructor Documentation

◆ SeaCurrentsExtension()

Cogs::Core::SeaCurrentsExtension::SeaCurrentsExtension ( )
inline

Definition at line 68 of file SeaCurrentsExtension.cpp.

Member Function Documentation

◆ getExtensionKey()

virtual const char * Cogs::Core::SeaCurrentsExtension::getExtensionKey ( ) const
inlineoverridevirtual

Get the extensions unique key, used to check for extension presence and retrieve extension specific data from the context.

Returns
Pointer to a null-terminated string containing the name of the extension.

Implements Cogs::Core::Extension.

Definition at line 75 of file SeaCurrentsExtension.cpp.

◆ getPublicAPI()

virtual const void * Cogs::Core::SeaCurrentsExtension::getPublicAPI ( ) const
inlineoverridevirtual

Retrieve a pointer to a struct containing all publicly available function pointers.

The returned pointer should be cast to the structure type defined by the extension.

Reimplemented from Cogs::Core::Extension.

Definition at line 76 of file SeaCurrentsExtension.cpp.

◆ getTypeId() [1/5]

template<typename T >
static hid_t Cogs::Core::SeaCurrentsExtension::getTypeId ( )
inlinestatic

Definition at line 392 of file SeaCurrentsExtension.cpp.

◆ getTypeId() [2/5]

template<>
hid_t Cogs::Core::SeaCurrentsExtension::getTypeId ( )
inline

Definition at line 393 of file SeaCurrentsExtension.cpp.

◆ getTypeId() [3/5]

template<>
hid_t Cogs::Core::SeaCurrentsExtension::getTypeId ( )
inline

Definition at line 394 of file SeaCurrentsExtension.cpp.

◆ getTypeId() [4/5]

template<>
hid_t Cogs::Core::SeaCurrentsExtension::getTypeId ( )
inline

Definition at line 395 of file SeaCurrentsExtension.cpp.

◆ getTypeId() [5/5]

template<>
hid_t Cogs::Core::SeaCurrentsExtension::getTypeId ( )
inline

Definition at line 396 of file SeaCurrentsExtension.cpp.

◆ initialize()

virtual bool Cogs::Core::SeaCurrentsExtension::initialize ( Context )
inlineoverridevirtual

Initialize extension for the given context.

Override this method to provide context bound initialization. This can for example be registering entity definitions in the entity store, creating component systems in the context, or other per context tasks.

Parameters
contextContext currently being initialized.

Reimplemented from Cogs::Core::Extension.

Definition at line 78 of file SeaCurrentsExtension.cpp.

References Cogs::Core::SystemPriority::Geometry, Cogs::Core::Context::resourceStore, and Cogs::Core::Context::store.

◆ initializeStatic()

virtual bool Cogs::Core::SeaCurrentsExtension::initializeStatic ( )
inlineoverridevirtual

Initialize extension statically.

Override this method to provide static initialization code. This can for example be filling data tables for later use, registering types in the static type system or other tasks that are only necessary to perform once per application run.

Reimplemented from Cogs::Core::Extension.

Definition at line 70 of file SeaCurrentsExtension.cpp.

◆ loadFromFile()

static bool Cogs::Core::SeaCurrentsExtension::loadFromFile ( void *  context,
EntityId  entityId,
const char *  filename,
uint64_t  timestamp,
int  utmZone = -1 
)
inlinestatic

Definition at line 350 of file SeaCurrentsExtension.cpp.

◆ loadFromMemory()

static bool Cogs::Core::SeaCurrentsExtension::loadFromMemory ( void *  ctx,
EntityId  entityId,
const char *  extension,
void *  data,
size_t  dataSize,
uint64_t  timestamp,
int  utmZone = -1 
)
inlinestatic

Definition at line 111 of file SeaCurrentsExtension.cpp.

◆ readAttribute() [1/2]

template<typename T >
static T Cogs::Core::SeaCurrentsExtension::readAttribute ( hid_t  ownerId,
const StringView name 
)
inlinestatic

Definition at line 359 of file SeaCurrentsExtension.cpp.

◆ readAttribute() [2/2]

template<>
std::string Cogs::Core::SeaCurrentsExtension::readAttribute ( hid_t  ownerId,
const StringView name 
)
inline

Definition at line 374 of file SeaCurrentsExtension.cpp.

Member Data Documentation

◆ api

SeaCurrentsModuleAPI Cogs::Core::SeaCurrentsExtension::api
Initial value:
= {
reinterpret_cast<LoadFromMemoryFn>(&SeaCurrentsExtension::loadFromMemory),
reinterpret_cast<LoadFromFileFn>(&SeaCurrentsExtension::loadFromFile),
nullptr,
nullptr,
}

Definition at line 61 of file SeaCurrentsExtension.cpp.

◆ cExtensionKey

constexpr const char* Cogs::Core::SeaCurrentsExtension::cExtensionKey = "SeaCurrents"
staticconstexpr

Definition at line 59 of file SeaCurrentsExtension.cpp.


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