Torque 3D 3.8
ContentsIndexHome
PreviousUpNext
engineAPI.h

Copyright (c) 2012 GarageGames, LLC 

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Name 
Description 
This is macro _CHECK_ENGINE_INITIALIZED. 
Helpers to implement initialization checks. Pulled out into separate macros so this can be deactivated easily. Especially important for the initialize() function itself. 
The next thing is a bit tricky. DefineEngineMethod allows to make the 'object' (=this) argument to the function implicit which presents quite an obstacle for the macro internals as the engine export system requires the name of a DLL symbol that represents an extern "C" function with an explicit first object pointer argument.
Even if we ignored the fact that we don't have a guarantee how the various C++ compilers implement implicit 'this' arguments, we could still not just use a C++ method for this as then we would have to get past the C++ compiler's mangling to get to... more 
This is macro _ENGINEAPI_H_. 
Convenience macros to allow defining functions that use the new marshalling features while being only visible in the console interop. When we drop the console system, these macros can be removed and all definitions that make use of them can be removed as well. 
This is macro DefineConsoleMethod. 
This is macro DefineConsoleStaticMethod. 
Define a call-in point for calling into the engine.
@param name The name of the function as it should be seen by the control layer. @param returnType The value type returned to the control layer. @param args The argument list as it would appear on the function definition @param defaultArgs The list of default argument values. @param usage The usage doc string for the engine API reference.
@code DefineEngineFunction( myFunction, int, ( float f, const String& s ), ( "value for s" ), "This is my function." ) { return int( f )... more 
Define a call-in point for calling a method on an engine object.
@param name The name of the C++ class. @param name The name of the method as it should be seen by the control layer. @param returnType The value type returned to the control layer. @param args The argument list as it would appear on the function definition @param defaultArgs The list of default argument values. @param usage The usage doc string for the engine API reference.
@code DefineEngineMethod( MyClass, myMethod, int, ( float f, const String& s ), ( "value... more 
Define a call-in point for calling into the engine. Unlike with DefineEngineFunction, the statically callable function will be confined to the namespace of the given class.
@param name The name of the C++ class (or a registered export scope). @param name The name of the method as it should be seen by the control layer. @param returnType The value type returned to the control layer. @param args The argument list as it would appear on the function definition @param defaultArgs The list of default argument values. @param usage The usage doc string for... more 
The following three macros are only temporary. They allow to define engineAPI functions using the framework here in this file while being visible only in the new API. When the console interop is removed, these macros can be removed and all their uses be replaced with their corresponding versions that now still include support for the console (e.g. DefineNewEngineFunction should become DefineEngineFunction). 
This is macro DefineNewEngineMethod. 
This is macro DefineNewEngineStaticMethod. 
Matching implement for DECLARE_CALLBACK.
@warn With the new interop system, method-style callbacks must notbe triggered on object that are being created! This is because the control layer will likely not yet have a fully valid wrapper object in place for the EngineObject under construction. 
Again, temporary macros to allow splicing the API while we still have the console interop around. 
Used to define global callbacks not associated with any particular class or namespace. 
This is macro IMPLEMENT_NEW_CALLBACK. 
Name 
Description 
can never be instantiated; again Args is never constructed by us 
 
Name 
Description 
 
Internal helper for callback support in legacy console system. 
 
Internal helper class for doing call-outs in the new interop. 
 
Base helper for console callbacks 
 
Override for when first parameter is presumably a SimObject*, in which case A will be absorbed as the callback 
 
Override for when first parameter is const char 
 
Encapsulation of a legacy console function invocation. 
 
This is class _EngineConsoleThunk< startArgc, R( A ) >. 
 
This is class _EngineConsoleThunk< startArgc, R( A, B ) >. 
 
This is class _EngineConsoleThunk< startArgc, R( A, B, C ) >. 
 
This is class _EngineConsoleThunk< startArgc, R( A, B, C, D ) >. 
 
This is class _EngineConsoleThunk< startArgc, R( A, B, C, D, E ) >. 
 
This is class _EngineConsoleThunk< startArgc, R( A, B, C, D, E, F ) >. 
 
This is class _EngineConsoleThunk< startArgc, R( A, B, C, D, E, F, G ) >. 
 
This is class _EngineConsoleThunk< startArgc, R( A, B, C, D, E, F, G, H ) >. 
 
This is class _EngineConsoleThunk< startArgc, R( A, B, C, D, E, F, G, H, I ) >. 
 
This is class _EngineConsoleThunk< startArgc, R( A, B, C, D, E, F, G, H, I, J ) >. 
 
This is class _EngineConsoleThunk< startArgc, R( A, B, C, D, E, F, G, H, I, J, K ) >. 
 
This is class _EngineConsoleThunk< startArgc, R( A, B, C, D, E, F, G, H, I, J, K, L ) >. 
 
This is class _EngineConsoleThunk< startArgc, R() >. 
 
This is class _EngineConsoleThunk< startArgc, void( A ) >. 
 
This is class _EngineConsoleThunk< startArgc, void( A, B ) >. 
 
This is class _EngineConsoleThunk< startArgc, void( A, B, C ) >. 
 
This is class _EngineConsoleThunk< startArgc, void( A, B, C, D ) >. 
 
This is class _EngineConsoleThunk< startArgc, void( A, B, C, D, E ) >. 
 
This is class _EngineConsoleThunk< startArgc, void( A, B, C, D, E, F ) >. 
 
This is class _EngineConsoleThunk< startArgc, void( A, B, C, D, E, F, G ) >. 
 
This is class _EngineConsoleThunk< startArgc, void( A, B, C, D, E, F, G, H ) >. 
 
This is class _EngineConsoleThunk< startArgc, void( A, B, C, D, E, F, G, H, I ) >. 
 
This is class _EngineConsoleThunk< startArgc, void( A, B, C, D, E, F, G, H, I, J ) >. 
 
This is class _EngineConsoleThunk< startArgc, void( A, B, C, D, E, F, G, H, I, J, K ) >. 
 
This is class _EngineConsoleThunk< startArgc, void( A, B, C, D, E, F, G, H, I, J, K, L ) >. 
 
This is class _EngineConsoleThunk< startArgc, void() >. 
 
Helper struct to count the number of parameters in a function list. The setup through operator () allows omitting the the argument list entirely. 
 
Helper class to determine the type of callback registered with the console system. 
 
This is class _EngineConsoleThunkType< bool >. 
 
This is class _EngineConsoleThunkType< F32 >. 
 
This is class _EngineConsoleThunkType< S32 >. 
 
This is class _EngineConsoleThunkType< U32 >. 
 
This is class _EngineConsoleThunkType< void >. 
 
Trampolines for any call-ins that aren't methods. 
 
This is class _EngineFunctionTrampoline< R( A ) >. 
 
This is class _EngineFunctionTrampoline< R( A, B ) >. 
 
This is class _EngineFunctionTrampoline< R( A, B, C ) >. 
 
This is class _EngineFunctionTrampoline< R( A, B, C, D ) >. 
 
This is class _EngineFunctionTrampoline< R( A, B, C, D, E ) >. 
 
This is class _EngineFunctionTrampoline< R( A, B, C, D, E, F ) >. 
 
This is class _EngineFunctionTrampoline< R( A, B, C, D, E, F, G ) >. 
 
This is class _EngineFunctionTrampoline< R( A, B, C, D, E, F, G, H ) >. 
 
This is class _EngineFunctionTrampoline< R( A, B, C, D, E, F, G, H, I ) >. 
 
This is class _EngineFunctionTrampoline< R( A, B, C, D, E, F, G, H, I, J ) >. 
 
This is class _EngineFunctionTrampoline< R( A, B, C, D, E, F, G, H, I, J, K ) >. 
 
This is class _EngineFunctionTrampoline< R( A, B, C, D, E, F, G, H, I, J, K, L ) >. 
 
This is class _EngineFunctionTrampoline< R() >. 
 
This is class _EngineFunctionTrampolineBase. 
 
This is record _EngineMethodTrampoline. 
 
This is class _EngineMethodTrampoline< Frame, R( A ) >. 
 
This is class _EngineMethodTrampoline< Frame, R( A, B ) >. 
 
This is class _EngineMethodTrampoline< Frame, R( A, B, C ) >. 
 
This is class _EngineMethodTrampoline< Frame, R( A, B, C, D ) >. 
 
This is class _EngineMethodTrampoline< Frame, R( A, B, C, D, E ) >. 
 
This is class _EngineMethodTrampoline< Frame, R( A, B, C, D, E, F ) >. 
 
This is class _EngineMethodTrampoline< Frame, R( A, B, C, D, E, F, G ) >. 
 
This is class _EngineMethodTrampoline< Frame, R( A, B, C, D, E, F, G, H ) >. 
 
This is class _EngineMethodTrampoline< Frame, R( A, B, C, D, E, F, G, H, I ) >. 
 
This is class _EngineMethodTrampoline< Frame, R( A, B, C, D, E, F, G, H, I, J ) >. 
 
This is class _EngineMethodTrampoline< Frame, R( A, B, C, D, E, F, G, H, I, J, K ) >. 
 
This is class _EngineMethodTrampoline< Frame, R( A, B, C, D, E, F, G, H, I, J, K, L ) >. 
 
This is class _EngineMethodTrampoline< Frame, R() >. 
 
Trampolines for engine methods 
 
Helper type to factor out commonalities between function and method trampolines. 
 
This is class _EngineTrampoline< R( A ) >. 
 
This is class _EngineTrampoline< R( A, B ) >. 
 
This is class _EngineTrampoline< R( A, B, C ) >. 
 
This is class _EngineTrampoline< R( A, B, C, D ) >. 
 
This is class _EngineTrampoline< R( A, B, C, D, E ) >. 
 
This is class _EngineTrampoline< R( A, B, C, D, E, F ) >. 
 
This is class _EngineTrampoline< R( A, B, C, D, E, F, G ) >. 
 
This is class _EngineTrampoline< R( A, B, C, D, E, F, G, H ) >. 
 
This is class _EngineTrampoline< R( A, B, C, D, E, F, G, H, I ) >. 
 
This is class _EngineTrampoline< R( A, B, C, D, E, F, G, H, I, J ) >. 
 
This is class _EngineTrampoline< R( A, B, C, D, E, F, G, H, I, J, K ) >. 
 
This is class _EngineTrampoline< R( A, B, C, D, E, F, G, H, I, J, K, L ) >. 
 
Temp support for allowing const char* to remain in the API functions as long as we still have the console system around. When that is purged, these definitions should be deleted and all const char* uses be replaced with String
 
Unmarshal data from client form to engine form.
This is wrapped in an a struct as partial specializations on function templates are not allowed in C++. 
 
This is class EngineUnmarshallData< ConsoleValueRef >. 
 
This is class EngineUnmarshallData< const char* >. 
 
This is class EngineUnmarshallData< F32 >. 
 
This is class EngineUnmarshallData< S32 >. 
 
This is class EngineUnmarshallData< T* >. 
 
This is class EngineUnmarshallData< U32 >. 
 
This is class EngineUnmarshallData< U8 >. 
 
This is class EngineUnmarshallData< void >. 
Copyright (c) 2015. All rights reserved.
What do you think about this topic? Send feedback!