X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FSALOMEDSImpl%2FSALOMEDSImpl_AttributeStudyProperties.hxx;h=e357bf9459494ca617da14a2006999efbc7b69ab;hb=a98a09635ad776cf8eb98664e0933760eb9edbe4;hp=19fc22d0ee98dc547b5cd3f7f6b466a0d877d177;hpb=1bd1d38e86c39b13e265f8ff534fc1463c25fef3;p=modules%2Fkernel.git diff --git a/src/SALOMEDSImpl/SALOMEDSImpl_AttributeStudyProperties.hxx b/src/SALOMEDSImpl/SALOMEDSImpl_AttributeStudyProperties.hxx index 19fc22d0e..e357bf945 100644 --- a/src/SALOMEDSImpl/SALOMEDSImpl_AttributeStudyProperties.hxx +++ b/src/SALOMEDSImpl/SALOMEDSImpl_AttributeStudyProperties.hxx @@ -1,97 +1,123 @@ +// Copyright (C) 2007-2021 CEA/DEN, EDF R&D, OPEN CASCADE +// +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +// + // File : SALOMEDSImpl_AttributeStudyProperties.hxx // Author : Sergey RUIN // Module : SALOME - +// #ifndef _SALOMEDSImpl_AttributeStudyProperties_HeaderFile #define _SALOMEDSImpl_AttributeStudyProperties_HeaderFile -#include -#include -#include -#include -#include +#include "SALOMEDSImpl_Defines.hxx" +#include "DF_Attribute.hxx" +#include "DF_Label.hxx" +#include +#include +#include #include "SALOMEDSImpl_GenericAttribute.hxx" -class Standard_GUID; -class Handle(TDF_Attribute); -class Handle(TDF_RelocationTable); - - -DEFINE_STANDARD_HANDLE( SALOMEDSImpl_AttributeStudyProperties, SALOMEDSImpl_GenericAttribute ) - -#include -#include - -class SALOMEDSImpl_AttributeStudyProperties : public SALOMEDSImpl_GenericAttribute +class SALOMEDSIMPL_EXPORT SALOMEDSImpl_AttributeStudyProperties : public SALOMEDSImpl_GenericAttribute { public: -Standard_EXPORT SALOMEDSImpl_AttributeStudyProperties(); -Standard_EXPORT ~SALOMEDSImpl_AttributeStudyProperties() {} + SALOMEDSImpl_AttributeStudyProperties(); + ~SALOMEDSImpl_AttributeStudyProperties() {} -Standard_EXPORT static const Standard_GUID& GetID(); -Standard_EXPORT const Standard_GUID& ID() const; + static const std::string& GetID(); + const std::string& ID() const; -Standard_EXPORT static Handle_SALOMEDSImpl_AttributeStudyProperties Set(const TDF_Label& label); + static SALOMEDSImpl_AttributeStudyProperties* Set(const DF_Label& label); -Standard_EXPORT void Init(); + void Init(); -Standard_EXPORT virtual TCollection_AsciiString Save(); -Standard_EXPORT virtual void Load(const TCollection_AsciiString&); + virtual std::string Save(); + virtual void Load(const std::string&); -Standard_EXPORT void SetModification(const TCollection_ExtendedString& theUserName, - const Standard_Integer theMinute, - const Standard_Integer theHour, - const Standard_Integer theDay, - const Standard_Integer theMonth, - const Standard_Integer theYear); -Standard_EXPORT void GetModifications(Handle(TColStd_HSequenceOfExtendedString)& theUserNames, - Handle(TColStd_HSequenceOfInteger)& theMinutes, - Handle(TColStd_HSequenceOfInteger)& theHours, - Handle(TColStd_HSequenceOfInteger)& theDays, - Handle(TColStd_HSequenceOfInteger)& theMonths, - Handle(TColStd_HSequenceOfInteger)& theYears) const; + void SetModification(const std::string& theUserName, + const int theMinute, + const int theHour, + const int theDay, + const int theMonth, + const int theYear); + void GetModifications(std::vector& theUserNames, + std::vector& theMinutes, + std::vector& theHours, + std::vector& theDays, + std::vector& theMonths, + std::vector& theYears) const; -Standard_EXPORT TCollection_ExtendedString GetCreatorName() const; -Standard_EXPORT Standard_Boolean GetCreationDate(Standard_Integer& theMinute, - Standard_Integer& theHour, - Standard_Integer& theDay, - Standard_Integer& theMonth, - Standard_Integer& theYear) const; + std::string GetCreatorName() const; + bool GetCreationDate(int& theMinute, + int& theHour, + int& theDay, + int& theMonth, + int& theYear) const; -Standard_EXPORT void ChangeCreatorName(const TCollection_ExtendedString& theUserName); + void ChangeCreatorName(const std::string& theUserName); -Standard_EXPORT void SetCreationMode(const Standard_Integer theMode); -Standard_EXPORT Standard_Integer GetCreationMode() const; + void SetUnits(const std::string& theUnits); + std::string GetUnits() const; -Standard_EXPORT void SetModified(const Standard_Integer theModified); -Standard_EXPORT Standard_Boolean IsModified() const; -Standard_EXPORT Standard_Integer GetModified() const; + void SetComment(const std::string& theComment); + std::string GetComment() const; -Standard_EXPORT void SetLocked(const Standard_Boolean theLocked); -Standard_EXPORT Standard_Boolean IsLocked() const; -Standard_EXPORT Standard_Boolean IsLockChanged(const Standard_Boolean theErase); + void SetCreationMode(const int theMode); + int GetCreationMode() const; -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; + void SetModified(const int theModified); + bool IsModified() const; + int GetModified() const; -private: + void SetLocked(const bool theLocked); + bool IsLocked() const; + bool IsLockChanged(const bool theErase); -Handle_TColStd_HSequenceOfExtendedString myUserName; -Handle_TColStd_HSequenceOfInteger myMinute; -Handle_TColStd_HSequenceOfInteger myHour; -Handle_TColStd_HSequenceOfInteger myDay; -Handle_TColStd_HSequenceOfInteger myMonth; -Handle_TColStd_HSequenceOfInteger myYear; -Standard_Integer myMode; -Standard_Integer myModified; -Standard_Boolean myLocked; -Standard_Boolean myLockChanged; + void SetComponentsVersions( const std::map< std::string, std::vector >& theVersions ); + void SetComponentVersion(const std::string& theComponent, const std::string& theVersion); + std::vector GetStoredComponents() const; + std::string GetComponentVersion(const std::string& theComponent) const; + std::vector GetComponentVersions(const std::string& theComponent) const; + std::map< std::string, std::vector > GetComponentsVersions() const; -public: - DEFINE_STANDARD_RTTI( SALOMEDSImpl_AttributeStudyProperties ) + void Restore(DF_Attribute* with); + DF_Attribute* NewEmpty() const; + void Paste(DF_Attribute* into); +private: + typedef std::vector versionList; + typedef std::map versionMap; + + std::vector myUserName; + std::vector myMinute; + std::vector myHour; + std::vector myDay; + std::vector myMonth; + std::vector myYear; + std::string myUnits; + std::string myComment; + int myMode; + int myModified; + bool myLocked; + bool myLockChanged; + versionMap myComponentVersions; }; #endif