GL Studio C++ Runtime API
|
Defines templated metadata classes for DisplayObjects and other uses. More...
#include "disti_metadata.h"
#include <limits.h>
#include <sstream>
#include <stdlib.h>
#include <cctype>
#include "gls_include.h"
#include "display.h"
#include "dynamic_array.h"
#include "list.h"
#include "material.h"
#include "util.h"
#include "vertex.h"
#include <assert.h>
#include <stdarg.h>
#include <string.h>
Go to the source code of this file.
Namespaces | |
disti | |
Macros | |
#define | DISTI_REGISTER_METHOD_CALLBACK(instance, Class, Method) |
#define | DISTI_SET_OBJECT_CALLBACK1(object, method, parent) |
#define | DISTI_ADD_ATTRIBUTE(Type, name, memberVarAddr) |
#define | DISTI_ADD_ATTRIBUTE_CALLBACK(Type, name, memberVarAddr, callbackFunction) |
#define | DISTI_ADD_ATTRIBUTE_SET_GET(Type, name, setter, getter) |
#define | DISTI_ADD_ATTRIBUTE_STRING(name, memberVarAddr) |
#define | DISTI_ADD_ATTRIBUTE_STRING_CALLBACK(name, memberVarAddr, callbackFunction) |
#define | DISTI_ADD_ATTRIBUTE_ALIAS(aliasName, origName, obj) |
Functions | |
template<typename Type , class Class > | |
DistiAttributeProperty< Class, Type, Type > * | CreateDistiAttributeProperty (const AttributeName &attrName, Class *const obj, const typename DistiAttributeProperty< Class, Type, Type >::SetMethodType setMethod, const typename DistiAttributeProperty< Class, Type, Type >::GetMethodType getMethod=NULL) |
template<typename Type , class Class > | |
DistiAttributeProperty< Class, Type, Type > * | CreateDistiAttributeProperty (const AttributeName &attrName, Class *const obj, const typename DistiAttributeProperty< Class, Type, Type >::SetMethodType setMethod, const typename DistiAttributeProperty< Class, Type, Type >::GetMethodConstType getMethod) |
template<typename Type , class Class > | |
DistiAttributeProperty< Class, Type > * | CreateDistiAttributeProperty (const AttributeName &attrName, Class *const obj, const typename DistiAttributeProperty< Class, Type >::GetMethodConstType getMethod) |
template<typename Type , class Class > | |
DistiAttributeProperty< Class, Type > * | CreateDistiAttributeProperty (const AttributeName &attrName, Class *const obj, const typename DistiAttributeProperty< Class, Type >::GetMethodType getMethod) |
template<typename Type , class Class > | |
DistiAttributeProperty< Class, Type, const Type & > * | CreateDistiAttributeProperty (const AttributeName &attrName, Class *const obj, const typename DistiAttributeProperty< Class, Type, const Type & >::SetMethodType setMethod, const typename DistiAttributeProperty< Class, Type, const Type & >::GetMethodType getMethod=NULL) |
template<typename Type , class Class > | |
DistiAttributeProperty< Class, Type, const Type & > * | CreateDistiAttributeProperty (const AttributeName &attrName, Class *const obj, const typename DistiAttributeProperty< Class, Type, const Type & >::SetMethodType setMethod, const typename DistiAttributeProperty< Class, Type, const Type & >::GetMethodConstType getMethod) |
template<typename GetReturnT , typename SetArgT , class Class > | |
DistiAttributeProperty< Class, GetReturnT, SetArgT > * | CreateDistiAttributeProperty (const AttributeName &attrName, Class *const obj, const typename DistiAttributeProperty< Class, GetReturnT, SetArgT >::SetMethodType setMethod, const typename DistiAttributeProperty< Class, GetReturnT, SetArgT >::GetMethodType getMethod) |
template<class Class > | |
DistiAttributeProperty< Class, Vector, const Vertex &, const Vertex & > * | CreateDistiAttributePropertyVertexToVector (const AttributeName &attrName, Class *const obj, const typename DistiAttributeProperty< Class, Vector, const Vertex &, const Vertex & >::SetMethodType setMethod, const typename DistiAttributeProperty< Class, Vector, const Vertex &, const Vertex & >::GetMethodConstType getMethod) |
Defines templated metadata classes for DisplayObjects and other uses.
Copyright (c) 2017 by The DiSTI Corporation.
11301 Corporate Blvd; Suite 100
Orlando, Florida 32817
USA
All rights reserved.
This Software contains proprietary trade secrets of DiSTI and may not be reproduced, in whole or part, in any form, or by any means of electronic, mechanical, or otherwise, without the written permission of DiSTI. Said permission may be derived through the purchase of applicable DiSTI product licenses which detail the distribution rights of this content and any Derivative Works based on this or other copyrighted DiSTI Software.
NO WARRANTY. THE SOFTWARE IS PROVIDED "AS-IS," WITHOUT WARRANTY OF ANY KIND, AND ANY USE OF THIS SOFTWARE PRODUCT IS AT YOUR OWN RISK. TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW, DISTI AND ITS SUPPLIERS DISCLAIM ALL WARRANTIES AND CONDITIONS, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES AND CONDITIONS OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR PURPOSE, TITLE, AND NON-INFRINGEMENT, WITH REGARD TO THE SOFTWARE.
LIMITATION OF LIABILITY. TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW, IN NO EVENT SHALL DISTI OR ITS SUPPLIERS BE LIABLE FOR ANY SPECIAL, INCIDENTAL, INDIRECT, OR CONSEQUENTIAL DAMAGES WHATSOEVER (INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOSS OF BUSINESS PROFITS, BUSINESS INTERRUPTION, LOSS OF BUSINESS INFORMATION, OR ANY OTHER PECUNIARY LOSS) ARISING OUT OF THE USE OF OR INABILITY TO USE THE SOFTWARE, EVEN IF DISTI HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. DISTI'S ENTIRE LIABILITY AND YOUR EXCLUSIVE REMEDY SHALL NOT EXCEED FIVE DOLLARS (US$5.00).
The aforementioned terms and restrictions are governed by the laws of the State of Florida and the United States of America.
#define DISTI_ADD_ATTRIBUTE | ( | Type, | |
name, | |||
memberVarAddr | |||
) |
A macro for boilerplate code to setup a DisplayObject attribute.
Type | The type of the attribute. |
name | The unique string name identifying the attribute. |
memberVarAddr | A pointer to the member variable of type Type. Can be NULL if no member variable is desired. |
#define DISTI_ADD_ATTRIBUTE_ALIAS | ( | aliasName, | |
origName, | |||
obj | |||
) |
A macro for boilerplate code to setup an alias to an existing DisplayObject attribute.
name | The unique string name identifying the attribute. |
origName | The unique string idenfifying the attribute to create the alias from. |
obj | The object containing the origName attribute. |
#define DISTI_ADD_ATTRIBUTE_CALLBACK | ( | Type, | |
name, | |||
memberVarAddr, | |||
callbackFunction | |||
) |
A macro for boilerplate code to setup a DisplayObject attribute that has a callback function.
Type | The type of the attribute. |
name | The unique string name identifying the attribute. |
memberVarAddr | A pointer to the member variable of type Type. Can be NULL if no member variable is desired. |
callbackFunction | A member function pointer to the function called when this attribute is changed. |
#define DISTI_ADD_ATTRIBUTE_SET_GET | ( | Type, | |
name, | |||
setter, | |||
getter | |||
) |
A macro for boilerplate code to setup a DisplayObject attribute that has a setter and a getter function.
Type | The type of the attribute. |
name | The unique string name identifying the attribute. |
setter | A member function pointer to the setter function (can be NULL) |
getter | A member function pointer to the getter function (can be NULL) |
#define DISTI_ADD_ATTRIBUTE_STRING | ( | name, | |
memberVarAddr | |||
) |
A macro for boilerplate code to setup a string as a DisplayObject attribute.
name | The unique string name identifying the attribute. |
memberVarAddr | A pointer to the member variable of type std::string. Can be NULL if no member variable is desired. |
#define DISTI_ADD_ATTRIBUTE_STRING_CALLBACK | ( | name, | |
memberVarAddr, | |||
callbackFunction | |||
) |
A macro for boilerplate code to setup a string as a DisplayObject attribute with a callback
name | The unique string name identifying the attribute. |
memberVarAddr | A pointer to the member variable of type std::string. Can be NULL if no member variable is desired. |
callbackFunction | The function that gets called when the attribute changes. |
#define DISTI_REGISTER_METHOD_CALLBACK | ( | instance, | |
Class, | |||
Method | |||
) |
A macro for boilerplate code to setup a DisplayObject callback.
instance | The DisplayObject instance. |
Class | The current class name, derived from DisplayObject. |
Method | The class's method name for the callback. // Given a class ScrollList that inherits from DisplayObject...
ScrollList::ScrollList()
{
DISTI_REGISTER_METHOD_CALLBACK( this, &ScrollList::EventCallback );
}
int ScrollList::EventCallback( Group* self, DisplayEvent* ev )
{
// ... event handler code ...
}
|
#define DISTI_SET_OBJECT_CALLBACK1 | ( | object, | |
method, | |||
parent | |||
) |
A macro for boilerplate code to setup a DisplayObject method caller for MethodType 1.
object | The DisplayObject instance. |
method | The method that should be called. |
parent | The parent to the object |