Commit 57ffc62c authored by Jan Möbius's avatar Jan Möbius
Browse files

Removed multiple define in CC file

git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@3398 383ad7c9-94d9-4d36-a494-682f7c89f535
parent a5e2cd27
......@@ -18,6 +18,6 @@ DIRECTORIES = ../BasePlugin ../ACGHelper ../common ../common/bsp ../INIFile $$f
# Input
HEADERS += $$getFilesFromDir($$DIRECTORIES,*.hh)
SOURCES += $$getFilesFromDir($$DIRECTORIES,*.cc)
FORMS += $$getFilesFromDir($$DIRECTORIES,*.ui)
FORMS += $$getFilesFromDir($$DIRECTORIES,*.ui)
################################################################################
......@@ -38,9 +38,6 @@
//
//=============================================================================
#define BASEOBJECTDATA_C
//== INCLUDES =================================================================
#include "Types.hh"
......
......@@ -12,12 +12,12 @@
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
//
// OpenFlipper 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 OpenFlipper. If not, see <http://www.gnu.org/licenses/>.
//
......@@ -48,48 +48,48 @@
//== TYPEDEFS =================================================================
//== CLASS DEFINITION =========================================================
// ===============================================================================
// Additional Nodes
// ===============================================================================
template< typename NodeT >
template< typename NodeT >
bool BaseObjectData::addAdditionalNode(NodeT* _node , QString _pluginName, QString _nodeName , int _id )
{
if ( hasAdditionalNode(_pluginName,_nodeName,_id) ) {
std::cerr << "Trying to inserted additional node twice in " << _pluginName.toStdString()
std::cerr << "Trying to inserted additional node twice in " << _pluginName.toStdString()
<< " with Name " << _nodeName.toStdString() << " and id " << _id << std::endl;
return false;
}
QString name = _pluginName+"#"+_nodeName+"#"+QString::number(_id);
std::pair <BaseNode*,QString> newNode(dynamic_cast<BaseNode*>(_node) , name);
additionalNodes_.push_back(newNode);
return true;
}
template< typename NodeT >
template< typename NodeT >
bool BaseObjectData::getAdditionalNode(NodeT*& _node , QString _pluginName, QString _nodeName , int _id )
{
QString searchname = _pluginName + "#" + _nodeName + "#" + QString::number(_id);
for ( uint i =0 ; i < additionalNodes_.size() ; ++i ) {
if ( additionalNodes_[i].second == searchname ) {
_node = dynamic_cast<NodeT*>(additionalNodes_[i].first);
return ( _node != NULL);
}
}
return false;
}
template< typename NodeT >
template< typename NodeT >
bool BaseObjectData::removeAdditionalNode(NodeT*& _node, QString _pluginName, QString _nodeName , int _id )
{
QString searchname = _pluginName + "#" + _nodeName + "#" + QString::number(_id);
for ( uint i =0 ; i < additionalNodes_.size() ; ++i ) {
if ( additionalNodes_[i].second == searchname ) {
_node = dynamic_cast<NodeT*>(additionalNodes_[i].first);
......@@ -98,10 +98,11 @@ bool BaseObjectData::removeAdditionalNode(NodeT*& _node, QString _pluginName, QS
_node->delete_subtree();
additionalNodes_.erase (additionalNodes_.begin()+i);
}
return true;
return true;
}
}
return false;
}
}
//=============================================================================
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment