-// Copyright (C) 2016-20xx CEA/DEN, EDF R&D -->
-
-// File: ModelHighAPI_Dumper.h
-// Created: 1 August 2016
-// Author: Artem ZHIDKOV
+// Copyright (C) 2014-2017 CEA/DEN, EDF R&D
+//
+// 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<mailto:webmaster.salome@opencascade.com>
+//
#ifndef ModelHighAPI_Dumper_H_
#define ModelHighAPI_Dumper_H_
/// Dump given feature
virtual void dumpFeature(const FeaturePtr& theFeature, const bool theForce = false) = 0;
+ /// Set a feature that should not be dumped anyway
+ MODELHIGHAPI_EXPORT
+ void doNotDumpFeature(const FeaturePtr& theFeature)
+ { myFeaturesToSkip.insert(theFeature); }
+
/// Dump sub-feature name and color, without dumping feature creation.
/// Used for features which creates sub-features in their execute method.
/// \param theSubFeatureGet [in] method for getting sub-feature (e.g. "Feature_1.subFeature(0)")
std::string myCurrentName; ///< default name of current feature
std::string myUserName; ///< user-defined name
bool myIsDefault; ///< \c true if the name is default
+ bool myIsDumped; ///< shows that the names of the feature are already stored
EntityName() {}
EntityName(const std::string& theCurName, const std::string& theUserName, bool theDefault)
- : myCurrentName(theCurName), myUserName(theUserName), myIsDefault(theDefault)
+ : myCurrentName(theCurName),
+ myUserName(theUserName),
+ myIsDefault(theDefault),
+ myIsDumped(false)
{}
};
NbFeaturesMap myFeatureCount; ///< number of features of each kind
+ /// features which should not be dumped (like coincidence and tangency created by tangent arc)
+ std::set<FeaturePtr> myFeaturesToSkip;
+
protected:
/// list of entities, used by other features but not dumped yet
std::set<EntityPtr> myNotDumpedEntities;