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:
Abdullah Tahiri
2021-12-07 14:02:03 +01:00
parent b88dad5ef2
commit db1bcc5f13
5 changed files with 78 additions and 14 deletions

View File

@@ -79,6 +79,8 @@ SET(Datatypes_SRCS
GeometryFacade.h
ExternalGeometryFacade.cpp
ExternalGeometryFacade.h
GeoEnum.cpp
GeoEnum.h
)
SOURCE_GROUP("Datatypes" FILES ${Datatypes_SRCS})

View 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;

View 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

View File

@@ -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)

View File

@@ -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