Sketcher: Move GeoEnum struct to separate file
============================================== Separate struct into own file to avoid having to include all the dependencies of SketchObject in other code that relies on GeoEnum.
This commit is contained in:
@@ -79,6 +79,8 @@ SET(Datatypes_SRCS
|
||||
GeometryFacade.h
|
||||
ExternalGeometryFacade.cpp
|
||||
ExternalGeometryFacade.h
|
||||
GeoEnum.cpp
|
||||
GeoEnum.h
|
||||
)
|
||||
SOURCE_GROUP("Datatypes" FILES ${Datatypes_SRCS})
|
||||
|
||||
|
||||
33
src/Mod/Sketcher/App/GeoEnum.cpp
Normal file
33
src/Mod/Sketcher/App/GeoEnum.cpp
Normal file
@@ -0,0 +1,33 @@
|
||||
/***************************************************************************
|
||||
* Copyright (c) 2021 Abdullah Tahiri <abdullah.tahiri.yo@gmail.com> *
|
||||
* *
|
||||
* This file is part of the FreeCAD CAx development system. *
|
||||
* *
|
||||
* This library is free software; you can redistribute it and/or *
|
||||
* modify it under the terms of the GNU Library General Public *
|
||||
* License as published by the Free Software Foundation; either *
|
||||
* version 2 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 Library General Public License for more details. *
|
||||
* *
|
||||
* You should have received a copy of the GNU Library General Public *
|
||||
* License along with this library; see the file COPYING.LIB. If not, *
|
||||
* write to the Free Software Foundation, Inc., 59 Temple Place, *
|
||||
* Suite 330, Boston, MA 02111-1307, USA *
|
||||
* *
|
||||
***************************************************************************/
|
||||
|
||||
#include "PreCompiled.h"
|
||||
|
||||
#include "GeoEnum.h"
|
||||
|
||||
using namespace Sketcher;
|
||||
|
||||
const int GeoEnum::RtPnt = -1;
|
||||
const int GeoEnum::HAxis = -1;
|
||||
const int GeoEnum::VAxis = -2;
|
||||
const int GeoEnum::RefExt = -3;
|
||||
|
||||
41
src/Mod/Sketcher/App/GeoEnum.h
Normal file
41
src/Mod/Sketcher/App/GeoEnum.h
Normal file
@@ -0,0 +1,41 @@
|
||||
/***************************************************************************
|
||||
* Copyright (c) 2021 Abdullah Tahiri <abdullah.tahiri.yo@gmail.com> *
|
||||
* *
|
||||
* This file is part of the FreeCAD CAx development system. *
|
||||
* *
|
||||
* This library is free software; you can redistribute it and/or *
|
||||
* modify it under the terms of the GNU Library General Public *
|
||||
* License as published by the Free Software Foundation; either *
|
||||
* version 2 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 Library General Public License for more details. *
|
||||
* *
|
||||
* You should have received a copy of the GNU Library General Public *
|
||||
* License along with this library; see the file COPYING.LIB. If not, *
|
||||
* write to the Free Software Foundation, Inc., 59 Temple Place, *
|
||||
* Suite 330, Boston, MA 02111-1307, USA *
|
||||
* *
|
||||
***************************************************************************/
|
||||
|
||||
#ifndef SKETCHER_GeoEnum_H
|
||||
#define SKETCHER_GeoEnum_H
|
||||
|
||||
namespace Sketcher
|
||||
{
|
||||
|
||||
struct SketcherExport GeoEnum
|
||||
{
|
||||
static const int RtPnt;
|
||||
static const int HAxis;
|
||||
static const int VAxis;
|
||||
static const int RefExt;
|
||||
};
|
||||
|
||||
} // namespace Sketcher
|
||||
|
||||
|
||||
#endif // SKETCHER_GeoEnum_H
|
||||
|
||||
@@ -97,12 +97,6 @@ namespace bp = boost::placeholders;
|
||||
|
||||
FC_LOG_LEVEL_INIT("Sketch",true,true)
|
||||
|
||||
const int GeoEnum::RtPnt = -1;
|
||||
const int GeoEnum::HAxis = -1;
|
||||
const int GeoEnum::VAxis = -2;
|
||||
const int GeoEnum::RefExt = -3;
|
||||
|
||||
|
||||
PROPERTY_SOURCE(Sketcher::SketchObject, Part::Part2DObject)
|
||||
|
||||
|
||||
|
||||
@@ -42,17 +42,11 @@
|
||||
|
||||
#include "SketchGeometryExtension.h"
|
||||
|
||||
#include "GeoEnum.h"
|
||||
|
||||
namespace Sketcher
|
||||
{
|
||||
|
||||
struct SketcherExport GeoEnum
|
||||
{
|
||||
static const int RtPnt;
|
||||
static const int HAxis;
|
||||
static const int VAxis;
|
||||
static const int RefExt;
|
||||
};
|
||||
|
||||
class SketchAnalysis;
|
||||
|
||||
class SketcherExport SketchObject : public Part::Part2DObject
|
||||
|
||||
Reference in New Issue
Block a user