ContRap-Core
|
This file contains the definition included by plugins. More...
#include <string>
#include "core/contrap.h"
#include "core/stringtools.h"
Namespaces | |
namespace | crp |
The namespace crp is the namespace for all ContRap core components and libraries. | |
Defines | |
#define | CONTRAP_SUBST_(a, b, c) a ## b ## c |
Defines a wrapper for writing library info variables. | |
#define | CONTRAP_SUBST(a, b, c) CONTRAP_SUBST_(a,b,c) |
#define | CONTRAP_LIBRARY_INFO CONTRAP_SUBST(_,CONTRAP_LIBRARY_NAME,_info) |
#define | CONTRAP_LIBRARY_INFO_FUNCTION CONTRAP_SUBST(get_,CONTRAP_LIBRARY_NAME,_info) |
#define | CS_(a) #a |
#define | CS(a) CS_(a) |
#define | CONTRAP_INIT(code) static bool init = CONTRAP_LIBRARY_INFO_FUNCTION()->set_value(":library:init:code",code); |
Defines the init code for the library. | |
#define | CONTRAP_EXTENDS(base_class, super_class) |
Defines a class extension of a class. | |
#define | CONTRAP_DEPENDS(...) |
Functions | |
SO_EXPORT crp::XMLDataPool * | CONTRAP_LIBRARY_INFO_FUNCTION () |
CONTRAP_CORE_API bool | crp::add_extend (XMLDataPool *pool, const std::string &base_class, const std::string &super_class) |
Adds a class extend definition. |
This file contains the definition included by plugins.
This file is a part of ContRap.
Copyright (c) 2009-2011 by Aless Lasaruk. All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
Neither the name of ContRap nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#define CONTRAP_DEPENDS | ( | ... | ) |
#define CONTRAP_EXTENDS | ( | base_class, | |
super_class | |||
) |
static bool _exports_ ## base_class = \ crp::add_extend(CONTRAP_LIBRARY_INFO_FUNCTION(), # base_class, # super_class);
Defines a class extension of a class.
base_class | Base class where you want to add a new super class |
super_class | A new super class for this base class |
#define CONTRAP_INIT | ( | code | ) | static bool init = CONTRAP_LIBRARY_INFO_FUNCTION()->set_value(":library:init:code",code); |
Defines the init code for the library.
To reduce confusion this definition can only be written once per library.
code | Init code of the library |
#define CONTRAP_LIBRARY_INFO CONTRAP_SUBST(_,CONTRAP_LIBRARY_NAME,_info) |
#define CONTRAP_LIBRARY_INFO_FUNCTION CONTRAP_SUBST(get_,CONTRAP_LIBRARY_NAME,_info) |
#define CONTRAP_SUBST | ( | a, | |
b, | |||
c | |||
) | CONTRAP_SUBST_(a,b,c) |
#define CONTRAP_SUBST_ | ( | a, | |
b, | |||
c | |||
) | a ## b ## c |
Defines a wrapper for writing library info variables.
#define CS | ( | a | ) | CS_(a) |
#define CS_ | ( | a | ) | #a |
SO_EXPORT crp::XMLDataPool* CONTRAP_LIBRARY_INFO_FUNCTION | ( | ) |