-// Copyright (C) 2005 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+// Copyright (C) 2007-2015 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 <string>
#include <vector>
+#include <map>
#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<std::string>& theUserNames,
- std::vector<int>& theMinutes,
- std::vector<int>& theHours,
- std::vector<int>& theDays,
- std::vector<int>& theMonths,
- std::vector<int>& 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<std::string>& theUserNames,
+ std::vector<int>& theMinutes,
+ std::vector<int>& theHours,
+ std::vector<int>& theDays,
+ std::vector<int>& theMonths,
+ std::vector<int>& 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<std::string> myUserName;
-std::vector<int> myMinute;
-std::vector<int> myHour;
-std::vector<int> myDay;
-std::vector<int> myMonth;
-std::vector<int> myYear;
-int myMode;
-int myModified;
-bool myLocked;
-bool myLockChanged;
+ void SetComponentsVersions( const std::map< std::string, std::vector<std::string> >& theVersions );
+ void SetComponentVersion(const std::string& theComponent, const std::string& theVersion);
+ std::vector<std::string> GetStoredComponents() const;
+ std::string GetComponentVersion(const std::string& theComponent) const;
+ std::vector<std::string> GetComponentVersions(const std::string& theComponent) const;
+ std::map< std::string, std::vector<std::string> > GetComponentsVersions() const;
+ void Restore(DF_Attribute* with);
+ DF_Attribute* NewEmpty() const;
+ void Paste(DF_Attribute* into);
+
+private:
+ typedef std::vector<std::string> versionList;
+ typedef std::map<std::string, versionList> versionMap;
+
+ std::vector<std::string> myUserName;
+ std::vector<int> myMinute;
+ std::vector<int> myHour;
+ std::vector<int> myDay;
+ std::vector<int> myMonth;
+ std::vector<int> myYear;
+ std::string myUnits;
+ std::string myComment;
+ int myMode;
+ int myModified;
+ bool myLocked;
+ bool myLockChanged;
+ versionMap myComponentVersions;
};
#endif