1/* object.asc -- written by Alexis WILKE for Made to Order Software Corp. (c) 2005-2009 */ 2 3/* 4 5Copyright (c) 2005-2009 Made to Order Software Corp. 6 7Permission is hereby granted, free of charge, to any 8person obtaining a copy of this software and 9associated documentation files (the "Software"), to 10deal in the Software without restriction, including 11without limitation the rights to use, copy, modify, 12merge, publish, distribute, sublicense, and/or sell 13copies of the Software, and to permit persons to whom 14the Software is furnished to do so, subject to the 15following conditions: 16 17The above copyright notice and this permission notice 18shall be included in all copies or substantial 19portions of the Software. 20 21THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF 22ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT 23LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 24FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO 25EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 26LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 27WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 28ARISING FROM, OUT OF OR IN CONNECTION WITH THE 29SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 30SOFTWARE. 31 32*/ 33 34 35intrinsic package Global 36{ 37 // This is the root to all the other objects 38 // Note that all the other objects, even when they don't specify 39 // 'extend Object' they are anyway derived from this class. 40 dynamic class Object 41 { 42 function Object(unchecked value : Object) : Void; 43 function addProperty(property : String, get_function : function() : Object, set_function : function(value : Object) : Void) : Boolean; 44 function registerClass(symbol : String, constructor : function() : Object) : Void; 45 function unwatch(property : String) : Boolean; 46 function watch(property : String, callback : function(property : String, old_value : Object, new_value : Object, user_data : Object) : Object, unchecked user_data : Object) : Boolean; 47 48 function toString(Void) : String; 49 function valueOf(Void) : Object; 50 51 var __proto__ : Object; 52 var __resolve : function(name : String) : Void; 53 var constructor : function(Void) : Void; 54 } 55 56 // The special 'Void', 'undefined' & 'null' objects 57 // These are lexer specific objects so we can't declare them here 58 // but the following is what it would look like: 59 //class Void; 60 //var undefined : Object; 61 //var null : Object; 62 63 var _global : Object; 64} 65 66 67