Skip to content

Commit

Permalink
Attacher: create special source file to contain attacher strings
Browse files Browse the repository at this point in the history
  • Loading branch information
DeepSOIC committed Apr 21, 2016
1 parent 1ca73cf commit 314617f
Show file tree
Hide file tree
Showing 5 changed files with 417 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/Mod/Part/App/Attacher.cpp
Expand Up @@ -549,6 +549,13 @@ int AttachEngine::isShapeOfType(eRefType shapeType, eRefType requirement)
return -1;
}

std::string AttachEngine::getModeName(eMapMode mmode)
{
if(mmode < 0 || mmode >= mmDummy_NumberOfModes)
throw Base::Exception("AttachEngine::getModeName: Attachment Mode index is out of range");
return std::string(AttachEngine::eMapModeStrings[mmode]);
}

/*!
* \brief AttachEngine3D::readLinks
* \param parts
Expand Down
7 changes: 7 additions & 0 deletions src/Mod/Part/App/Attacher.h
Expand Up @@ -286,6 +286,13 @@ class PartExport AttachEngine : public Base::BaseClass
*/
static int isShapeOfType(eRefType shapeType, eRefType requirement);

/**
* @brief getModeName
* @param mmode
* @return returns a string that identifies the attachment mode in enum property.
*/
static std::string getModeName(eMapMode mmode);


public: //enums
static const char* eMapModeStrings[];
Expand Down

0 comments on commit 314617f

Please sign in to comment.