//
// 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 version 2.1 as published
+// 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 <TDataStd_Variable.ixx>
-#include <TDF_Label.hxx>
-#include <TDataStd_Real.hxx>
-#include <TDataStd_Name.hxx>
+
#include <Standard_DomainError.hxx>
+#include <Standard_GUID.hxx>
+#include <Standard_Type.hxx>
+#include <TCollection_AsciiString.hxx>
+#include <TCollection_ExtendedString.hxx>
+#include <TDataStd_Expression.hxx>
+#include <TDataStd_Name.hxx>
+#include <TDataStd_Real.hxx>
+#include <TDataStd_Variable.hxx>
+#include <TDF_Attribute.hxx>
+#include <TDF_DataSet.hxx>
+#include <TDF_Label.hxx>
+#include <TDF_RelocationTable.hxx>
+IMPLEMENT_STANDARD_RTTIEXT(TDataStd_Variable,TDF_Attribute)
//=======================================================================
//function : GetID
//purpose :
//=======================================================================
-
const Standard_GUID& TDataStd_Variable::GetID()
{
static Standard_GUID TDataStd_VariableID("ce241469-8e57-11d1-8953-080009dc4425");
{
Handle(TDataStd_Name) N;
if (!Label().FindAttribute(TDataStd_Name::GetID(),N)) {
- Standard_DomainError::Raise("TDataStd_Variable::Name : invalid model");
+ throw Standard_DomainError("TDataStd_Variable::Name : invalid model");
}
return N->Get();
}
{
Handle(TDataStd_Real) R;
if (!Label().FindAttribute(TDataStd_Real::GetID(),R)) {
- Standard_DomainError::Raise("TDataStd_Variable::Real : invalid model");
+ throw Standard_DomainError("TDataStd_Variable::Real : invalid model");
}
return R;
}
+
+//=======================================================================
+//function : Set
+//purpose :
+//=======================================================================
+
+void TDataStd_Variable::Set (const Standard_Real value) const
+{
+ Handle(TDataStd_Real) R = TDataStd_Real::Set(Label(), value);
+}
+
+
//=======================================================================
//function : Set
//purpose :
{
if (!IsValued()) {
Handle(TDataStd_Real) R = TDataStd_Real::Set(Label(),value);
+ Standard_DISABLE_DEPRECATION_WARNINGS
R->SetDimension (dimension);
+ Standard_ENABLE_DEPRECATION_WARNINGS
}
else {
Handle(TDataStd_Real) R = TDataStd_Real::Set(Label(),value);
{
Handle(TDataStd_Real) R;
if (!Label().FindAttribute(TDataStd_Real::GetID(),R)) {
- Standard_DomainError::Raise("TDataStd_Variable::Get : invalid model");
+ throw Standard_DomainError("TDataStd_Variable::Get : invalid model");
}
return R->Get();
}
{
Handle(TDataStd_Expression) E;
if (!Label().FindAttribute(TDataStd_Expression::GetID(),E)) {
- Standard_DomainError::Raise("TDataStd_Variable::Deassign");
+ throw Standard_DomainError("TDataStd_Variable::Deassign");
}
Label().ForgetAttribute(E);
}
{
Handle(TDataStd_Expression) E;
if (!Label().FindAttribute(TDataStd_Expression::GetID(),E)) {
- Standard_DomainError::Raise("TDataStd_Variable::GetExpression");
+ throw Standard_DomainError("TDataStd_Variable::GetExpression");
}
return E;
}