X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FSALOMEDSImpl%2FSALOMEDSImpl_AttributeStudyProperties.hxx;h=e357bf9459494ca617da14a2006999efbc7b69ab;hb=a98a09635ad776cf8eb98664e0933760eb9edbe4;hp=c520bce61c18e0c2b40e5dbd828a691e663fef7d;hpb=f14439749926cca959747bb79fda10529520bd0b;p=modules%2Fkernel.git diff --git a/src/SALOMEDSImpl/SALOMEDSImpl_AttributeStudyProperties.hxx b/src/SALOMEDSImpl/SALOMEDSImpl_AttributeStudyProperties.hxx index c520bce61..e357bf945 100644 --- a/src/SALOMEDSImpl/SALOMEDSImpl_AttributeStudyProperties.hxx +++ b/src/SALOMEDSImpl/SALOMEDSImpl_AttributeStudyProperties.hxx @@ -1,101 +1,123 @@ -// Copyright (C) 2005 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// 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. -// -// 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 +// 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 +// 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 "SALOMEDSImpl_Defines.hxx" #include "DF_Attribute.hxx" #include "DF_Label.hxx" #include #include +#include #include "SALOMEDSImpl_GenericAttribute.hxx" -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 std::string& GetID(); -Standard_EXPORT const std::string& ID() const; + static const std::string& GetID(); + const std::string& ID() const; -Standard_EXPORT static SALOMEDSImpl_AttributeStudyProperties* Set(const DF_Label& label); + static SALOMEDSImpl_AttributeStudyProperties* Set(const DF_Label& label); -Standard_EXPORT void Init(); + void Init(); -Standard_EXPORT virtual std::string Save(); -Standard_EXPORT virtual void Load(const std::string&); + virtual std::string Save(); + virtual void Load(const std::string&); -Standard_EXPORT void SetModification(const std::string& theUserName, - const int theMinute, - const int theHour, - const int theDay, - const int theMonth, - const int theYear); -Standard_EXPORT void GetModifications(std::vector& theUserNames, - std::vector& theMinutes, - std::vector& theHours, - std::vector& theDays, - std::vector& theMonths, - std::vector& 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 std::string GetCreatorName() const; -Standard_EXPORT bool GetCreationDate(int& theMinute, - int& theHour, - int& theDay, - int& theMonth, - int& theYear) const; + std::string GetCreatorName() const; + bool GetCreationDate(int& theMinute, + int& theHour, + int& theDay, + int& theMonth, + int& theYear) const; -Standard_EXPORT void ChangeCreatorName(const std::string& theUserName); + void ChangeCreatorName(const std::string& theUserName); -Standard_EXPORT void SetCreationMode(const int theMode); -Standard_EXPORT int GetCreationMode() const; + void SetUnits(const std::string& theUnits); + std::string GetUnits() const; -Standard_EXPORT void SetModified(const int theModified); -Standard_EXPORT bool IsModified() const; -Standard_EXPORT int GetModified() const; + void SetComment(const std::string& theComment); + std::string GetComment() const; -Standard_EXPORT void SetLocked(const bool theLocked); -Standard_EXPORT bool IsLocked() const; -Standard_EXPORT bool IsLockChanged(const bool theErase); + void SetCreationMode(const int theMode); + int GetCreationMode() const; -Standard_EXPORT void Restore(DF_Attribute* with); -Standard_EXPORT DF_Attribute* NewEmpty() const; -Standard_EXPORT void Paste(DF_Attribute* into); + 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); -std::vector myUserName; -std::vector myMinute; -std::vector myHour; -std::vector myDay; -std::vector myMonth; -std::vector myYear; -int myMode; -int myModified; -bool myLocked; -bool 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; + 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