diff options
author | Jacek Antonelli | 2008-08-15 23:44:46 -0500 |
---|---|---|
committer | Jacek Antonelli | 2008-08-15 23:44:46 -0500 |
commit | 38d6d37f2d982fa959e9e8a4a3f7e1ccfad7b5d4 (patch) | |
tree | adca584755d22ca041a2dbfc35d4eca01f70b32c /linden/indra/llcommon/metaclass.h | |
parent | README.txt (diff) | |
download | meta-impy-38d6d37f2d982fa959e9e8a4a3f7e1ccfad7b5d4.zip meta-impy-38d6d37f2d982fa959e9e8a4a3f7e1ccfad7b5d4.tar.gz meta-impy-38d6d37f2d982fa959e9e8a4a3f7e1ccfad7b5d4.tar.bz2 meta-impy-38d6d37f2d982fa959e9e8a4a3f7e1ccfad7b5d4.tar.xz |
Second Life viewer sources 1.13.2.12
Diffstat (limited to 'linden/indra/llcommon/metaclass.h')
-rw-r--r-- | linden/indra/llcommon/metaclass.h | 83 |
1 files changed, 83 insertions, 0 deletions
diff --git a/linden/indra/llcommon/metaclass.h b/linden/indra/llcommon/metaclass.h new file mode 100644 index 0000000..091f83c --- /dev/null +++ b/linden/indra/llcommon/metaclass.h | |||
@@ -0,0 +1,83 @@ | |||
1 | /** | ||
2 | * @file metaclass.h | ||
3 | * @author Babbage | ||
4 | * @date 2006-05-15 | ||
5 | * @brief Reflective meta information describing a class. | ||
6 | * | ||
7 | * Copyright (c) 2006-2007, Linden Research, Inc. | ||
8 | * | ||
9 | * The source code in this file ("Source Code") is provided by Linden Lab | ||
10 | * to you under the terms of the GNU General Public License, version 2.0 | ||
11 | * ("GPL"), unless you have obtained a separate licensing agreement | ||
12 | * ("Other License"), formally executed by you and Linden Lab. Terms of | ||
13 | * the GPL can be found in doc/GPL-license.txt in this distribution, or | ||
14 | * online at http://secondlife.com/developers/opensource/gplv2 | ||
15 | * | ||
16 | * There are special exceptions to the terms and conditions of the GPL as | ||
17 | * it is applied to this Source Code. View the full text of the exception | ||
18 | * in the file doc/FLOSS-exception.txt in this software distribution, or | ||
19 | * online at http://secondlife.com/developers/opensource/flossexception | ||
20 | * | ||
21 | * By copying, modifying or distributing this software, you acknowledge | ||
22 | * that you have read and understood your obligations described above, | ||
23 | * and agree to abide by those obligations. | ||
24 | * | ||
25 | * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO | ||
26 | * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, | ||
27 | * COMPLETENESS OR PERFORMANCE. | ||
28 | */ | ||
29 | |||
30 | #ifndef LL_METACLASS_H | ||
31 | #define LL_METACLASS_H | ||
32 | |||
33 | #include <string> | ||
34 | #include <map> | ||
35 | |||
36 | #include "stdtypes.h" | ||
37 | |||
38 | class LLReflective; | ||
39 | class LLMetaProperty; | ||
40 | class LLMetaMethod; | ||
41 | class LLMetaClass | ||
42 | { | ||
43 | public: | ||
44 | |||
45 | LLMetaClass(); | ||
46 | virtual ~LLMetaClass(); | ||
47 | |||
48 | // Create instance of this MetaClass. NULL if class is abstract. | ||
49 | // Gives ownership of returned object. | ||
50 | // virtual LLReflective* create() const = 0; | ||
51 | |||
52 | // Returns named property or NULL. | ||
53 | const LLMetaProperty* findProperty(const std::string& name) const; | ||
54 | |||
55 | // Add property to metaclass. Takes ownership of given property. | ||
56 | void addProperty(const LLMetaProperty* property); | ||
57 | |||
58 | typedef std::map<std::string, const LLMetaProperty*>::const_iterator PropertyIterator; | ||
59 | |||
60 | U32 getPropertyCount() const; | ||
61 | |||
62 | PropertyIterator beginProperties() const; | ||
63 | PropertyIterator endProperties() const; | ||
64 | |||
65 | // Returns named property or NULL. | ||
66 | // const LLMetaMethod* findMethod(const std::string& name) const; | ||
67 | |||
68 | // Add method to metaclass. Takes ownership of given method. | ||
69 | // void addMethod(const LLMetaMethod* method); | ||
70 | |||
71 | // Find MetaClass by name. NULL if name is unknown. | ||
72 | // static LLMetaClass* findClass(const std::string& name); | ||
73 | |||
74 | // True if object is instance of this meta class. | ||
75 | bool isInstance(const LLReflective* object) const; | ||
76 | |||
77 | private: | ||
78 | |||
79 | typedef std::map<std::string, const LLMetaProperty*> PropertyMap; | ||
80 | PropertyMap mProperties; | ||
81 | }; | ||
82 | |||
83 | #endif // LL_METACLASS_H | ||