L.AddAttribute(A);
}
- A->Set(Val);
+ A->SetValue(Val);
return A;
}
//=======================================================================
-//function : Set
+//function : SetValue
//purpose :
//=======================================================================
-void SALOMEDSImpl_AttributeComment::Set (const TCollection_ExtendedString& S)
+void SALOMEDSImpl_AttributeComment::SetValue (const TCollection_ExtendedString& S)
{
CheckLocked();
//=======================================================================
void SALOMEDSImpl_AttributeComment::Restore(const Handle(TDF_Attribute)& with)
{
- myString = Handle(SALOMEDSImpl_AttributeComment)::DownCast (with)->Get ();
+ myString = Handle(SALOMEDSImpl_AttributeComment)::DownCast (with)->Value ();
}
//=======================================================================
void SALOMEDSImpl_AttributeComment::Paste (const Handle(TDF_Attribute)& into,
const Handle(TDF_RelocationTable)& RT) const
{
- Handle(SALOMEDSImpl_AttributeComment)::DownCast (into)->Set(myString);
+ Handle(SALOMEDSImpl_AttributeComment)::DownCast (into)->SetValue(myString);
}
Standard_EXPORT SALOMEDSImpl_AttributeComment() :SALOMEDSImpl_GenericAttribute("AttributeComment") {}
Standard_EXPORT static Handle(SALOMEDSImpl_AttributeComment) Set(const TDF_Label& L, const TCollection_ExtendedString& Val);
-Standard_EXPORT void Set (const TCollection_ExtendedString& S);
-Standard_EXPORT TCollection_ExtendedString Get() const { return myString; }
+Standard_EXPORT void SetValue (const TCollection_ExtendedString& S);
+Standard_EXPORT TCollection_ExtendedString Value() const { return myString; }
Standard_EXPORT virtual TCollection_AsciiString Save() { return myString; }
Standard_EXPORT virtual void Load(const TCollection_AsciiString& theValue) { myString = theValue; }
L.AddAttribute(A);
}
- A->Set (value);
+ A->SetDrawable (value);
return A;
}
}
//=======================================================================
-//function : Set
+//function : SetDrawable
//purpose :
//=======================================================================
-void SALOMEDSImpl_AttributeDrawable::Set(const Standard_Integer theValue)
+void SALOMEDSImpl_AttributeDrawable::SetDrawable(const Standard_Integer theValue)
{
CheckLocked();
void SALOMEDSImpl_AttributeDrawable::Restore(const Handle(TDF_Attribute)& with)
{
- myValue = Handle(SALOMEDSImpl_AttributeDrawable)::DownCast (with)->Get ();
+ myValue = Handle(SALOMEDSImpl_AttributeDrawable)::DownCast (with)->IsDrawable ();
}
//=======================================================================
void SALOMEDSImpl_AttributeDrawable::Paste (const Handle(TDF_Attribute)& into,
const Handle(TDF_RelocationTable)& RT) const
{
- Handle(SALOMEDSImpl_AttributeDrawable)::DownCast (into)->Set (myValue);
+ Handle(SALOMEDSImpl_AttributeDrawable)::DownCast (into)->SetDrawable (myValue);
}
Standard_EXPORT static const Standard_GUID& GetID() ;
Standard_EXPORT static Handle_SALOMEDSImpl_AttributeDrawable Set(const TDF_Label& label,const Standard_Integer value) ;
-Standard_EXPORT void Set(const Standard_Integer theValue);
-Standard_EXPORT Standard_Integer Get() const { return myValue; }
+Standard_EXPORT void SetDrawable(const Standard_Integer theValue);
+Standard_EXPORT Standard_Integer IsDrawable() const { return myValue; }
Standard_EXPORT SALOMEDSImpl_AttributeDrawable();
Standard_EXPORT const Standard_GUID& ID() const;
Standard_EXPORT void Restore(const Handle(TDF_Attribute)& with) ;
L.AddAttribute(A);
}
- A->Set(value);
+ A->SetExpandable(value);
return A;
}
}
//=======================================================================
-//function : Set
+//function : SetExpandable
//purpose :
//=======================================================================
-void SALOMEDSImpl_AttributeExpandable::Set(const Standard_Integer theValue)
+void SALOMEDSImpl_AttributeExpandable::SetExpandable(const Standard_Integer theValue)
{
CheckLocked();
void SALOMEDSImpl_AttributeExpandable::Restore(const Handle(TDF_Attribute)& with)
{
- myValue = Handle(SALOMEDSImpl_AttributeExpandable)::DownCast (with)->Get ();
+ myValue = Handle(SALOMEDSImpl_AttributeExpandable)::DownCast (with)->IsExpandable ();
}
//=======================================================================
void SALOMEDSImpl_AttributeExpandable::Paste (const Handle(TDF_Attribute)& into,
const Handle(TDF_RelocationTable)& RT) const
{
- Handle(SALOMEDSImpl_AttributeExpandable)::DownCast (into)->Set (myValue);
+ Handle(SALOMEDSImpl_AttributeExpandable)::DownCast (into)->SetExpandable (myValue);
}
public:
-Standard_EXPORT virtual TCollection_AsciiString Save() { return (Get() == 0)?(char*)"0":(char*)"1"; }
+Standard_EXPORT virtual TCollection_AsciiString Save() { return (myValue == 0)?(char*)"0":(char*)"1"; }
Standard_EXPORT virtual void Load(const TCollection_AsciiString& theValue) { (theValue == "0")?myValue=0:myValue=1; }
Standard_EXPORT static const Standard_GUID& GetID() ;
Standard_EXPORT static Handle_SALOMEDSImpl_AttributeExpandable Set(const TDF_Label& label,const Standard_Integer value) ;
Standard_EXPORT SALOMEDSImpl_AttributeExpandable();
-Standard_EXPORT void Set(const Standard_Integer value);
-Standard_EXPORT int Get() const { return myValue; }
+Standard_EXPORT void SetExpandable(const Standard_Integer value);
+Standard_EXPORT int IsExpandable() const { return myValue; }
Standard_EXPORT const Standard_GUID& ID() const;
Standard_EXPORT void Restore(const Handle(TDF_Attribute)& with) ;
Standard_EXPORT Handle_TDF_Attribute NewEmpty() const;
L.AddAttribute(A);
}
- A->Set (S);
+ A->SetValue (S);
return A;
}
}
//=======================================================================
-//function : Set
+//function : SetValue
//purpose :
//=======================================================================
-void SALOMEDSImpl_AttributeExternalFileDef::Set (const TCollection_ExtendedString& S)
+void SALOMEDSImpl_AttributeExternalFileDef::SetValue (const TCollection_ExtendedString& S)
{
CheckLocked();
//=======================================================================
void SALOMEDSImpl_AttributeExternalFileDef::Restore(const Handle(TDF_Attribute)& with)
{
- myString = Handle(SALOMEDSImpl_AttributeExternalFileDef)::DownCast (with)->Get ();
+ myString = Handle(SALOMEDSImpl_AttributeExternalFileDef)::DownCast (with)->Value ();
}
//=======================================================================
const Handle(TDF_RelocationTable)& RT) const
{
Handle(SALOMEDSImpl_AttributeExternalFileDef) anAttr = Handle(SALOMEDSImpl_AttributeExternalFileDef)::DownCast(into);
- anAttr->Set(myString);
+ anAttr->SetValue(myString);
}
Standard_EXPORT static Handle_SALOMEDSImpl_AttributeExternalFileDef Set(const TDF_Label& label,
const TCollection_ExtendedString& Name);
Standard_EXPORT SALOMEDSImpl_AttributeExternalFileDef();
-Standard_EXPORT void Set(const TCollection_ExtendedString& value);
-Standard_EXPORT TCollection_ExtendedString Get() const { return myString; }
+Standard_EXPORT void SetValue(const TCollection_ExtendedString& value);
+Standard_EXPORT TCollection_ExtendedString Value() const { return myString; }
Standard_EXPORT const Standard_GUID& ID() const;
Standard_EXPORT void Restore(const Handle(TDF_Attribute)& with) ;
Standard_EXPORT Handle_TDF_Attribute NewEmpty() const;
L.AddAttribute(A);
}
- A->Set (S);
+ A->SetValue (S);
return A;
}
}
//=======================================================================
-//function : Set
+//function : SetValue
//purpose :
//=======================================================================
-void SALOMEDSImpl_AttributeFileType::Set (const TCollection_ExtendedString& S)
+void SALOMEDSImpl_AttributeFileType::SetValue (const TCollection_ExtendedString& S)
{
CheckLocked();
void SALOMEDSImpl_AttributeFileType::Restore(const Handle(TDF_Attribute)& with)
{
- myString = Handle(SALOMEDSImpl_AttributeFileType)::DownCast (with)->Get ();
+ myString = Handle(SALOMEDSImpl_AttributeFileType)::DownCast (with)->Value ();
}
//=======================================================================
void SALOMEDSImpl_AttributeFileType::Paste (const Handle(TDF_Attribute)& into,
const Handle(TDF_RelocationTable)& RT) const
{
- Handle(SALOMEDSImpl_AttributeFileType)::DownCast (into)->Set (myString);
+ Handle(SALOMEDSImpl_AttributeFileType)::DownCast (into)->SetValue (myString);
}
Standard_EXPORT static Handle_SALOMEDSImpl_AttributeFileType Set(const TDF_Label& label,
const TCollection_ExtendedString& Name) ;
Standard_EXPORT SALOMEDSImpl_AttributeFileType();
-Standard_EXPORT void Set(const TCollection_ExtendedString& value);
-Standard_EXPORT TCollection_ExtendedString Get() const { return myString; }
+Standard_EXPORT void SetValue(const TCollection_ExtendedString& value);
+Standard_EXPORT TCollection_ExtendedString Value() const { return myString; }
Standard_EXPORT const Standard_GUID& ID() const;
Standard_EXPORT void Restore(const Handle(TDF_Attribute)& with) ;
Standard_EXPORT Handle_TDF_Attribute NewEmpty() const;
L.AddAttribute(A);
}
- A->Set(Val);
+ A->SetValue(Val);
return A;
}
//=======================================================================
-//function : Set
+//function : SetValue
//purpose :
//=======================================================================
-void SALOMEDSImpl_AttributeInteger::Set(const Standard_Integer v)
+void SALOMEDSImpl_AttributeInteger::SetValue(const Standard_Integer v)
{
if(myValue == v) return;
//=======================================================================
void SALOMEDSImpl_AttributeInteger::Restore(const Handle(TDF_Attribute)& With)
{
- myValue = Handle(SALOMEDSImpl_AttributeInteger)::DownCast (With)->Get();
+ myValue = Handle(SALOMEDSImpl_AttributeInteger)::DownCast (With)->Value();
}
//=======================================================================
void SALOMEDSImpl_AttributeInteger::Paste (const Handle(TDF_Attribute)& Into,
const Handle(TDF_RelocationTable)& RT) const
{
- Handle(SALOMEDSImpl_AttributeInteger)::DownCast(Into)->Set(myValue);
+ Handle(SALOMEDSImpl_AttributeInteger)::DownCast(Into)->SetValue(myValue);
}
Standard_EXPORT SALOMEDSImpl_AttributeInteger():SALOMEDSImpl_GenericAttribute("AttributeInteger") {}
Standard_EXPORT static Handle(SALOMEDSImpl_AttributeInteger) Set (const TDF_Label& L, Standard_Integer Val);
-Standard_EXPORT void Set(const Standard_Integer theVal);
-Standard_EXPORT Standard_Integer Get() const { return myValue; }
+Standard_EXPORT void SetValue(const Standard_Integer theVal);
+Standard_EXPORT Standard_Integer Value() const { return myValue; }
Standard_EXPORT virtual TCollection_AsciiString Save() { return TCollection_AsciiString(myValue); }
Standard_EXPORT virtual void Load(const TCollection_AsciiString& theValue) { myValue = theValue.IntegerValue(); }
L.AddAttribute(A);
}
- A->Set(Val);
+ A->SetValue(Val);
return A;
}
//=======================================================================
-//function : Set
+//function : SetValue
//purpose :
//=======================================================================
-void SALOMEDSImpl_AttributeName::Set (const TCollection_ExtendedString& S)
+void SALOMEDSImpl_AttributeName::SetValue (const TCollection_ExtendedString& S)
{
CheckLocked();
//=======================================================================
void SALOMEDSImpl_AttributeName::Restore(const Handle(TDF_Attribute)& with)
{
- myString = Handle(SALOMEDSImpl_AttributeName)::DownCast (with)->Get ();
+ myString = Handle(SALOMEDSImpl_AttributeName)::DownCast (with)->Value ();
}
//=======================================================================
void SALOMEDSImpl_AttributeName::Paste (const Handle(TDF_Attribute)& into,
const Handle(TDF_RelocationTable)& RT) const
{
- Handle(SALOMEDSImpl_AttributeName)::DownCast (into)->Set(myString);
+ Handle(SALOMEDSImpl_AttributeName)::DownCast (into)->SetValue(myString);
}
Standard_EXPORT SALOMEDSImpl_AttributeName():SALOMEDSImpl_GenericAttribute("AttributeName") {}
Standard_EXPORT static Handle(SALOMEDSImpl_AttributeName) Set (const TDF_Label& L, const TCollection_ExtendedString& Val);
-Standard_EXPORT void Set(const TCollection_ExtendedString& theVal);
-Standard_EXPORT TCollection_ExtendedString Get() const { return myString; }
+Standard_EXPORT void SetValue(const TCollection_ExtendedString& theVal);
+Standard_EXPORT TCollection_ExtendedString Value() const { return myString; }
Standard_EXPORT virtual TCollection_AsciiString Save() { return myString; }
Standard_EXPORT virtual void Load(const TCollection_AsciiString& theValue) { myString = theValue; }
L.AddAttribute(A);
}
- A->Set (value);
+ A->SetOpened (value);
return A;
}
}
//=======================================================================
-//function : Set
+//function : SetOpened
//purpose :
//=======================================================================
-void SALOMEDSImpl_AttributeOpened::Set(const Standard_Integer theValue)
+void SALOMEDSImpl_AttributeOpened::SetOpened(const Standard_Integer theValue)
{
Backup();
void SALOMEDSImpl_AttributeOpened::Restore(const Handle(TDF_Attribute)& with)
{
- myValue = Handle(SALOMEDSImpl_AttributeOpened)::DownCast (with)->Get ();
+ myValue = Handle(SALOMEDSImpl_AttributeOpened)::DownCast (with)->IsOpened ();
}
//=======================================================================
void SALOMEDSImpl_AttributeOpened::Paste (const Handle(TDF_Attribute)& into,
const Handle(TDF_RelocationTable)& RT) const
{
- Handle(SALOMEDSImpl_AttributeOpened)::DownCast (into)->Set (myValue);
+ Handle(SALOMEDSImpl_AttributeOpened)::DownCast (into)->SetOpened (myValue);
}
Standard_EXPORT static const Standard_GUID& GetID() ;
Standard_EXPORT static Handle_SALOMEDSImpl_AttributeOpened Set(const TDF_Label& label,const Standard_Integer value) ;
Standard_EXPORT SALOMEDSImpl_AttributeOpened();
-Standard_EXPORT void Set(const Standard_Integer value);
-Standard_EXPORT int Get() const { return myValue; }
+Standard_EXPORT void SetOpened(const Standard_Integer value);
+Standard_EXPORT int IsOpened() const { return myValue; }
Standard_EXPORT const Standard_GUID& ID() const;
Standard_EXPORT void Restore(const Handle(TDF_Attribute)& with) ;
Standard_EXPORT Handle_TDF_Attribute NewEmpty() const;
L.AddAttribute(A);
}
- A->Set (S);
+ A->SetValue (S);
return A;
}
//=======================================================================
-//function : Set
+//function : SetValue
//purpose :
//=======================================================================
-void SALOMEDSImpl_AttributePersistentRef::Set (const TCollection_ExtendedString& S)
+void SALOMEDSImpl_AttributePersistentRef::SetValue (const TCollection_ExtendedString& S)
{
CheckLocked();
void SALOMEDSImpl_AttributePersistentRef::Restore(const Handle(TDF_Attribute)& with)
{
- myString = Handle(SALOMEDSImpl_AttributePersistentRef)::DownCast (with)->Get ();
+ myString = Handle(SALOMEDSImpl_AttributePersistentRef)::DownCast (with)->Value ();
}
//=======================================================================
void SALOMEDSImpl_AttributePersistentRef::Paste (const Handle(TDF_Attribute)& into,
const Handle(TDF_RelocationTable)& RT) const
{
- Handle(SALOMEDSImpl_AttributePersistentRef)::DownCast (into)->Set(myString);
+ Handle(SALOMEDSImpl_AttributePersistentRef)::DownCast (into)->SetValue(myString);
}
const TCollection_ExtendedString& string) ;
Standard_EXPORT SALOMEDSImpl_AttributePersistentRef();
Standard_EXPORT const Standard_GUID& ID() const;
-Standard_EXPORT void Set(const TCollection_ExtendedString& value);
-Standard_EXPORT TCollection_ExtendedString Get() const { return myString; }
+Standard_EXPORT void SetValue(const TCollection_ExtendedString& value);
+Standard_EXPORT TCollection_ExtendedString Value() const { return myString; }
Standard_EXPORT void Restore(const Handle(TDF_Attribute)& with) ;
Standard_EXPORT Handle_TDF_Attribute NewEmpty() const;
Standard_EXPORT void Paste(const Handle(TDF_Attribute)& into,const Handle(TDF_RelocationTable)& RT) const;
L.AddAttribute(A);
}
- A->Set (S);
+ A->SetPixMap (S);
return A;
}
}
//=======================================================================
-//function : Set
+//function : SetPixMap
//purpose :
//=======================================================================
-void SALOMEDSImpl_AttributePixMap::Set (const TCollection_ExtendedString& S)
+void SALOMEDSImpl_AttributePixMap::SetPixMap (const TCollection_ExtendedString& S)
{
CheckLocked();
void SALOMEDSImpl_AttributePixMap::Restore(const Handle(TDF_Attribute)& with)
{
- myString = Handle(SALOMEDSImpl_AttributePixMap)::DownCast (with)->Get ();
+ myString = Handle(SALOMEDSImpl_AttributePixMap)::DownCast (with)->GetPixMap ();
}
//=======================================================================
void SALOMEDSImpl_AttributePixMap::Paste (const Handle(TDF_Attribute)& into,
const Handle(TDF_RelocationTable)& RT) const
{
- Handle(SALOMEDSImpl_AttributePixMap)::DownCast (into)->Set (myString);
+ Handle(SALOMEDSImpl_AttributePixMap)::DownCast (into)->SetPixMap (myString);
}
const TCollection_ExtendedString& string) ;
Standard_EXPORT SALOMEDSImpl_AttributePixMap();
Standard_EXPORT const Standard_GUID& ID() const;
-Standard_EXPORT void Set(const TCollection_ExtendedString& value);
-Standard_EXPORT TCollection_ExtendedString Get() const { return myString; }
+Standard_EXPORT void SetPixMap(const TCollection_ExtendedString& value);
+Standard_EXPORT TCollection_ExtendedString GetPixMap() const { return myString; }
+Standard_EXPORT Standard_Boolean HasPixMap() const { return (myString != "None"); }
Standard_EXPORT void Restore(const Handle(TDF_Attribute)& with) ;
Standard_EXPORT Handle_TDF_Attribute NewEmpty() const;
Standard_EXPORT void Paste(const Handle(TDF_Attribute)& into,const Handle(TDF_RelocationTable)& RT) const;
L.AddAttribute(A);
}
- A->Set(Val);
+ A->SetValue(Val);
return A;
}
//=======================================================================
-//function : Set
+//function : SetValue
//purpose :
//=======================================================================
-void SALOMEDSImpl_AttributeReal::Set(const Standard_Real v)
+void SALOMEDSImpl_AttributeReal::SetValue(const Standard_Real v)
{
CheckLocked();
//=======================================================================
void SALOMEDSImpl_AttributeReal::Restore(const Handle(TDF_Attribute)& with)
{
- myValue = Handle(SALOMEDSImpl_AttributeReal)::DownCast (with)->Get ();
+ myValue = Handle(SALOMEDSImpl_AttributeReal)::DownCast (with)->Value ();
}
//=======================================================================
void SALOMEDSImpl_AttributeReal::Paste (const Handle(TDF_Attribute)& into,
const Handle(TDF_RelocationTable)& RT) const
{
- Handle(SALOMEDSImpl_AttributeReal)::DownCast (into)->Set(myValue);
+ Handle(SALOMEDSImpl_AttributeReal)::DownCast (into)->SetValue(myValue);
}
Standard_EXPORT SALOMEDSImpl_AttributeReal():SALOMEDSImpl_GenericAttribute("AttributeReal") {}
Standard_EXPORT static Handle(SALOMEDSImpl_AttributeReal) Set (const TDF_Label& L, const Standard_Real Val);
-Standard_EXPORT void Set(const Standard_Real theVal);
-Standard_EXPORT Standard_Real Get() const { return myValue; }
+Standard_EXPORT void SetValue(const Standard_Real theVal);
+Standard_EXPORT Standard_Real Value() const { return myValue; }
Standard_EXPORT virtual TCollection_AsciiString Save() { return TCollection_AsciiString(myValue); }
Standard_EXPORT virtual void Load(const TCollection_AsciiString& theValue) { myValue = theValue.RealValue(); }
L.AddAttribute(A);
}
- A->Set (value);
+ A->SetSelectable (value);
return A;
}
}
//=======================================================================
-//function : Set
+//function : SetSelectable
//purpose :
//=======================================================================
-void SALOMEDSImpl_AttributeSelectable::Set(const Standard_Integer theValue)
+void SALOMEDSImpl_AttributeSelectable::SetSelectable(const Standard_Integer theValue)
{
Backup();
void SALOMEDSImpl_AttributeSelectable::Restore(const Handle(TDF_Attribute)& with)
{
- myValue = Handle(SALOMEDSImpl_AttributeSelectable)::DownCast (with)->Get ();
+ myValue = Handle(SALOMEDSImpl_AttributeSelectable)::DownCast (with)->IsSelectable ();
}
//=======================================================================
void SALOMEDSImpl_AttributeSelectable::Paste (const Handle(TDF_Attribute)& into,
const Handle(TDF_RelocationTable)& RT) const
{
- Handle(SALOMEDSImpl_AttributeSelectable)::DownCast (into)->Set (myValue);
+ Handle(SALOMEDSImpl_AttributeSelectable)::DownCast (into)->SetSelectable (myValue);
}
Standard_EXPORT static const Standard_GUID& GetID() ;
Standard_EXPORT static Handle_SALOMEDSImpl_AttributeSelectable Set(const TDF_Label& label,const Standard_Integer value) ;
Standard_EXPORT SALOMEDSImpl_AttributeSelectable();
-Standard_EXPORT void Set(const Standard_Integer value);
-Standard_EXPORT Standard_Integer Get() const { return myValue; }
+Standard_EXPORT void SetSelectable(const Standard_Integer value);
+Standard_EXPORT Standard_Integer IsSelectable() const { return myValue; }
Standard_EXPORT const Standard_GUID& ID() const;
Standard_EXPORT void Restore(const Handle(TDF_Attribute)& with) ;
Standard_EXPORT Handle_TDF_Attribute NewEmpty() const;
IMPLEMENT_STANDARD_HANDLE( SALOMEDSImpl_AttributeTableOfInteger, SALOMEDSImpl_GenericAttribute )
IMPLEMENT_STANDARD_RTTIEXT( SALOMEDSImpl_AttributeTableOfInteger, SALOMEDSImpl_GenericAttribute )
+#define SEPARATOR '\1'
+
+static TCollection_ExtendedString getUnit(TCollection_ExtendedString theString)
+{
+ TCollection_ExtendedString aString(theString);
+ int aPos = aString.Search(SEPARATOR);
+ if(aPos <= 0 || aPos == aString.Length() ) return TCollection_ExtendedString();
+ return aString.Split(aPos);
+}
+
+static TCollection_ExtendedString getTitle(TCollection_ExtendedString theString)
+{
+ TCollection_ExtendedString aString(theString);
+ int aPos = aString.Search(SEPARATOR);
+ if(aPos < 1) return aString;
+ if(aPos == 1) return TCollection_ExtendedString();
+ aString.Split(aPos-1);
+ return aString;
+}
+
const Standard_GUID& SALOMEDSImpl_AttributeTableOfInteger::GetID()
{
static Standard_GUID SALOMEDSImpl_AttributeTableOfIntegerID ("128371A0-8F52-11d6-A8A3-0001021E8C7F");
}
void SALOMEDSImpl_AttributeTableOfInteger::SetRowTitle(const Standard_Integer theRow,
- const TCollection_ExtendedString& theTitle)
+ const TCollection_ExtendedString& theTitle)
{
CheckLocked();
Backup();
- myRows->SetValue(theRow,theTitle);
+ TCollection_ExtendedString aTitle(theTitle), aUnit = GetRowUnit(theRow);
+ if(aUnit.Length()>0) {
+ aTitle += SEPARATOR;
+ aTitle += aUnit;
+ }
+ myRows->SetValue(theRow, aTitle);
+}
+
+void SALOMEDSImpl_AttributeTableOfInteger::SetRowUnit(const Standard_Integer theRow,
+ const TCollection_ExtendedString& theUnit)
+{
+ CheckLocked();
+ Backup();
+ TCollection_ExtendedString aTitle = GetRowTitle(theRow);
+ aTitle += SEPARATOR;
+ aTitle += theUnit;
+
+ myRows->SetValue(theRow, aTitle);
+}
+
+void SALOMEDSImpl_AttributeTableOfInteger::SetRowUnits(const Handle(TColStd_HSequenceOfExtendedString)& theUnits)
+{
+ if (theUnits->Length() != GetNbRows()) Standard_Failure::Raise("Invalid number of rows");
+ int aLength = theUnits->Length(), i;
+ for(i = 1; i <= aLength; i++) SetRowUnit(i, theUnits->Value(i));
+}
+
+Handle(TColStd_HSequenceOfExtendedString) SALOMEDSImpl_AttributeTableOfInteger::GetRowUnits()
+{
+ Handle(TColStd_HSequenceOfExtendedString) aSeq = new TColStd_HSequenceOfExtendedString;
+ int aLength = myRows->Length(), i;
+ for(i=1; i<=aLength; i++) aSeq->Append(getUnit(myRows->Value(i)));
+ return aSeq;
+}
+
+void SALOMEDSImpl_AttributeTableOfInteger::SetRowTitles(const Handle(TColStd_HSequenceOfExtendedString)& theTitles)
+{
+ if (theTitles->Length() != GetNbRows()) Standard_Failure::Raise("Invalid number of rows");
+ int aLength = theTitles->Length(), i;
+ for(i = 1; i <= aLength; i++) SetRowTitle(i, theTitles->Value(i));
}
-TCollection_ExtendedString SALOMEDSImpl_AttributeTableOfInteger::GetRowTitle(const Standard_Integer theRow) const {
- return myRows->Value(theRow);
+Handle(TColStd_HSequenceOfExtendedString) SALOMEDSImpl_AttributeTableOfInteger::GetRowTitles()
+{
+ Handle(TColStd_HSequenceOfExtendedString) aSeq = new TColStd_HSequenceOfExtendedString;
+ int aLength = myRows->Length(), i;
+ for(i=1; i<=aLength; i++) aSeq->Append(getTitle(myRows->Value(i)));
+ return aSeq;
+}
+
+
+TCollection_ExtendedString SALOMEDSImpl_AttributeTableOfInteger::GetRowTitle(const Standard_Integer theRow) const
+{
+ return getTitle(myRows->Value(theRow));
+}
+
+
+TCollection_ExtendedString SALOMEDSImpl_AttributeTableOfInteger::GetRowUnit(const Standard_Integer theRow) const
+{
+ return getUnit(myRows->Value(theRow));
}
return myCols->Value(theColumn);
}
+void SALOMEDSImpl_AttributeTableOfInteger::SetColumnTitles(const Handle(TColStd_HSequenceOfExtendedString)& theTitles)
+{
+ if (theTitles->Length() != myNbColumns) Standard_Failure::Raise("Invalid number of columns");
+ int aLength = theTitles->Length(), i;
+ for(i = 1; i <= aLength; i++) myCols->SetValue(i, theTitles->Value(i));
+}
+
+Handle(TColStd_HSequenceOfExtendedString) SALOMEDSImpl_AttributeTableOfInteger::GetColumnTitles()
+{
+ Handle(TColStd_HSequenceOfExtendedString) aSeq = new TColStd_HSequenceOfExtendedString;
+ int aLength = myCols->Length(), i;
+ for(i=1; i<=aLength; i++) aSeq->Append(myCols->Value(i));
+ return aSeq;
+}
Standard_Integer SALOMEDSImpl_AttributeTableOfInteger::GetNbRows() const
{
Standard_Boolean SALOMEDSImpl_AttributeTableOfInteger::HasValue(const Standard_Integer theRow,
const Standard_Integer theColumn)
{
+ if(theRow > myNbRows || theRow < 1) return Standard_False;
+ if(theColumn > myNbColumns || theColumn < 1) return Standard_False;
Standard_Integer anIndex = (theRow-1)*myNbColumns + theColumn;
return myTable.IsBound(anIndex);
}
Standard_Integer SALOMEDSImpl_AttributeTableOfInteger::GetValue(const Standard_Integer theRow,
const Standard_Integer theColumn)
{
+ if(theRow > myNbRows || theRow < 1) Standard_Failure::Raise("Invalid cell index");
+ if(theColumn > myNbColumns || theColumn < 1) Standard_Failure::Raise("Invalid cell index");
+
Standard_Integer anIndex = (theRow-1)*myNbColumns + theColumn;
if(myTable.IsBound(anIndex)) return myTable.Find(anIndex);
Standard_EXPORT void SetRowData(const Standard_Integer theRow,const Handle(TColStd_HSequenceOfInteger)& theData) ;
Standard_EXPORT Handle_TColStd_HSequenceOfInteger GetRowData(const Standard_Integer theRow) ;
Standard_EXPORT void SetRowTitle(const Standard_Integer theRow,const TCollection_ExtendedString& theTitle) ;
+Standard_EXPORT void SetRowUnit(const Standard_Integer theRow,const TCollection_ExtendedString& theUnit) ;
+Standard_EXPORT TCollection_ExtendedString GetRowUnit(const Standard_Integer theRow) const;
+Standard_EXPORT void SetRowUnits(const Handle(TColStd_HSequenceOfExtendedString)& theUnits) ;
+Standard_EXPORT Handle(TColStd_HSequenceOfExtendedString) GetRowUnits();
+Standard_EXPORT void SetRowTitles(const Handle(TColStd_HSequenceOfExtendedString)& theTitles) ;
+Standard_EXPORT Handle(TColStd_HSequenceOfExtendedString) GetRowTitles();
Standard_EXPORT TCollection_ExtendedString GetRowTitle(const Standard_Integer theRow) const;
Standard_EXPORT void SetColumnData(const Standard_Integer theColumn,const Handle(TColStd_HSequenceOfInteger)& theData) ;
Standard_EXPORT Handle_TColStd_HSequenceOfInteger GetColumnData(const Standard_Integer theColumn) ;
Standard_EXPORT void SetColumnTitle(const Standard_Integer theColumn,const TCollection_ExtendedString& theTitle) ;
Standard_EXPORT TCollection_ExtendedString GetColumnTitle(const Standard_Integer theColumn) const;
+Standard_EXPORT void SetColumnTitles(const Handle(TColStd_HSequenceOfExtendedString)& theTitles);
+Standard_EXPORT Handle(TColStd_HSequenceOfExtendedString) GetColumnTitles();
Standard_EXPORT Standard_Integer GetNbRows() const;
Standard_EXPORT Standard_Integer GetNbColumns() const;
IMPLEMENT_STANDARD_HANDLE( SALOMEDSImpl_AttributeTableOfReal, SALOMEDSImpl_GenericAttribute )
IMPLEMENT_STANDARD_RTTIEXT( SALOMEDSImpl_AttributeTableOfReal, SALOMEDSImpl_GenericAttribute )
+#define SEPARATOR '\1'
+
+static TCollection_ExtendedString getUnit(TCollection_ExtendedString theString)
+{
+ TCollection_ExtendedString aString(theString);
+ int aPos = aString.Search(SEPARATOR);
+ if(aPos <= 0 || aPos == aString.Length() ) return TCollection_ExtendedString();
+ return aString.Split(aPos);
+}
+
+static TCollection_ExtendedString getTitle(TCollection_ExtendedString theString)
+{
+ TCollection_ExtendedString aString(theString);
+ int aPos = aString.Search(SEPARATOR);
+ if(aPos < 1) return aString;
+ if(aPos == 1) return TCollection_ExtendedString();
+ aString.Split(aPos-1);
+ return aString;
+}
+
const Standard_GUID& SALOMEDSImpl_AttributeTableOfReal::GetID()
{
static Standard_GUID SALOMEDSImpl_AttributeTableOfRealID ("128371A1-8F52-11d6-A8A3-0001021E8C7F");
return aSeq;
}
+
void SALOMEDSImpl_AttributeTableOfReal::SetRowTitle(const Standard_Integer theRow,
- const TCollection_ExtendedString& theTitle)
+ const TCollection_ExtendedString& theTitle)
{
CheckLocked();
Backup();
- myRows->SetValue(theRow,theTitle);
+ TCollection_ExtendedString aTitle(theTitle), aUnit = GetRowUnit(theRow);
+ if(aUnit.Length()>0) {
+ aTitle += SEPARATOR;
+ aTitle += aUnit;
+ }
+ myRows->SetValue(theRow, aTitle);
+}
+
+void SALOMEDSImpl_AttributeTableOfReal::SetRowUnit(const Standard_Integer theRow,
+ const TCollection_ExtendedString& theUnit)
+{
+ CheckLocked();
+ Backup();
+ TCollection_ExtendedString aTitle = GetRowTitle(theRow);
+ aTitle += SEPARATOR;
+ aTitle += theUnit;
+
+ myRows->SetValue(theRow, aTitle);
+}
+
+void SALOMEDSImpl_AttributeTableOfReal::SetRowUnits(const Handle(TColStd_HSequenceOfExtendedString)& theUnits)
+{
+ if (theUnits->Length() != GetNbRows()) Standard_Failure::Raise("Invalid number of rows");
+ int aLength = theUnits->Length(), i;
+ for(i = 1; i <= aLength; i++) SetRowUnit(i, theUnits->Value(i));
+}
+
+Handle(TColStd_HSequenceOfExtendedString) SALOMEDSImpl_AttributeTableOfReal::GetRowUnits()
+{
+ Handle(TColStd_HSequenceOfExtendedString) aSeq = new TColStd_HSequenceOfExtendedString;
+ int aLength = myRows->Length(), i;
+ for(i=1; i<=aLength; i++) aSeq->Append(getUnit(myRows->Value(i)));
+ return aSeq;
+}
+
+void SALOMEDSImpl_AttributeTableOfReal::SetRowTitles(const Handle(TColStd_HSequenceOfExtendedString)& theTitles)
+{
+ if (theTitles->Length() != GetNbRows()) Standard_Failure::Raise("Invalid number of rows");
+ int aLength = theTitles->Length(), i;
+ for(i = 1; i <= aLength; i++) SetRowTitle(i, theTitles->Value(i));
}
+Handle(TColStd_HSequenceOfExtendedString) SALOMEDSImpl_AttributeTableOfReal::GetRowTitles()
+{
+ Handle(TColStd_HSequenceOfExtendedString) aSeq = new TColStd_HSequenceOfExtendedString;
+ int aLength = myRows->Length(), i;
+ for(i=1; i<=aLength; i++) aSeq->Append(getTitle(myRows->Value(i)));
+ return aSeq;
+}
+
+
TCollection_ExtendedString SALOMEDSImpl_AttributeTableOfReal::GetRowTitle(const Standard_Integer theRow) const
{
- return myRows->Value(theRow);
+ return getTitle(myRows->Value(theRow));
}
+TCollection_ExtendedString SALOMEDSImpl_AttributeTableOfReal::GetRowUnit(const Standard_Integer theRow) const
+{
+ return getUnit(myRows->Value(theRow));
+}
+
void SALOMEDSImpl_AttributeTableOfReal::SetColumnData(const Standard_Integer theColumn,
const Handle(TColStd_HSequenceOfReal)& theData)
{
return myCols->Value(theColumn);
}
+void SALOMEDSImpl_AttributeTableOfReal::SetColumnTitles(const Handle(TColStd_HSequenceOfExtendedString)& theTitles)
+{
+ if (theTitles->Length() != myNbColumns) Standard_Failure::Raise("Invalid number of columns");
+ int aLength = theTitles->Length(), i;
+ for(i = 1; i <= aLength; i++) myCols->SetValue(i, theTitles->Value(i));
+}
+
+Handle(TColStd_HSequenceOfExtendedString) SALOMEDSImpl_AttributeTableOfReal::GetColumnTitles()
+{
+ Handle(TColStd_HSequenceOfExtendedString) aSeq = new TColStd_HSequenceOfExtendedString;
+ int aLength = myCols->Length(), i;
+ for(i=1; i<=aLength; i++) aSeq->Append(myCols->Value(i));
+ return aSeq;
+}
Standard_Integer SALOMEDSImpl_AttributeTableOfReal::GetNbRows() const
{
Standard_Boolean SALOMEDSImpl_AttributeTableOfReal::HasValue(const Standard_Integer theRow,
const Standard_Integer theColumn)
{
+ if(theRow > myNbRows || theRow < 1) return Standard_False;
+ if(theColumn > myNbColumns || theColumn < 1) return Standard_False;
Standard_Integer anIndex = (theRow-1)*myNbColumns + theColumn;
return myTable.IsBound(anIndex);
}
Standard_Real SALOMEDSImpl_AttributeTableOfReal::GetValue(const Standard_Integer theRow,
const Standard_Integer theColumn)
{
+ if(theRow > myNbRows || theRow < 1) Standard_Failure::Raise("Invalid cell index");
+ if(theColumn > myNbColumns || theColumn < 1) Standard_Failure::Raise("Invalid cell index");
+
Standard_Integer anIndex = (theRow-1)*myNbColumns + theColumn;
if(myTable.IsBound(anIndex)) return myTable.Find(anIndex);
Standard_EXPORT void SetRowData(const Standard_Integer theRow,const Handle(TColStd_HSequenceOfReal)& theData) ;
Standard_EXPORT Handle_TColStd_HSequenceOfReal GetRowData(const Standard_Integer theRow) ;
Standard_EXPORT void SetRowTitle(const Standard_Integer theRow,const TCollection_ExtendedString& theTitle) ;
+Standard_EXPORT void SetRowUnit(const Standard_Integer theRow,const TCollection_ExtendedString& theUnit) ;
+Standard_EXPORT TCollection_ExtendedString GetRowUnit(const Standard_Integer theRow) const;
+Standard_EXPORT void SetRowUnits(const Handle(TColStd_HSequenceOfExtendedString)& theUnits) ;
+Standard_EXPORT Handle(TColStd_HSequenceOfExtendedString) GetRowUnits();
+Standard_EXPORT void SetRowTitles(const Handle(TColStd_HSequenceOfExtendedString)& theTitles) ;
+Standard_EXPORT Handle(TColStd_HSequenceOfExtendedString) GetRowTitles();
Standard_EXPORT TCollection_ExtendedString GetRowTitle(const Standard_Integer theRow) const;
Standard_EXPORT void SetColumnData(const Standard_Integer theColumn,const Handle(TColStd_HSequenceOfReal)& theData) ;
Standard_EXPORT Handle_TColStd_HSequenceOfReal GetColumnData(const Standard_Integer theColumn) ;
Standard_EXPORT void SetColumnTitle(const Standard_Integer theColumn,const TCollection_ExtendedString& theTitle) ;
+Standard_EXPORT void SetColumnTitles(const Handle(TColStd_HSequenceOfExtendedString)& theTitles);
+Standard_EXPORT Handle(TColStd_HSequenceOfExtendedString) GetColumnTitles();
Standard_EXPORT TCollection_ExtendedString GetColumnTitle(const Standard_Integer theColumn) const;
Standard_EXPORT Standard_Integer GetNbRows() const;
Standard_EXPORT Standard_Integer GetNbColumns() const;
typedef NCollection_DataMap<Standard_Integer, TCollection_ExtendedString>::Iterator DataMapIterator;
+#define SEPARATOR '\1'
+
+static TCollection_ExtendedString getUnit(TCollection_ExtendedString theString)
+{
+ TCollection_ExtendedString aString(theString);
+ int aPos = aString.Search(SEPARATOR);
+ if(aPos <= 0 || aPos == aString.Length() ) return TCollection_ExtendedString();
+ return aString.Split(aPos);
+}
+
+static TCollection_ExtendedString getTitle(TCollection_ExtendedString theString)
+{
+ TCollection_ExtendedString aString(theString);
+ int aPos = aString.Search(SEPARATOR);
+ if(aPos < 1) return aString;
+ if(aPos == 1) return TCollection_ExtendedString();
+ aString.Split(aPos-1);
+ return aString;
+}
+
const Standard_GUID& SALOMEDSImpl_AttributeTableOfString::GetID()
{
static Standard_GUID SALOMEDSImpl_AttributeTableOfStringID ("128371A4-8F52-11d6-A8A3-0001021E8C7F");
}
}
-void SALOMEDSImpl_AttributeTableOfString::SetTitle(const TCollection_ExtendedString& theTitle)
+void SALOMEDSImpl_AttributeTableOfString::SetRowTitle(const Standard_Integer theRow,
+ const TCollection_ExtendedString& theTitle)
{
CheckLocked();
Backup();
- myTitle = theTitle;
+ TCollection_ExtendedString aTitle(theTitle), aUnit = GetRowUnit(theRow);
+ if(aUnit.Length()>0) {
+ aTitle += SEPARATOR;
+ aTitle += aUnit;
+ }
+ myRows->SetValue(theRow, aTitle);
}
-TCollection_ExtendedString SALOMEDSImpl_AttributeTableOfString::GetTitle() const
+void SALOMEDSImpl_AttributeTableOfString::SetRowUnit(const Standard_Integer theRow,
+ const TCollection_ExtendedString& theUnit)
{
- return myTitle;
+ CheckLocked();
+ Backup();
+ TCollection_ExtendedString aTitle = GetRowTitle(theRow);
+ aTitle += SEPARATOR;
+ aTitle += theUnit;
+
+ myRows->SetValue(theRow, aTitle);
+}
+
+void SALOMEDSImpl_AttributeTableOfString::SetRowUnits(const Handle(TColStd_HSequenceOfExtendedString)& theUnits)
+{
+ if (theUnits->Length() != GetNbRows()) Standard_Failure::Raise("Invalid number of rows");
+ int aLength = theUnits->Length(), i;
+ for(i = 1; i <= aLength; i++) SetRowUnit(i, theUnits->Value(i));
+}
+
+Handle(TColStd_HSequenceOfExtendedString) SALOMEDSImpl_AttributeTableOfString::GetRowUnits()
+{
+ Handle(TColStd_HSequenceOfExtendedString) aSeq = new TColStd_HSequenceOfExtendedString;
+ int aLength = myRows->Length(), i;
+ for(i=1; i<=aLength; i++) aSeq->Append(getUnit(myRows->Value(i)));
+ return aSeq;
+}
+
+void SALOMEDSImpl_AttributeTableOfString::SetRowTitles(const Handle(TColStd_HSequenceOfExtendedString)& theTitles)
+{
+ if (theTitles->Length() != GetNbRows()) Standard_Failure::Raise("Invalid number of rows");
+ int aLength = theTitles->Length(), i;
+ for(i = 1; i <= aLength; i++) SetRowTitle(i, theTitles->Value(i));
+}
+
+Handle(TColStd_HSequenceOfExtendedString) SALOMEDSImpl_AttributeTableOfString::GetRowTitles()
+{
+ Handle(TColStd_HSequenceOfExtendedString) aSeq = new TColStd_HSequenceOfExtendedString;
+ int aLength = myRows->Length(), i;
+ for(i=1; i<=aLength; i++) aSeq->Append(getTitle(myRows->Value(i)));
+ return aSeq;
+}
+
+
+TCollection_ExtendedString SALOMEDSImpl_AttributeTableOfString::GetRowTitle(const Standard_Integer theRow) const
+{
+ return getTitle(myRows->Value(theRow));
+}
+
+
+TCollection_ExtendedString SALOMEDSImpl_AttributeTableOfString::GetRowUnit(const Standard_Integer theRow) const
+{
+ return getUnit(myRows->Value(theRow));
}
void SALOMEDSImpl_AttributeTableOfString::SetRowData(const Standard_Integer theRow,
if(theRow > myNbRows) myNbRows = theRow;
}
+void SALOMEDSImpl_AttributeTableOfString::SetTitle(const TCollection_ExtendedString& theTitle)
+{
+ CheckLocked();
+ Backup();
+ myTitle = theTitle;
+}
+
+TCollection_ExtendedString SALOMEDSImpl_AttributeTableOfString::GetTitle() const
+{
+ return myTitle;
+}
+
Handle(TColStd_HSequenceOfExtendedString) SALOMEDSImpl_AttributeTableOfString::GetRowData(const Standard_Integer theRow)
{
Handle(TColStd_HSequenceOfExtendedString) aSeq = new TColStd_HSequenceOfExtendedString();
return aSeq;
}
-void SALOMEDSImpl_AttributeTableOfString::SetRowTitle(const Standard_Integer theRow,
- const TCollection_ExtendedString& theTitle)
-{
- CheckLocked();
- Backup();
- myRows->SetValue(theRow,theTitle);
-}
-
-TCollection_ExtendedString SALOMEDSImpl_AttributeTableOfString::GetRowTitle(const Standard_Integer theRow) const
-{
- return myRows->Value(theRow);
-}
-
-
void SALOMEDSImpl_AttributeTableOfString::SetColumnData(const Standard_Integer theColumn,
const Handle(TColStd_HSequenceOfExtendedString)& theData)
{
}
+void SALOMEDSImpl_AttributeTableOfString::SetColumnTitles(const Handle(TColStd_HSequenceOfExtendedString)& theTitles)
+{
+ if (theTitles->Length() != myNbColumns) Standard_Failure::Raise("Invalid number of columns");
+ int aLength = theTitles->Length(), i;
+ for(i = 1; i <= aLength; i++) myCols->SetValue(i, theTitles->Value(i));
+}
+
+Handle(TColStd_HSequenceOfExtendedString) SALOMEDSImpl_AttributeTableOfString::GetColumnTitles()
+{
+ Handle(TColStd_HSequenceOfExtendedString) aSeq = new TColStd_HSequenceOfExtendedString;
+ int aLength = myCols->Length(), i;
+ for(i=1; i<=aLength; i++) aSeq->Append(myCols->Value(i));
+ return aSeq;
+}
+
+
Standard_Integer SALOMEDSImpl_AttributeTableOfString::GetNbRows() const
{
return myNbRows;
}
Standard_Boolean SALOMEDSImpl_AttributeTableOfString::HasValue(const Standard_Integer theRow,
- const Standard_Integer theColumn)
+ const Standard_Integer theColumn)
{
+ if(theRow > myNbRows || theRow < 1) return Standard_False;
+ if(theColumn > myNbColumns || theColumn < 1) return Standard_False;
+
Standard_Integer anIndex = (theRow-1)*myNbColumns + theColumn;
return myTable.IsBound(anIndex);
}
TCollection_ExtendedString SALOMEDSImpl_AttributeTableOfString::GetValue(const Standard_Integer theRow,
- const Standard_Integer theColumn)
+ const Standard_Integer theColumn)
{
+ if(theRow > myNbRows || theRow < 1) Standard_Failure::Raise("Invalid cell index");
+ if(theColumn > myNbColumns || theColumn < 1) Standard_Failure::Raise("Invalid cell index");
+
Standard_Integer anIndex = (theRow-1)*myNbColumns + theColumn;
if(myTable.IsBound(anIndex)) return myTable.Find(anIndex);
Standard_EXPORT void SetRowData(const Standard_Integer theRow,const Handle(TColStd_HSequenceOfExtendedString)& theData) ;
Standard_EXPORT Handle_TColStd_HSequenceOfExtendedString GetRowData(const Standard_Integer theRow) ;
Standard_EXPORT void SetRowTitle(const Standard_Integer theRow,const TCollection_ExtendedString& theTitle) ;
+Standard_EXPORT void SetRowUnit(const Standard_Integer theRow,const TCollection_ExtendedString& theUnit) ;
+Standard_EXPORT TCollection_ExtendedString GetRowUnit(const Standard_Integer theRow) const;
+Standard_EXPORT void SetRowUnits(const Handle(TColStd_HSequenceOfExtendedString)& theUnits) ;
+Standard_EXPORT Handle(TColStd_HSequenceOfExtendedString) GetRowUnits();
+Standard_EXPORT void SetRowTitles(const Handle(TColStd_HSequenceOfExtendedString)& theTitles) ;
+Standard_EXPORT Handle(TColStd_HSequenceOfExtendedString) GetRowTitles();
Standard_EXPORT TCollection_ExtendedString GetRowTitle(const Standard_Integer theRow) const;
Standard_EXPORT void SetColumnData(const Standard_Integer theColumn,const Handle(TColStd_HSequenceOfExtendedString)& theData) ;
Standard_EXPORT Handle_TColStd_HSequenceOfExtendedString GetColumnData(const Standard_Integer theColumn) ;
Standard_EXPORT void SetColumnTitle(const Standard_Integer theColumn,const TCollection_ExtendedString& theTitle) ;
Standard_EXPORT TCollection_ExtendedString GetColumnTitle(const Standard_Integer theColumn) const;
+Standard_EXPORT void SetColumnTitles(const Handle(TColStd_HSequenceOfExtendedString)& theTitles);
+Standard_EXPORT Handle(TColStd_HSequenceOfExtendedString) GetColumnTitles();
Standard_EXPORT Standard_Integer GetNbRows() const;
Standard_EXPORT Standard_Integer GetNbColumns() const;
using namespace std;
#include "SALOMEDSImpl_AttributeTarget.hxx"
#include "SALOMEDSImpl_AttributeReference.hxx"
+#include "SALOMEDSImpl_Study.hxx"
#include <TDF_RelocationTable.hxx>
#include <TDF_ListIteratorOfAttributeList.hxx>
#include <Standard_GUID.hxx>
}
//=======================================================================
-//function : Append
+//function : Add
//purpose :
//=======================================================================
-void SALOMEDSImpl_AttributeTarget::Append(TDF_Label& theReferencedObject)
+void SALOMEDSImpl_AttributeTarget::Add(const Handle(SALOMEDSImpl_SObject)& theSO)
{
Backup();
+ TDF_Label aRefLabel = theSO->GetLabel();
Handle(SALOMEDSImpl_AttributeReference) aReference;
- if (theReferencedObject.FindAttribute(SALOMEDSImpl_AttributeReference::GetID(),aReference)) {
+ if (aRefLabel.FindAttribute(SALOMEDSImpl_AttributeReference::GetID(),aReference)) {
TDF_ListIteratorOfAttributeList anIter(GetVariables());
- for(;anIter.More();anIter.Next()) if(anIter.Value()->Label() == theReferencedObject) return; //BugID: PAL6192
+ for(;anIter.More();anIter.Next()) if(anIter.Value()->Label() == aRefLabel) return; //BugID: PAL6192
GetVariables().Append(aReference);
}
}
//function : Get
//purpose :
//=======================================================================
-void SALOMEDSImpl_AttributeTarget::Get(TDF_LabelList& theReferencedObjects)
+Handle(TColStd_HSequenceOfTransient) SALOMEDSImpl_AttributeTarget::Get()
{
- theReferencedObjects.Clear();
+ Handle(TColStd_HSequenceOfTransient) aSeq = new TColStd_HSequenceOfTransient;
+
TDF_ListIteratorOfAttributeList anIter(GetVariables());
for(;anIter.More();anIter.Next()) {
- theReferencedObjects.Append(anIter.Value()->Label());
+ const TDF_Label& aLabel = anIter.Value()->Label();
+ aSeq->Append( SALOMEDSImpl_Study::SObject(aLabel));
}
+ return aSeq;
}
//=======================================================================
//function : Remove
//purpose :
//=======================================================================
-void SALOMEDSImpl_AttributeTarget::Remove(TDF_Label& theReferencedObject)
+void SALOMEDSImpl_AttributeTarget::Remove(const Handle(SALOMEDSImpl_SObject)& theSO)
{
Backup();
+ TDF_Label aRefLabel = theSO->GetLabel();
TDF_ListIteratorOfAttributeList anIter(GetVariables());
for(;anIter.More();anIter.Next()) {
- if (anIter.Value()->Label() == theReferencedObject) {
+ if (anIter.Value()->Label() == aRefLabel) {
GetVariables().Remove(anIter);
return;
}
#include <TDF_Label.hxx>
#include <TDF_AttributeList.hxx>
#include <TCollection_ExtendedString.hxx>
+#include <TColStd_HSequenceOfTransient.hxx>
#include "SALOMEDSImpl_GenericAttribute.hxx"
+#include "SALOMEDSImpl_SObject.hxx"
class Standard_GUID;
class Handle(TDF_Attribute);
Standard_EXPORT static const Standard_GUID& GetID() ;
Standard_EXPORT static Handle_SALOMEDSImpl_AttributeTarget Set(const TDF_Label& label) ;
Standard_EXPORT SALOMEDSImpl_AttributeTarget();
-Standard_EXPORT void SALOMEDSImpl_AttributeTarget::Append(TDF_Label& theReferencedObject);
-Standard_EXPORT void SALOMEDSImpl_AttributeTarget::Get(TDF_LabelList& theReferencedObjects);
-Standard_EXPORT void SALOMEDSImpl_AttributeTarget::Remove(TDF_Label& theReferencedObject);
+Standard_EXPORT void SALOMEDSImpl_AttributeTarget::Add(const Handle(SALOMEDSImpl_SObject)& theSO);
+Standard_EXPORT Handle(TColStd_HSequenceOfTransient) SALOMEDSImpl_AttributeTarget::Get();
+Standard_EXPORT void SALOMEDSImpl_AttributeTarget::Remove(const Handle(SALOMEDSImpl_SObject)& theSO);
Standard_EXPORT TCollection_ExtendedString GetRelation() { return myRelation; }
Standard_EXPORT void SetRelation(const TCollection_ExtendedString& theRelation);
Standard_EXPORT TDF_AttributeList& GetVariables() { return myVariables; }
}
//=======================================================================
-//function : GetTextColor
+//function : TextColor
//purpose :
//=======================================================================
-Handle(TColStd_HArray1OfReal) SALOMEDSImpl_AttributeTextColor::GetTextColor()
+Handle(TColStd_HArray1OfReal) SALOMEDSImpl_AttributeTextColor::TextColor()
{
return myValue;
}
void SALOMEDSImpl_AttributeTextColor::Restore(const Handle(TDF_Attribute)& with)
{
- Handle(TColStd_HArray1OfReal) s = Handle(SALOMEDSImpl_AttributeTextColor)::DownCast (with)->GetTextColor ();
+ Handle(TColStd_HArray1OfReal) s = Handle(SALOMEDSImpl_AttributeTextColor)::DownCast (with)->TextColor ();
ChangeArray(s);
return;
}
Standard_EXPORT SALOMEDSImpl_AttributeTextColor();
Standard_EXPORT const Standard_GUID& ID() const;
Standard_EXPORT void SetTextColor(const Standard_Real R, const Standard_Real G, const Standard_Real B);
-Standard_EXPORT Handle(TColStd_HArray1OfReal) GetTextColor();
+Standard_EXPORT Handle(TColStd_HArray1OfReal) TextColor();
Standard_EXPORT void ChangeArray(const Handle(TColStd_HArray1OfReal)& newArray);
Standard_EXPORT void Restore(const Handle(TDF_Attribute)& with) ;
Standard_EXPORT Handle_TDF_Attribute NewEmpty() const;
//=======================================================================
-//function : SetTextColor
+//function : SetTextHighlightColor
//purpose :
//=======================================================================
-void SALOMEDSImpl_AttributeTextHighlightColor::SetTextColor(const Standard_Real R,
- const Standard_Real G,
- const Standard_Real B)
+void SALOMEDSImpl_AttributeTextHighlightColor::SetTextHighlightColor(const Standard_Real R,
+ const Standard_Real G,
+ const Standard_Real B)
{
CheckLocked();
if(myValue.IsNull()) return;
}
//=======================================================================
-//function : GetTextColor
+//function : TextHighlightColor
//purpose :
//=======================================================================
-Handle(TColStd_HArray1OfReal) SALOMEDSImpl_AttributeTextHighlightColor::GetTextColor()
+Handle(TColStd_HArray1OfReal) SALOMEDSImpl_AttributeTextHighlightColor::TextHighlightColor()
{
return myValue;
}
void SALOMEDSImpl_AttributeTextHighlightColor::Restore(const Handle(TDF_Attribute)& with)
{
- Handle(TColStd_HArray1OfReal) s = Handle(SALOMEDSImpl_AttributeTextHighlightColor)::DownCast (with)->GetTextColor ();
+ Handle(TColStd_HArray1OfReal) s = Handle(SALOMEDSImpl_AttributeTextHighlightColor)::DownCast (with)->TextHighlightColor ();
ChangeArray(s);
return;
}
Standard_EXPORT virtual void Load(const TCollection_AsciiString&);
Standard_EXPORT static const Standard_GUID& GetID() ;
Standard_EXPORT SALOMEDSImpl_AttributeTextHighlightColor();
-Standard_EXPORT void SetTextColor(const Standard_Real R, const Standard_Real G, const Standard_Real B);
-Standard_EXPORT Handle(TColStd_HArray1OfReal) GetTextColor();
+Standard_EXPORT void SetTextHighlightColor(const Standard_Real R, const Standard_Real G, const Standard_Real B);
+Standard_EXPORT Handle(TColStd_HArray1OfReal) TextHighlightColor();
Standard_EXPORT void ChangeArray(const Handle(TColStd_HArray1OfReal)& newArray);
Standard_EXPORT const Standard_GUID& ID() const;
Standard_EXPORT void Restore(const Handle(TDF_Attribute)& with) ;
SALOMEDSImpl_ChildIterator::SALOMEDSImpl_ChildIterator(const TDF_Label& theLabel)
{
- _so = SALOMEDSImpl_Study::GetStudy(theLabel)->GetSObject(theLabel);
+ _so = SALOMEDSImpl_Study::SObject(theLabel);
_it = TDF_ChildIterator(theLabel);
}
Handle(SALOMEDSImpl_SObject) SALOMEDSImpl_ChildIterator::Value()
{
- return SALOMEDSImpl_Study::GetStudy(_it.Value())->GetSObject(_it.Value());
+ return SALOMEDSImpl_Study::SObject(_it.Value());
}
TDF_Label SALOMEDSImpl_ChildIterator::Label()
return ga->Type().ToCString();
}
+char* SALOMEDSImpl_GenericAttribute::Impl_GetClassType(const Handle(TDF_Attribute)& theAttr)
+{
+ Handle(SALOMEDSImpl_GenericAttribute) ga = Handle(SALOMEDSImpl_GenericAttribute)::DownCast(theAttr);
+ return ga->GetClassType().ToCString();
+}
+
void SALOMEDSImpl_GenericAttribute::Impl_CheckLocked(const Handle(TDF_Attribute)& theAttr)
{
Handle(SALOMEDSImpl_GenericAttribute) ga = Handle(SALOMEDSImpl_GenericAttribute)::DownCast(theAttr);
{
TDF_Label aLabel = Label();
if(aLabel.IsNull()) return NULL;
- return SALOMEDSImpl_Study::GetStudy(aLabel)->GetSObject(aLabel);
+ return SALOMEDSImpl_Study::SObject(aLabel);
}
Standard_EXPORT Handle(SALOMEDSImpl_SObject) GetSObject();
Standard_EXPORT static char* Impl_GetType(const Handle(TDF_Attribute)& theAttr);
+Standard_EXPORT static char* Impl_GetClassType(const Handle(TDF_Attribute)& theAttr);
Standard_EXPORT static void Impl_CheckLocked(const Handle(TDF_Attribute)& theAttr);
public:
TCollection_AsciiString res = "";
Handle(SALOMEDSImpl_AttributeComment) type;
if ( _lab.FindAttribute(SALOMEDSImpl_AttributeComment::GetID(),type) ) {
- res = type->Get();
+ res = type->Value();
}
return res;
//============================================================================
Handle(SALOMEDSImpl_SComponent) SALOMEDSImpl_SComponentIterator::Value()
{
- return SALOMEDSImpl_Study::GetStudy(_it.Value())->GetSComponent (_it.Value());
+ return SALOMEDSImpl_Study::SComponent(_it.Value());
}
TCollection_AsciiString aStr = "";
Handle(SALOMEDSImpl_AttributeName) aName;
if (_lab.FindAttribute(SALOMEDSImpl_AttributeName::GetID(), aName)) {
- aStr = aName->Get();
+ aStr = aName->Value();
}
return aStr;
}
TCollection_AsciiString aStr = "";
Handle(SALOMEDSImpl_AttributeComment) aComment;
if (_lab.FindAttribute(SALOMEDSImpl_AttributeComment::GetID(), aComment)) {
- aStr = aComment->Get();
+ aStr = aComment->Value();
}
return aStr;
}
for ( ; anIterator.More(); anIterator.Next() ) {
aLabel = anIterator.Value();
if(aLabel.FindAttribute(SALOMEDSImpl_AttributeName::GetID(), anAttr)) {
- if(anAttr->Get() == aToken) {
+ if(anAttr->Value() == aToken) {
aToken = aPath.Token("/", i+1); //Check if it was the last part of the path
if(aToken.Length() == 0) { //The searched label is found (no part of the path is left)
return GetSObject(aLabel);
for(; anIter.More(); anIter.Next()) {
TDF_Label aLabel = anIter.Value();
Handle(SALOMEDSImpl_AttributeName) aName;
- if (aLabel.FindAttribute(SALOMEDSImpl_AttributeName::GetID(), aName)) aResultSeq->Append(aName->Get());
+ if (aLabel.FindAttribute(SALOMEDSImpl_AttributeName::GetID(), aName)) aResultSeq->Append(aName->Value());
}
return aResultSeq;
if (anID->Value() == DIRECTORYID) {
Handle(SALOMEDSImpl_AttributeName) aName;
if (aLabel.FindAttribute(SALOMEDSImpl_AttributeName::GetID(), aName)) {
- aResultSeq->Append(aName->Get());
+ aResultSeq->Append(aName->Value());
}
}
}
if (anID->Value() == FILELOCALID) {
Handle(SALOMEDSImpl_AttributePersistentRef) aName;
if(aLabel.FindAttribute(SALOMEDSImpl_AttributePersistentRef::GetID(), aName)) {
- TCollection_ExtendedString aFileName = aName->Get();
+ TCollection_ExtendedString aFileName = aName->Value();
if(aFileName.Length() > 0)
aResultSeq->Append(aFileName.Split(strlen(FILEID)));
}
for(; anIter.More(); anIter.Next()) {
TDF_Label aLabel = anIter.Value();
Handle(SALOMEDSImpl_AttributeName) aName;
- if (aLabel.FindAttribute(SALOMEDSImpl_AttributeName::GetID(), aName)) aResultSeq->Append(aName->Get());
+ if (aLabel.FindAttribute(SALOMEDSImpl_AttributeName::GetID(), aName)) aResultSeq->Append(aName->Value());
}
return aResultSeq;
{
if (it.Value().FindAttribute(SALOMEDSImpl_AttributeName::GetID(), anAttr))
{
- TCollection_AsciiString Val(anAttr->Get());
+ TCollection_AsciiString Val(anAttr->Value());
if (Val == theObjectName)
{
RefSO = GetSObject(it.Value());
return NULL;
}
+Handle(SALOMEDSImpl_SObject) SALOMEDSImpl_Study::SObject(const TDF_Label& theLabel)
+{
+ return GetStudy(theLabel)->GetSObject(theLabel);
+}
+
+Handle(SALOMEDSImpl_SComponent) SALOMEDSImpl_Study::SComponent(const TDF_Label& theLabel)
+{
+ return GetStudy(theLabel)->GetSComponent(theLabel);
+}
+
+
void SALOMEDSImpl_Study::IORUpdated(const Handle(SALOMEDSImpl_AttributeIOR)& theAttribute)
{
TCollection_AsciiString aString;
Handle(TColStd_HSequenceOfTransient) SALOMEDSImpl_Study::FindDependances(const Handle(SALOMEDSImpl_SObject)& anObject)
{
_errorCode = "";
- Handle(TColStd_HSequenceOfTransient) aSeq = new TColStd_HSequenceOfTransient;
+ Handle(TColStd_HSequenceOfTransient) aSeq;
Handle(SALOMEDSImpl_AttributeTarget) aTarget;
if (anObject->GetLabel().FindAttribute(SALOMEDSImpl_AttributeTarget::GetID(), aTarget)) {
- TDF_LabelList aLabelList;
- aTarget->Get(aLabelList);
- TDF_ListIteratorOfLabelList anIter(aLabelList);
- for(; anIter.More();anIter.Next()) {
- aSeq->Append(GetSObject(anIter.Value()));
- }
- return aSeq;
+ return aTarget->Get();
}
return aSeq;
public:
static Handle(SALOMEDSImpl_Study) GetStudy(const TDF_Label& theLabel);
+ static Handle(SALOMEDSImpl_SObject) SObject(const TDF_Label& theLabel);
+ static Handle(SALOMEDSImpl_SComponent) SComponent(const TDF_Label& theLabel);
static void IORUpdated(const Handle(SALOMEDSImpl_AttributeIOR)& theAttribute);
//! standard constructor
if (Lab.FindAttribute(SALOMEDSImpl_AttributeReference::GetID(), aReference)) {
Handle(SALOMEDSImpl_AttributeTarget) aTarget;
if (aReference->Get().FindAttribute(SALOMEDSImpl_AttributeTarget::GetID(),aTarget))
- aTarget->Remove(Lab);
+ aTarget->Remove(SALOMEDSImpl_Study::SObject(Lab));
}
Handle(SALOMEDSImpl_AttributeIOR) anAttr; // postponed removing of CORBA objects
if (Lab.FindAttribute(SALOMEDSImpl_AttributeReference::GetID(), aReference)) {
Handle(SALOMEDSImpl_AttributeTarget) aTarget;
if (aReference->Get().FindAttribute(SALOMEDSImpl_AttributeTarget::GetID(),aTarget))
- aTarget->Remove(Lab);
+ aTarget->Remove(SALOMEDSImpl_Study::SObject(Lab));
}
Handle(SALOMEDSImpl_AttributeIOR) anAttr; // postponed removing of CORBA objects
if (Lab.FindAttribute(SALOMEDSImpl_AttributeIOR::GetID(), anAttr))
if (aLabel.FindAttribute(SALOMEDSImpl_AttributeReference::GetID(), aReference)) {
Handle(SALOMEDSImpl_AttributeTarget) aTarget;
if (aReference->Get().FindAttribute(SALOMEDSImpl_AttributeTarget::GetID(),aTarget))
- aTarget->Remove(aLabel);
+ aTarget->Remove(SALOMEDSImpl_Study::SObject(aLabel));
}
Handle(SALOMEDSImpl_AttributeIOR) anAttr; // postponed removing of CORBA objects
if (aLabel.FindAttribute(SALOMEDSImpl_AttributeIOR::GetID(), anAttr))
int aLocked = anSCO->GetStudy()->GetProperties()->IsLocked();
if (aLocked) anSCO->GetStudy()->GetProperties()->SetLocked(false);
- TCollection_ExtendedString Res(Att->Get());
+ TCollection_ExtendedString Res(Att->Value());
Handle(SALOMEDSImpl_AttributeComment) type;
TCollection_ExtendedString DataType;
if (Lab.FindAttribute(SALOMEDSImpl_AttributeComment::GetID(),type))
- DataType = type->Get();
+ DataType = type->Value();
// associate the driver to the SComponent
if(aDriver == NULL) {
TDF_Label RefLab = theReferencedObject->GetLabel();
SALOMEDSImpl_AttributeReference::Set(Lab,RefLab);
- SALOMEDSImpl_AttributeTarget::Set(RefLab)->Append(Lab);
+ SALOMEDSImpl_AttributeTarget::Set(RefLab)->Add(SALOMEDSImpl_Study::SObject(Lab));
if(!_callbackOnRemove.IsNull() && Lab.IsDescendant(_doc->Main())) _callbackOnRemove->OnRemoveSObject(me);
return true;
TDF_Label RefLab = theReferencedObject->GetLabel();
Handle(SALOMEDSImpl_AttributeTarget) aTarget;
- if(RefLab.FindAttribute(SALOMEDSImpl_AttributeTarget::GetID(), aTarget)) aTarget->Remove(Lab);
+ if(RefLab.FindAttribute(SALOMEDSImpl_AttributeTarget::GetID(), aTarget))
+ aTarget->Remove(SALOMEDSImpl_Study::SObject(Lab));
return true;
}
if (current.FindAttribute(SALOMEDSImpl_AttributeLocalID::GetID(), anID))
if (anID->Value() == FILELOCALID) continue; //SRN: This attribute store a file name, skip it
- TCollection_AsciiString persist_ref(Att->Get());
- Handle(SALOMEDSImpl_SObject) so = SALOMEDSImpl_Study::GetStudy(current)->GetSObject(current);
+ TCollection_AsciiString persist_ref(Att->Value());
+ Handle(SALOMEDSImpl_SObject) so = SALOMEDSImpl_Study::SObject(current);
TCollection_AsciiString ior_string = driver->LocalPersistentIDToIOR(so,
persist_ref,
isMultiFile,
if(!aCompSpecificSO.IsNull()) {
Handle(SALOMEDSImpl_AttributeInteger) anInteger;
if(aCompSpecificSO->GetLabel().FindAttribute(SALOMEDSImpl_AttributeInteger::GetID(), anInteger)) {
- anInteger->Set(-1);
- while(anInteger->Get() < 0) { sleep(2); if(++aTimeOut > AUTO_SAVE_TIME_OUT_IN_SECONDS) break; }
+ anInteger->SetValue(-1);
+ while(anInteger->Value() < 0) { sleep(2); if(++aTimeOut > AUTO_SAVE_TIME_OUT_IN_SECONDS) break; }
} // if(aCompSpecificSO->FindAttribute(anInteger, "AttributeInteger"))
} // if(!CORBA::is_nil(aCompSpecificSO))
} // if (strcmp(aRow[0], componentDataType) == 0)
if (anEmpty) continue;
}
- Handle(SALOMEDSImpl_SObject) SO = SALOMEDSImpl_Study::GetStudy(itchild.Value())->GetSObject(itchild.Value());
+ Handle(SALOMEDSImpl_SObject) SO = SALOMEDSImpl_Study::SObject(itchild.Value());
char* scoid = (char*) SO->GetID().ToCString();
hdf_group_sobject = new HDFgroup(scoid, hdf_group_datatype);
Handle(SALOMEDSImpl_AttributeName) aNameAttribute;
if (aReferenced.FindAttribute(SALOMEDSImpl_AttributeName::GetID(), aNameAttribute)) {
anEntry += " ";
- anEntry += aNameAttribute->Get();
+ anEntry += aNameAttribute->Value();
}
SALOMEDSImpl_AttributeComment::Set(aAuxTargetLabel, TCollection_ExtendedString(anEntry));
continue;
_errorCode = "component has no IOR";
return false;
}
- return theEngine->CanPaste(aCompName->Get(), anObjID->Get());
+ return theEngine->CanPaste(aCompName->Value(), anObjID->Value());
}
//============================================================================
aAuxSourceLabel.FindAttribute(SALOMEDSImpl_AttributeInteger::GetID(), anObjID);
Handle(SALOMEDSImpl_AttributeComment) aComponentName;
theSource.Root().FindAttribute(SALOMEDSImpl_AttributeComment::GetID(), aComponentName);
- TCollection_AsciiString aCompName = aComponentName->Get();
+ TCollection_AsciiString aCompName = aComponentName->Value();
- if (theEngine->CanPaste(aCompName, anObjID->Get())) {
- TCollection_ExtendedString aTMPStr = aNameAttribute->Get();
+ if (theEngine->CanPaste(aCompName, anObjID->Value())) {
+ TCollection_ExtendedString aTMPStr = aNameAttribute->Value();
int aLen = aTMPStr.Length();
unsigned char* aStream = NULL;
if(aLen > 0) {
if (isFirstElement) {
TCollection_AsciiString aDestEntry = theEngine->PasteInto(aStream,
aLen,
- anObjID->Get(),
+ anObjID->Value(),
aPastedSO->GetFatherComponent());
TDF_Tool::Label(theDestinationStart.Data(), aDestEntry, aTargetLabel);
} else
- theEngine->PasteInto(aStream, aLen, anObjID->Get(), aPastedSO);
+ theEngine->PasteInto(aStream, aLen, anObjID->Value(), aPastedSO);
if(aStream != NULL) delete []aStream;
}
// check auxiliary label for Comment => reference or name attribute of the referenced object
Handle(SALOMEDSImpl_AttributeComment) aCommentAttribute;
if (aAuxSourceLabel.FindAttribute(SALOMEDSImpl_AttributeComment::GetID(), aCommentAttribute)) {
- char * anEntry = new char[aCommentAttribute->Get().Length() + 1];
- strcpy(anEntry, TCollection_AsciiString(aCommentAttribute->Get()).ToCString());
+ char * anEntry = new char[aCommentAttribute->Value().Length() + 1];
+ strcpy(anEntry, TCollection_AsciiString(aCommentAttribute->Value()).ToCString());
char* aNameStart = strchr(anEntry, ' ');
if (aNameStart) {
*aNameStart = '\0';
TDF_Label aRefLabel;
TDF_Tool::Label(aTargetLabel.Data(), anEntry, aRefLabel);
SALOMEDSImpl_AttributeReference::Set(aTargetLabel, aRefLabel);
- SALOMEDSImpl_AttributeTarget::Set(aRefLabel)->Append(aTargetLabel); // target attributes structure support
+ // target attributes structure support
+ SALOMEDSImpl_AttributeTarget::Set(aRefLabel)->Add(SALOMEDSImpl_Study::SObject(aTargetLabel));
} else {
if (aNameStart) SALOMEDSImpl_AttributeName::Set(aTargetLabel, aNameStart);
else SALOMEDSImpl_AttributeName::Set(aTargetLabel, TCollection_ExtendedString("Reference to:")+anEntry);
_errorCode = "No study ID was found";
return NULL;
}
- int aCStudyID = aStudyIDAttribute->Get();
+ int aCStudyID = aStudyIDAttribute->Value();
// CAF document of current study usage
Handle(TDocStd_Document) aDocument = GetDocumentOfStudy(aStudy);
PasteLabel(aStudy, theEngine, anIterator.Value(), aStartLabel, aCStudyID, false);
}
- return SALOMEDSImpl_Study::GetStudy(aStartLabel)->GetSObject(aStartLabel);
+ return SALOMEDSImpl_Study::SObject(aStartLabel);
}
//#######################################################################################################
TCollection_AsciiString ior_string, persistent_string, curid;
for (; itchild.More(); itchild.Next()) {
- Handle(SALOMEDSImpl_SObject) current = SALOMEDSImpl_Study::GetStudy(itchild.Value())->GetSObject(itchild.Value());
+ Handle(SALOMEDSImpl_SObject) current = SALOMEDSImpl_Study::SObject(itchild.Value());
Handle(SALOMEDSImpl_AttributeIOR) IOR;
if (current->GetLabel().FindAttribute(SALOMEDSImpl_AttributeIOR::GetID(), IOR)) {
ior_string = IOR->Value();
if (!_root->FindAttribute(SALOMEDSImpl_AttributeName::GetID(), aNameAttrib))
aNameAttrib = SALOMEDSImpl_AttributeName::Set(_root->Label(), theName);
else
- aNameAttrib->Set(theName);
+ aNameAttrib->SetValue(theName);
return true;
}
TDF_Label aCurrent = aRef->Get();
if(aCurrent.IsNull()) return NULL;
- return SALOMEDSImpl_Study::GetStudy(aCurrent)->GetSObject(aCurrent);
+ return SALOMEDSImpl_Study::SObject(aCurrent);
}
//============================================================================
Handle(SALOMEDSImpl_AttributeName) aName;
if (!_root->FindAttribute(SALOMEDSImpl_AttributeName::GetID(), aName)) return aString;
- aString = TCollection_AsciiString(aName->Get());
+ aString = TCollection_AsciiString(aName->Value());
return aString;
}
}
//Create a new use case
- anInteger->Set(anInteger->Get()+1);
- TDF_Label aChild = aLabel.FindChild(anInteger->Get());
+ anInteger->SetValue(anInteger->Value()+1);
+ TDF_Label aChild = aLabel.FindChild(anInteger->Value());
aNode = SALOMEDSImpl_AttributeTreeNode::Set(aChild, aBasicGUID);
aNode->Remove();
aFatherNode->Append(aNode);
SALOMEDSImpl_AttributeName::Set(aChild, theName);
- return SALOMEDSImpl_Study::GetStudy(aChild)->GetSObject(aChild);
+ return SALOMEDSImpl_Study::SObject(aChild);
}
//============================================================================
{
TDF_Label aLabel;
TDF_Tool::Label(_doc->GetData(), theEntry, aLabel);
- return SALOMEDSImpl_Study::GetStudy(aLabel)->GetSObject(aLabel);
+ return SALOMEDSImpl_Study::SObject(aLabel);
}
Handle(SALOMEDSImpl_SObject) SALOMEDSImpl_UseCaseIterator::Value()
{
TDF_Label L = _it.Value()->Label();
- return SALOMEDSImpl_Study::GetStudy(L)->GetSObject(L);
+ return SALOMEDSImpl_Study::SObject(L);
}
cout << "Just another way to create an attribute: official one :) " << endl;
Handle(TDF_Attribute) aTDFAttr = aBuilder->FindOrCreateAttribute(aSO, "AttributeName");
Handle(SALOMEDSImpl_AttributeName) aRN = Handle(SALOMEDSImpl_AttributeName)::DownCast(aTDFAttr);
- aRN->Set("name_attribute");
+ aRN->SetValue("name_attribute");
cout << " The type = " << aRN->Type() << endl;
ga = Handle(SALOMEDSImpl_GenericAttribute)::DownCast(aRN);
cout << "Attribute has type: " << ga->Type() << " and value: " << ga->Save() << endl;