Salome HOME
projects
/
modules
/
shaper.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Bug #1337: constraint images are not found
[modules/shaper.git]
/
src
/
PartSetPlugin
/
PartSetPlugin_Duplicate.h
diff --git
a/src/PartSetPlugin/PartSetPlugin_Duplicate.h
b/src/PartSetPlugin/PartSetPlugin_Duplicate.h
index 13d3df2cc497c8c27ed8c8654a0875c5179147a0..8553448bfa148a6a83efbd9d9668fed1a68317e2 100644
(file)
--- a/
src/PartSetPlugin/PartSetPlugin_Duplicate.h
+++ b/
src/PartSetPlugin/PartSetPlugin_Duplicate.h
@@
-1,3
+1,5
@@
+// Copyright (C) 2014-20xx CEA/DEN, EDF R&D
+
// File: PartSetPlugin_Duplicate.h
// Created: 20 May 2014
// Author: Mikhail PONIKAROV
// File: PartSetPlugin_Duplicate.h
// Created: 20 May 2014
// Author: Mikhail PONIKAROV
@@
-5,20
+7,22
@@
#ifndef PartSetPlugin_Duplicate_H_
#define PartSetPlugin_Duplicate_H_
#ifndef PartSetPlugin_Duplicate_H_
#define PartSetPlugin_Duplicate_H_
-#include "PartSetPlugin_Part.h"
+#include "PartSetPlugin.h"
+#include <ModelAPI_Feature.h>
/**\class PartSetPlugin_Duplicate
/**\class PartSetPlugin_Duplicate
- * \ingroup
DataModel
+ * \ingroup
Plugins
* \brief Duplicates the active part (not root). Creates a new "part" feature.
*/
* \brief Duplicates the active part (not root). Creates a new "part" feature.
*/
-class PartSetPlugin_Duplicate : public
PartSetPlugin_Part
+class PartSetPlugin_Duplicate : public
ModelAPI_Feature
{
public:
{
public:
- /// Duplicate kind
+
+ /// Duplicate kind
inline static const std::string& ID()
{
inline static const std::string& ID()
{
- static const std::string MY_
DUPLICAT
E_KIND("Duplicate");
- return MY_
DUPLICAT
E_KIND;
+ static const std::string MY_
REMOV
E_KIND("Duplicate");
+ return MY_
REMOV
E_KIND;
}
/// Returns the kind of a feature
PARTSETPLUGIN_EXPORT virtual const std::string& getKind()
}
/// Returns the kind of a feature
PARTSETPLUGIN_EXPORT virtual const std::string& getKind()
@@
-27,20
+31,32
@@
class PartSetPlugin_Duplicate : public PartSetPlugin_Part
return MY_KIND;
}
return MY_KIND;
}
- ///
the reference to copy: reference to the attribut
e
-
inline static const std::string& ORIGIN_REF
()
+ ///
Returns to which group in the document must be added featur
e
+
PARTSETPLUGIN_EXPORT virtual const std::string& getGroup
()
{
{
- static
const std::string MY_DUPLICATE_ID("Origin")
;
- return MY_
DUPLICATE_ID
;
+ static
std::string MY_GROUP = "Parts"
;
+ return MY_
GROUP
;
}
}
- /// Makes a new part, copy of active
- PartSetPlugin_Duplicate();
/// Request for initialization of data model of the feature: adding all attributes
/// Request for initialization of data model of the feature: adding all attributes
- PARTSETPLUGIN_EXPORT virtual void initAttributes();
+ PARTSETPLUGIN_EXPORT virtual void initAttributes()
+ {
+ }
+
+ /// Not normal feature that stored in the tree
+ PARTSETPLUGIN_EXPORT virtual bool isAction()
+ {
+ return true;
+ }
- ///
doesn't call creation of new document, just does nothing if document was not copied
+ ///
Performs the "duplicate"
PARTSETPLUGIN_EXPORT virtual void execute();
PARTSETPLUGIN_EXPORT virtual void execute();
+
+ /// Use plugin manager for features creation
+ PartSetPlugin_Duplicate()
+ {
+ }
+
};
#endif
};
#endif