Loading files
// Copyright (c) 1998-1999 Matra Datavision
// Copyright (c) 1999-2014 OPEN CASCADE SAS
//
// This file is part of Open CASCADE Technology software library.
//
// This library is free software; you can redistribute it and/or modify it under
// the terms of the GNU Lesser General Public License version 2.1 as published
// by the Free Software Foundation, with special exception defined in the file
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
// distribution for complete text of the license and disclaimer of any warranty.
//
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#include <Standard_Persistent.hxx>
#include <Standard_Type.hxx>
#include <Storage_Data.hxx>
#include <Storage_HeaderData.hxx>
#include <Storage_Root.hxx>
#include <Storage_RootData.hxx>
#include <Storage_Schema.hxx>
#include <Storage_TypeData.hxx>
#include <TCollection_AsciiString.hxx>
#include <TCollection_ExtendedString.hxx>
IMPLEMENT_STANDARD_RTTIEXT(Storage_Data, Standard_Transient)
Storage_Data::Storage_Data()
{
myRootData = new Storage_RootData;
myTypeData = new Storage_TypeData;
myInternal = new Storage_InternalData;
myHeaderData = new Storage_HeaderData;
}
void Storage_Data::AddRoot(const occ::handle<Standard_Persistent>& anObject) const
{
occ::handle<Storage_Root> aRoot =
new Storage_Root(TCollection_AsciiString(myRootData->NumberOfRoots() + 1), anObject);
myRootData->AddRoot(aRoot);
}
void Storage_Data::AddRoot(const TCollection_AsciiString& aName,
const occ::handle<Standard_Persistent>& anObject) const
{
occ::handle<Storage_Root> aRoot = new Storage_Root(aName, anObject);
myRootData->AddRoot(aRoot);
}
void Storage_Data::RemoveRoot(const TCollection_AsciiString& anObject)
{
myRootData->RemoveRoot(anObject);
}
occ::handle<Storage_Root> Storage_Data::Find(const TCollection_AsciiString& aName) const
{
return myRootData->Find(aName);
}
int Storage_Data::NumberOfRoots() const
{
return myRootData->NumberOfRoots();
}
bool Storage_Data::IsRoot(const TCollection_AsciiString& aName) const
{
return myRootData->IsRoot(aName);
}
occ::handle<NCollection_HSequence<occ::handle<Storage_Root>>> Storage_Data::Roots() const
{
return myRootData->Roots();
}
int Storage_Data::NumberOfTypes() const
{
return myTypeData->NumberOfTypes();
}
bool Storage_Data::IsType(const TCollection_AsciiString& aName) const
{
return myTypeData->IsType(aName);
}
occ::handle<NCollection_HSequence<TCollection_AsciiString>> Storage_Data::Types() const
{
return myTypeData->Types();
}
occ::handle<Storage_RootData> Storage_Data::RootData() const
{
return myRootData;
}
occ::handle<Storage_TypeData> Storage_Data::TypeData() const
{
return myTypeData;
}
occ::handle<Storage_InternalData> Storage_Data::InternalData() const
{
return myInternal;
}
occ::handle<Storage_HeaderData> Storage_Data::HeaderData() const
{
return myHeaderData;
}
void Storage_Data::Clear() const
{
myInternal->Clear();
myTypeData->Clear();
}
// HEADER
TCollection_AsciiString Storage_Data::CreationDate() const
{
return myHeaderData->CreationDate();
}
TCollection_AsciiString Storage_Data::SchemaVersion() const
{
return myHeaderData->SchemaVersion();
}
TCollection_AsciiString Storage_Data::SchemaName() const
{
return myHeaderData->SchemaName();
}
void Storage_Data::SetApplicationVersion(const TCollection_AsciiString& aVersion)
{
myHeaderData->SetApplicationVersion(aVersion);
}
TCollection_AsciiString Storage_Data::ApplicationVersion() const
{
return myHeaderData->ApplicationVersion();
}
void Storage_Data::SetApplicationName(const TCollection_ExtendedString& aName)
{
myHeaderData->SetApplicationName(aName);
}
TCollection_ExtendedString Storage_Data::ApplicationName() const
{
return myHeaderData->ApplicationName();
}
void Storage_Data::AddToUserInfo(const TCollection_AsciiString& theUserInfo)
{
myHeaderData->AddToUserInfo(theUserInfo);
}
const NCollection_Sequence<TCollection_AsciiString>& Storage_Data::UserInfo() const
{
return myHeaderData->UserInfo();
}
void Storage_Data::AddToComments(const TCollection_ExtendedString& theUserInfo)
{
myHeaderData->AddToComments(theUserInfo);
}
const NCollection_Sequence<TCollection_ExtendedString>& Storage_Data::Comments() const
{
return myHeaderData->Comments();
}
int Storage_Data::NumberOfObjects() const
{
return myHeaderData->NumberOfObjects();
}
TCollection_AsciiString Storage_Data::StorageVersion() const
{
return myHeaderData->StorageVersion();
}
Storage_Error Storage_Data::ErrorStatus() const
{
return myErrorStatus;
}
void Storage_Data::SetErrorStatus(const Storage_Error anError)
{
myErrorStatus = anError;
}
void Storage_Data::ClearErrorStatus()
{
myErrorStatus = Storage_VSOk;
myErrorStatusExt.Clear();
myHeaderData->ClearErrorStatus();
myRootData->ClearErrorStatus();
myTypeData->ClearErrorStatus();
}
void Storage_Data::SetDataType(const TCollection_ExtendedString& aName)
{
myHeaderData->SetDataType(aName);
}
TCollection_ExtendedString Storage_Data::DataType() const
{
return myHeaderData->DataType();
}
TCollection_AsciiString Storage_Data::ErrorStatusExtension() const
{
return myErrorStatusExt;
}
void Storage_Data::SetErrorStatusExtension(const TCollection_AsciiString& anErrorExt)
{
myErrorStatusExt = anErrorExt;
}
f2929057eThis file is pinned to the selected release. Download the original to open it in your design tool.