global._pike
Go to the documentation of this file.
1 /* Copyright (C) 2000-2004 Thomas Bopp, Thorsten Hampel, Ludger Merkens
2  *
3  * This program is free software; you can redistribute it and/or modify
4  * it under the terms of the GNU General Public License as published by
5  * the Free Software Foundation; either version 2 of the License, or
6  * (at your option) any later version.
7  *
8  * This program is distributed in the hope that it will be useful,
9  * but WITHOUT ANY WARRANTY; without even the implied warranty of
10  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11  * GNU General Public License for more details.
12  *
13  * You should have received a copy of the GNU General Public License
14  * along with this program; if not, write to the Free Software
15  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
16  *
17  * $Id: global.pike,v 1.1 2008/03/31 13:39:57 exodusd Exp $
18  */
19 #include <macros.h>
20 class global {
21 public:
22 
23 
24 
25 
26  object _Database = 0;
27  object _FileSystem = 0;
28  object _RootRoom = 0;
29  object _GroupAll = 0;
30  object _Security = 0;
31  object _Log = 0;
32  object _Types = 0;
33  object _Initialize = 0;
34 
35 
36 /**
37  * set the global objects
38  *
39  */
40 void __set(array globals)
41 {
42  if ( objectp(_Initialize) && CALLER != _Initialize &&
43  CALLER != this_object() )
44  return;
45 
46  [ _Security, _Database, _FileSystem, _Types, _Log, _GroupAll,
47  _RootRoom, _Initialize ] = globals;
48 }
49 
50 /**
51  * get global objects
52  *
53  * @return the global objects
54  */
55 array __get_globals()
56 {
57  return ({ _Security, _Database, _FileSystem, _Types, _Log, _GroupAll,
58  _RootRoom, _Initialize });
59 }
60 
61 /**
62  * return the object class for global objets "0"
63  *
64  * @return the object class
65  */
66 int get_object_class()
67 {
68  return 0;
69 }
70 
71 
72 };