1 //------------------------------------------------------------------------------
3 https://github.com/vinniefalco/LuaBridge
5 Copyright 2012, Vinnie Falco <vinnie.falco@gmail.com>
7 License: The MIT License (http://www.opensource.org/licenses/mit-license.php)
9 Permission is hereby granted, free of charge, to any person obtaining a copy
10 of this software and associated documentation files (the "Software"), to deal
11 in the Software without restriction, including without limitation the rights
12 to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
13 copies of the Software, and to permit persons to whom the Software is
14 furnished to do so, subject to the following conditions:
16 The above copyright notice and this permission notice shall be included in all
17 copies or substantial portions of the Software.
19 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
22 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
23 LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
24 OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
27 //==============================================================================
29 /** Unique Lua registry keys for a class.
31 Each registered class inserts three keys into the registry, whose
32 values are the corresponding static, class, and const metatables. This
33 allows a quick and reliable lookup for a metatable from a template type.
39 #ifdef PLATFORM_WINDOWS
40 /* static symbols on windows (even identical symbols) are not
41 * mapped to the same address when mixing .dll + .exe.
42 * the implementation is moved to libardour/gtk2_ardour.
44 static void const* getStaticKey ();
45 static void const* getClassKey ();
46 static void const* getConstKey ();
48 /** Get the key for the static table.
50 The static table holds the static data members, static properties, and
51 static member functions for a class.
53 static void const* getStaticKey ()
59 /** Get the key for the class table.
61 The class table holds the data members, properties, and member functions
62 of a class. Read-only data and properties, and const member functions are
63 also placed here (to save a lookup in the const table).
65 static void const* getClassKey ()
71 /** Get the key for the const table.
73 The const table holds read-only data members and properties, and const
74 member functions of a class.
76 static void const* getConstKey ()