Moved osgIntrospection across to standard OSG coding style.

This commit is contained in:
Robert Osfield
2005-04-29 11:19:58 +00:00
parent af13199e05
commit f2d696f871
31 changed files with 6057 additions and 6057 deletions

View File

@@ -32,7 +32,7 @@ namespace osgIntrospection
class Type;
struct Converter;
typedef std::vector<const Converter *> ConverterList;
typedef std::vector<const Converter* > ConverterList;
/// This predicate compares two instances of std::type_info for equality.
/// Note that we can't rely on default pointer comparison because it is
@@ -40,14 +40,14 @@ namespace osgIntrospection
/// given T (thanks Andrew Koenig).
struct TypeInfoCmp
{
bool operator()(const std::type_info *t1, const std::type_info *t2) const
bool operator()(const std::type_info* t1, const std::type_info* t2) const
{
return t1->before(*t2) != 0;
}
};
/// A map of types, indexed by their associated type_info structure.
typedef std::map<const std::type_info *, Type *, TypeInfoCmp> TypeMap;
typedef std::map<const std::type_info* , Type* , TypeInfoCmp> TypeMap;
/// This class provides basic reflection services such as registration
@@ -61,24 +61,24 @@ namespace osgIntrospection
/// Please note that such type will have the status of
/// "declared", you still need to give details about it through
/// a Reflector class before you can query it.
static const Type &getType(const std::type_info &ti);
static const Type& getType(const std::type_info& ti);
/// Finds a Type object given its qualified name, which must
/// be identical to the qualified name returned by that Type's
/// getQualifiedName() method. If the type hasn't been created
/// yet, an exception is thrown.
static const Type &getType(const std::string &qname);
static const Type& getType(const std::string& qname);
/// Returns the global map of types.
static const TypeMap &getTypes();
static const TypeMap& getTypes();
/// Return the Type object associated to the C++ type 'void'.
/// This is a shortcut for typeof(void), which may be slow if
/// the type map is large.
static const Type &type_void();
static const Type& type_void();
static const Converter *getConverter(const Type &source, const Type &dest);
static bool getConversionPath(const Type &source, const Type &dest, ConverterList &conv);
static const Converter* getConverter(const Type& source, const Type& dest);
static bool getConversionPath(const Type& source, const Type& dest, ConverterList& conv);
private:
template<typename C> friend class Reflector;
@@ -88,23 +88,23 @@ namespace osgIntrospection
struct StaticData
{
TypeMap typemap;
const Type *type_void;
const Type* type_void;
typedef std::map<const Type *, const Converter *> ConverterMap;
typedef std::map<const Type *, ConverterMap> ConverterMapMap;
typedef std::map<const Type* , const Converter* > ConverterMap;
typedef std::map<const Type* , ConverterMap> ConverterMapMap;
ConverterMapMap convmap;
~StaticData();
};
static StaticData &getOrCreateStaticData();
static Type *registerType(const std::type_info &ti);
static Type *getOrRegisterType(const std::type_info &ti, bool replace_if_defined = false);
static void registerConverter(const Type &source, const Type &dest, const Converter *cvt);
static StaticData& getOrCreateStaticData();
static Type* registerType(const std::type_info& ti);
static Type* getOrRegisterType(const std::type_info& ti, bool replace_if_defined = false);
static void registerConverter(const Type& source, const Type& dest, const Converter* cvt);
private:
static bool accum_conv_path(const Type &source, const Type &dest, ConverterList &conv, std::vector<const Type *> &chain);
static StaticData *staticdata__;
static bool accum_conv_path(const Type& source, const Type& dest, ConverterList& conv, std::vector<const Type* > &chain);
static StaticData* _static_data;
};
}