0026961: Recover possibility to read files in old persistence format -- preparation
[occt.git] / src / Storage / Storage_Root.cxx
index c0b6da4..1184ba5 100644 (file)
 
 IMPLEMENT_STANDARD_RTTIEXT(Storage_Root,MMgt_TShared)
 
-Storage_Root::Storage_Root() : myRef(0)
-{
-}
+Storage_Root::Storage_Root()
+  : myRef (0) {}
 
-Storage_Root::Storage_Root(const TCollection_AsciiString& aName,const Handle(Standard_Persistent)& anObject) : myRef(0)
-{
-  myName   = aName;
-  myObject = anObject;
-  
-  if (!anObject.IsNull()) {
-    myType   = anObject->DynamicType()->Name();
-  }
-}
+Storage_Root::Storage_Root (const TCollection_AsciiString&    theName,
+                            const Handle(Standard_Persistent)& theObject)
+  : myName   (theName)
+  , myObject (theObject)
+  , myRef    (0)
+{}
+
+Storage_Root::Storage_Root (const TCollection_AsciiString& theName,
+                            const Standard_Integer         theRef,
+                            const TCollection_AsciiString& theType)
+  : myName (theName)
+  , myType (theType)
+  , myRef  (theRef)
+{}
 
-void Storage_Root::SetName(const TCollection_AsciiString& aName) 
+void Storage_Root::SetName (const TCollection_AsciiString& theName) 
 {
-  myName   = aName;
+  myName = theName;
 }
 
 TCollection_AsciiString Storage_Root::Name() const
@@ -48,10 +52,6 @@ TCollection_AsciiString Storage_Root::Name() const
 void Storage_Root::SetObject(const Handle(Standard_Persistent)& anObject) 
 {
   myObject = anObject;
-
-  if (!anObject.IsNull()) {
-    myType   = anObject->DynamicType()->Name();
-  }
 }
 
 Handle(Standard_Persistent) Storage_Root::Object() const