CrystalSpace

Public API Reference

Main Page   Modules   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

scf.h File Reference

Crystal Space Shared Class Facility (SCF). More...

#include "csutil/ref.h"

Go to the source code of this file.

Compounds

struct  iBase
 This is the basic interface: all other interfaces should be derived from this one, this will allow us to always use at least some minimal functionality given any interface pointer. More...

struct  scfClassInfo
 The shared library loader expects an array of such structures to be exported from each shared library. More...

struct  iFactory
 iFactory is a interface that is used to create instances of shared classes. More...

struct  iSCF
 iSCF is the interface that allows using SCF functions from shared classes. More...


Defines

#define SCF_TRACE(x)
 Macro for typing debug strings: Add define SCF_DEBUG at the top of modules you want to track miscelaneous SCF activity and recompile. More...

#define SCF_PRINT_CALL_ADDRESS
 Macro for getting the address we were called from (stack backtracing). More...

#define SCF_CONSTRUCT_VERSION(Major, Minor, Micro)   ((Major << 24) | (Minor << 16) | Micro)
 Use this macro to construct interface version numbers. More...

#define SCF_INC_REF(ptr)   {if (ptr) {ptr->IncRef();}}
 This macro should make use of IncRef() safer. More...

#define SCF_DEC_REF(ptr)   {if (ptr) {ptr->DecRef();}}
 This macro should make use of DecRef() safer. More...

#define SCF_SET_REF(var, ref)
 This macro should be used to change the reference inside a variable. More...

#define SCF_DECLARE_IBASE
 This macro should be embedded into any SCF-capable class definition to declare the minimal functionality required by iBase interface. More...

#define SCF_DECLARE_EMBEDDED_IBASE(OuterClass)
 SCF_DECLARE_EMBEDDED_IBASE is used to declare the methods of iBase inside an embedded class that is exposed via QueryInterface... More...

#define SCF_CONSTRUCT_IBASE(Parent)   scfRefCount = 1; scfParent = Parent; if (scfParent) scfParent->IncRef();
 The SCF_CONSTRUCT_IBASE macro should be invoked inside the constructor of an exported class (not inside an embedded interface). More...

#define SCF_CONSTRUCT_EMBEDDED_IBASE(Interface)   Interface.scfParent = this;
 The SCF_CONSTRUCT_EMBEDDED_IBASE macro should be invoked inside the constructor of an exported class that has exported embedded interfaces (not inside the constructor of the embedded interface). More...

#define SCF_IMPLEMENT_IBASE_INCREF(Class)
 The SCF_IMPLEMENT_IBASE_INCREF() macro implements the IncRef() method for a class in a C++ source module. More...

#define SCF_IMPLEMENT_IBASE_DECREF(Class)
 The SCF_IMPLEMENT_IBASE_DECREF() macro implements the DecRef() method for a class in a C++ source module. More...

#define SCF_IMPLEMENT_IBASE_GETREFCOUNT(Class)
 The SCF_IMPLEMENT_IBASE_GETREFCOUNT() macro implements GetRefCount() for a class in a C++ source module. More...

#define SCF_IMPLEMENT_IBASE_QUERY(Class)
 The SCF_IMPLEMENT_IBASE_QUERY() macro implements the opening boilerplate for the QueryInterface() method for a class in a C++ source module. More...

#define SCF_IMPLEMENT_IBASE_QUERY_END
 The SCF_IMPLEMENT_IBASE_QUERY_END macro implements the closing boilerplate for the QueryInterface() method for a class in a C++ source module. More...

#define SCF_IMPLEMENT_IBASE(Class)
 The SCF_IMPLEMENT_IBASE() macro should be used within the C++ source module that implements a interface derived from iBase. More...

#define SCF_IMPLEMENT_IBASE_END   SCF_IMPLEMENT_IBASE_QUERY_END
 The SCF_IMPLEMENT_IBASE_END macro is used to finish an SCF_IMPLEMENT_IBASE definition. More...

#define SCF_IMPLEMENT_EMBEDDED_IBASE_INCREF(Class)
 The SCF_IMPLEMENT_EMBEDDED_IBASE_INCREF() macro implements the IncRef() method for an embedded class in a C++ source module. More...

#define SCF_IMPLEMENT_EMBEDDED_IBASE_DECREF(Class)
 The SCF_IMPLEMENT_EMBEDDED_IBASE_DECREF() macro implements the DecRef() method for an embedded class in a C++ source module. More...

#define SCF_IMPLEMENT_EMBEDDED_IBASE_GETREFCOUNT(Class)
 The SCF_IMPLEMENT_EMBEDDED_IBASE_GETREFCOUNT() macro implements the GetRefCount() method for an embedded class in a C++ source module. More...

#define SCF_IMPLEMENT_EMBEDDED_IBASE_QUERY(Class)
 The SCF_IMPLEMENT_EMBEDDED_IBASE_QUERY() macro implements the opening boilerplate for the QueryInterface() method for an embedded class in a C++ source module. More...

#define SCF_IMPLEMENT_EMBEDDED_IBASE_QUERY_END
 The SCF_IMPLEMENT_EMBEDDED_IBASE_QUERY_END macro implements the closing boilerplate for the QueryInterface() method for a class in an embedded C++ source module. More...

#define SCF_IMPLEMENT_EMBEDDED_IBASE(Class)
 SCF_IMPLEMENT_EMBEDDED_IBASE should be used to implement embedded interfaces derived from iBase. More...

#define SCF_IMPLEMENT_EMBEDDED_IBASE_END   SCF_IMPLEMENT_EMBEDDED_IBASE_QUERY_END
 The SCF_IMPLEMENT_EMBEDDED_IBASE_END macro is used to finish an SCF_IMPLEMENT_EMBEDDED_IBASE definition. More...

#define SCF_IMPLEMENTS_INTERFACE(Interface)   SCF_IMPLEMENTS_INTERFACE_COMMON (Interface, this)
 The IMPLEMENT_INTERFACE macro is used inside QueryInterface function to check if user requested a specific interface, whenever requested version of the interface correspond to the version we have and to return a pointer to that interface if everything is correct. More...

#define SCF_IMPLEMENTS_EMBEDDED_INTERFACE(Interface)   SCF_IMPLEMENTS_INTERFACE_COMMON (Interface, (&scf##Interface))
 IMPLEMENT_EMBEDDED_INTERFACE is same as IMPLEMENT_INTERFACE but is used when class implements the interface as an embedded member. More...

#define SCF_IMPLEMENTS_INTERFACE_COMMON(Interface, Object)
 This is a common macro used in all IMPLEMENTS_XXX_INTERFACE macros. More...

#define SCF_DECLARE_IBASE_EXT(ParentClass)
 The following macro is used in "expansion SCF classes". More...

#define SCF_IMPLEMENT_IBASE_EXT_INCREF(Class)
 The SCF_IMPLEMENT_IBASE_EXT_INCREF() macro implements the IncRef() method for a class extending another SCF class in a C++ source module. More...

#define SCF_IMPLEMENT_IBASE_EXT_DECREF(Class)
 The SCF_IMPLEMENT_IBASE_EXT_DECREF() macro implements the DecRef() method for a class extending another SCF class in a C++ source module. More...

#define SCF_IMPLEMENT_IBASE_EXT_GETREFCOUNT(Class)
 The SCF_IMPLEMENT_IBASE_EXT_GETREFCOUNT() macro implements the GetRefCount() method for a class extending another SCF class in a C++ source module. More...

#define SCF_IMPLEMENT_IBASE_EXT_QUERY(Class)
 The SCF_IMPLEMENT_IBASE_EXT_QUERY() macro implements the opening boilerplate for the QueryInterface() method for a class extending another SCF class in a C++ source module. More...

#define SCF_IMPLEMENT_IBASE_EXT_QUERY_END
 The SCF_IMPLEMENT_IBASE_EXT_QUERY_END macro implements the closing boilerplate for the QueryInterface() method for a class extending another SCF class in a C++ source module. More...

#define SCF_IMPLEMENT_IBASE_EXT(Class)
 This macro implements same functionality as SCF_IMPLEMENT_IBASE except that it should be used for expansion SCF classes. More...

#define SCF_IMPLEMENT_IBASE_EXT_END   SCF_IMPLEMENT_IBASE_EXT_QUERY_END
 This macro implements same functionality as SCF_IMPLEMENT_IBASE_END except that it is used for expansion SCF classes. More...

#define SCF_IMPLEMENT_FACTORY(Class)
 The SCF_IMPLEMENT_FACTORY macro is used to define a factory for one of exported classes. More...

#define SCF_DECLARE_FACTORY(Class)   void* Class##_Create (iBase *iParent);
 The SCF_DECLARE_FACTORY macro is used to provide a forward definition if SCF_IMPLEMENT_FACTORY is declared in another file. More...

#define SCF_EXPORT_CLASS_TABLE(LibraryName)
 Define the start of class export table. More...

#define SCF_EXPORT_CLASS(Class, ClassID, Description)   { ClassID, Description, NULL, Class##_Create },
 Add information about a exported class into the table. More...

#define SCF_EXPORT_CLASS_DEP(Class, ClassID, Description, Dependencies)   { ClassID, Description, Dependencies, Class##_Create },
 Add information about an exported class and dependency info into table. More...

#define SCF_EXPORT_CLASS_TABLE_END
 Finish the definition of exported class table. More...

#define SCF_REGISTER_STATIC_LIBRARY(LibraryName)
 Automatically register a static library with SCF during startup. More...

#define SCF_REGISTER_STATIC_CLASS(Class, ClassID, Description)   SCF_REGISTER_STATIC_CLASS_DEP (Class,ClassID,Description,NULL);
 This macro is similar to SCF_REGISTER_STATIC_LIBRARY, but registers a single class. More...

#define SCF_REGISTER_STATIC_CLASS_DEP(Class, ClassID, Description, Dependency)
 This is similar to SCF_REGISTER_STATIC_CLASS except that you can provide an additional argument specifying the class dependencies. More...

#define SCF_CREATE_INSTANCE(ClassID, Interface)
 Handy macro to create an instance of a shared class. More...

#define SCF_VERSION(Name, Major, Minor, Micro)
 SCF_VERSION can be used as a shorter way to define an interface version; you should specify interface name and major, minor and micro version components. More...

#define SCF_QUERY_INTERFACE(Object, Interface)
 Shortcut macro to query given interface from given object. More...

#define SCF_QUERY_INTERFACE_SAFE(Object, Interface)
 Shortcut macro to query given interface from given object. More...


Typedefs

typedef uint32 scfInterfaceID
 Type of registered interface handle used by iBase::QueryInterface(). More...


Functions

void scfInitialize (iConfigFile *iConfig=0)
 This function should be called to initialize client SCF library. More...

bool scfCompatibleVersion (int iVersion, int iItfVersion)
 This function checks whenever an interface is compatible with given version. More...


Detailed Description

Crystal Space Shared Class Facility (SCF).

Definition in file scf.h.


Generated for Crystal Space by doxygen 1.2.14