| 95 | } |
| 96 | |
| 97 | std::vector<Type::Ptr> Type::GetAllTypes() |
| 98 | { |
| 99 | std::vector<Type::Ptr> types; |
| 100 | |
| 101 | Namespace::Ptr typesNS = ScriptGlobal::Get("Types", &Empty); |
| 102 | |
| 103 | if (typesNS) { |
| 104 | ObjectLock olock(typesNS); |
| 105 | |
| 106 | for (const Namespace::Pair& kv : typesNS) { |
| 107 | Value value = kv.second.Val; |
| 108 | |
| 109 | if (value.IsObjectType<Type>()) |
| 110 | types.push_back(value); |
| 111 | } |
| 112 | } |
| 113 | |
| 114 | return types; |
| 115 | } |
| 116 | |
| 117 | const std::vector<Type::Ptr>& Type::GetConfigTypesSortedByLoadDependencies() |
| 118 | { |