Edit: /usr/include/luabind/class.hpp (27490B)
// Copyright (c) 2003 Daniel Wallin and Arvid Norberg
// 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.
#ifndef LUABIND_CLASS_HPP_INCLUDED
#define LUABIND_CLASS_HPP_INCLUDED
/*
ISSUES:
------------------------------------------------------
* solved for member functions, not application operator *
if we have a base class that defines a function a derived class must be able to
override that function (not just overload). Right now we just add the other overload
to the overloads list and will probably get an ambiguity. If we want to support this
each method_rep must include a vector of type_info pointers for each parameter.
Operators do not have this problem, since operators always have to have
it's own type as one of the arguments, no ambiguity can occur. Application
operator, on the other hand, would have this problem.
Properties cannot be overloaded, so they should always be overridden.
If this is to work for application operator, we really need to specify if an application
operator is const or not.
If one class registers two functions with the same name and the same
signature, there's currently no error. The last registered function will
be the one that's used.
How do we know which class registered the function? If the function was
defined by the base class, it is a legal operation, to override it.
we cannot look at the pointer offset, since it always will be zero for one of the bases.
TODO:
------------------------------------------------------
finish smart pointer support
* the adopt policy should not be able to adopt pointers to held_types. This
must be prohibited.
* name_of_type must recognize holder_types and not return "custom"
document custom policies, custom converters
store the instance object for policies.
support the __concat metamethod. This is a bit tricky, since it cannot be
treated as a normal operator. It is a binary operator but we want to use the
__tostring implementation for both arguments.
*/
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include