ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/group/trunk/OOPSE-4/src/utils/TypeInfo.hpp
(Generate patch)

Comparing trunk/OOPSE-4/src/utils/TypeInfo.hpp (file contents):
Revision 2203 by gezelter, Wed Jan 12 22:41:40 2005 UTC vs.
Revision 2204 by gezelter, Fri Apr 15 22:04:00 2005 UTC

# Line 19 | Line 19 | class TypeInfo (public)
19  
20   class TypeInfo
21   {
22 < public:
23 <    // Constructors
24 <    TypeInfo(); // needed for containers
25 <    TypeInfo(const std::type_info&); // non-explicit
22 > public:
23 >  // Constructors
24 >  TypeInfo(); // needed for containers
25 >  TypeInfo(const std::type_info&); // non-explicit
26  
27 <    // Access for the wrapped std::type_info
28 <    const std::type_info& Get() const;
29 <    // Compatibility functions
30 <    bool before(const TypeInfo& rhs) const;
31 <    const char* name() const;
27 >  // Access for the wrapped std::type_info
28 >  const std::type_info& Get() const;
29 >  // Compatibility functions
30 >  bool before(const TypeInfo& rhs) const;
31 >  const char* name() const;
32  
33 < private:
34 <    const std::type_info* pInfo_;
33 > private:
34 >  const std::type_info* pInfo_;
35   };
36  
37   // Implementation
38  
39   inline TypeInfo::TypeInfo(){
40 <    class Nil {};
41 <    pInfo_ = &typeid(Nil);
40 >  class Nil {};
41 >  pInfo_ = &typeid(Nil);
42   }
43  
44   inline TypeInfo::TypeInfo(const std::type_info& ti): pInfo_(&ti)
45   { }
46  
47   inline bool TypeInfo::before(const TypeInfo& rhs) const{
48 <    return pInfo_->before(*rhs.pInfo_);
48 >  return pInfo_->before(*rhs.pInfo_);
49   }
50  
51   inline const std::type_info& TypeInfo::Get() const{
52 <    return *pInfo_;
52 >  return *pInfo_;
53   }
54  
55   inline const char* TypeInfo::name() const{
56 <    return pInfo_->name();
56 >  return pInfo_->name();
57   }
58  
59   // Comparison operators

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines