Merge branch 'cleanup_opencs_includes' into 'master'

Cleanup opencs includes

See merge request OpenMW/openmw!2303
pull/3228/head
psi29a 2 years ago
commit 209550aa84

@ -15,7 +15,6 @@
#include <components/settings/settings.hpp> #include <components/settings/settings.hpp>
#include "model/doc/document.hpp" #include "model/doc/document.hpp"
#include "model/world/data.hpp"
#ifdef _WIN32 #ifdef _WIN32
#include <components/windows.hpp> #include <components/windows.hpp>

@ -1,5 +1,7 @@
#include "document.hpp" #include "document.hpp"
#include "state.hpp"
#include <cassert> #include <cassert>
#include <memory> #include <memory>

@ -16,7 +16,6 @@
#include "../tools/tools.hpp" #include "../tools/tools.hpp"
#include "state.hpp"
#include "saving.hpp" #include "saving.hpp"
#include "blacklist.hpp" #include "blacklist.hpp"
#include "runner.hpp" #include "runner.hpp"

@ -4,8 +4,6 @@
#include <vector> #include <vector>
#include <string> #include <string>
#include "../world/universalid.hpp"
#include "messages.hpp" #include "messages.hpp"
class QString; class QString;

@ -1,11 +1,17 @@
#ifndef REFERENCEABLECHECKSTAGE_H #ifndef REFERENCEABLECHECKSTAGE_H
#define REFERENCEABLECHECKSTAGE_H #define REFERENCEABLECHECKSTAGE_H
#include "../world/universalid.hpp"
#include "../doc/stage.hpp" #include "../doc/stage.hpp"
#include "../world/data.hpp"
#include "../world/refiddata.hpp" #include "../world/refiddata.hpp"
#include "../world/resources.hpp" #include "../world/resources.hpp"
#include "../world/idcollection.hpp"
#include <components/esm3/loadfact.hpp>
#include <components/esm3/loadclas.hpp>
#include <components/esm3/loadrace.hpp>
#include <components/esm3/loadbody.hpp>
#include <components/esm3/loadscpt.hpp>
namespace CSMTools namespace CSMTools
{ {
@ -54,31 +60,29 @@ namespace CSMTools
//Convenience functions //Convenience functions
void inventoryListCheck(const std::vector<ESM::ContItem>& itemList, CSMDoc::Messages& messages, const std::string& id); void inventoryListCheck(const std::vector<ESM::ContItem>& itemList, CSMDoc::Messages& messages, const std::string& id);
template<typename ITEM> void inventoryItemCheck(const ITEM& someItem, /// for all enchantable items.
CSMDoc::Messages& messages, template <typename Item>
const std::string& someID, inline void inventoryItemCheck(const Item& someItem, CSMDoc::Messages& messages, const std::string& someID,
bool enchantable); //for all enchantable items. bool enchantable);
template<typename ITEM> void inventoryItemCheck(const ITEM& someItem, /// for non-enchantable items.
CSMDoc::Messages& messages, template <typename Item>
const std::string& someID); //for non-enchantable items. inline void inventoryItemCheck(const Item& someItem, CSMDoc::Messages& messages, const std::string& someID);
template<typename TOOL> void toolCheck(const TOOL& someTool, /// for tools with uses.
CSMDoc::Messages& messages, template <typename Tool>
const std::string& someID, inline void toolCheck(const Tool& someTool, CSMDoc::Messages& messages, const std::string& someID,
bool canbebroken); //for tools with uses. bool canbebroken);
template<typename TOOL> void toolCheck(const TOOL& someTool, /// for tools without uses.
CSMDoc::Messages& messages, template <typename Tool>
const std::string& someID); //for tools without uses. inline void toolCheck(const Tool& someTool, CSMDoc::Messages& messages, const std::string& someID);
template<typename LIST> void listCheck(const LIST& someList, template <typename List>
CSMDoc::Messages& messages, inline void listCheck(const List& someList, CSMDoc::Messages& messages, const std::string& someID);
const std::string& someID);
template<typename TOOL> void scriptCheck(const TOOL& someTool, template <typename Tool>
CSMDoc::Messages& messages, inline void scriptCheck(const Tool& someTool, CSMDoc::Messages& messages, const std::string& someID);
const std::string& someID);
const CSMWorld::RefIdData& mReferencables; const CSMWorld::RefIdData& mReferencables;
const CSMWorld::IdCollection<ESM::Race>& mRaces; const CSMWorld::IdCollection<ESM::Race>& mRaces;

@ -2,6 +2,10 @@
#include "../prefs/state.hpp" #include "../prefs/state.hpp"
#include "../../model/world/cell.hpp"
#include <components/esm3/loadfact.hpp>
CSMTools::ReferenceCheckStage::ReferenceCheckStage( CSMTools::ReferenceCheckStage::ReferenceCheckStage(
const CSMWorld::RefCollection& references, const CSMWorld::RefCollection& references,
const CSMWorld::RefIdCollection& referencables, const CSMWorld::RefIdCollection& referencables,

@ -1,8 +1,17 @@
#ifndef CSM_TOOLS_REFERENCECHECK_H #ifndef CSM_TOOLS_REFERENCECHECK_H
#define CSM_TOOLS_REFERENCECHECK_H #define CSM_TOOLS_REFERENCECHECK_H
#include "../doc/state.hpp" #include "../world/idcollection.hpp"
#include "../doc/document.hpp" #include "../world/refiddata.hpp"
#include "../world/refidcollection.hpp"
#include "../world/refcollection.hpp"
#include "../doc/stage.hpp"
namespace ESM
{
struct Faction;
}
namespace CSMTools namespace CSMTools
{ {

@ -5,6 +5,9 @@
#include "../world/refiddata.hpp" #include "../world/refiddata.hpp"
#include "../world/universalid.hpp" #include "../world/universalid.hpp"
#include <components/esm3/loadsoun.hpp>
#include <components/esm3/loadsndg.hpp>
CSMTools::SoundGenCheckStage::SoundGenCheckStage(const CSMWorld::IdCollection<ESM::SoundGenerator> &soundGens, CSMTools::SoundGenCheckStage::SoundGenCheckStage(const CSMWorld::IdCollection<ESM::SoundGenerator> &soundGens,
const CSMWorld::IdCollection<ESM::Sound> &sounds, const CSMWorld::IdCollection<ESM::Sound> &sounds,
const CSMWorld::RefIdCollection &objects) const CSMWorld::RefIdCollection &objects)

@ -1,10 +1,17 @@
#ifndef CSM_TOOLS_SOUNDGENCHECK_HPP #ifndef CSM_TOOLS_SOUNDGENCHECK_HPP
#define CSM_TOOLS_SOUNDGENCHECK_HPP #define CSM_TOOLS_SOUNDGENCHECK_HPP
#include "../world/data.hpp" #include "../world/idcollection.hpp"
#include "../world/refidcollection.hpp"
#include "../doc/stage.hpp" #include "../doc/stage.hpp"
namespace ESM
{
struct SoundGenerator;
struct Sound;
}
namespace CSMTools namespace CSMTools
{ {
/// \brief VerifyStage: make sure that sound gen records are internally consistent /// \brief VerifyStage: make sure that sound gen records are internally consistent

@ -1,7 +1,6 @@
#ifndef CSM_WOLRD_CELL_H #ifndef CSM_WOLRD_CELL_H
#define CSM_WOLRD_CELL_H #define CSM_WOLRD_CELL_H
#include <vector>
#include <string> #include <string>
#include <components/esm3/loadcell.hpp> #include <components/esm3/loadcell.hpp>

@ -4,8 +4,6 @@
#include <string> #include <string>
#include <vector> #include <vector>
#include "columnbase.hpp"
namespace CSMWorld namespace CSMWorld
{ {
namespace Columns namespace Columns

@ -15,6 +15,8 @@
#include <components/vfs/manager.hpp> #include <components/vfs/manager.hpp>
#include <components/vfs/registerarchives.hpp> #include <components/vfs/registerarchives.hpp>
#include "../doc/messages.hpp"
#include "idtable.hpp" #include "idtable.hpp"
#include "idtree.hpp" #include "idtree.hpp"
#include "columnimp.hpp" #include "columnimp.hpp"

@ -34,8 +34,6 @@
#include <components/files/multidircollection.hpp> #include <components/files/multidircollection.hpp>
#include <components/to_utf8/to_utf8.hpp> #include <components/to_utf8/to_utf8.hpp>
#include "../doc/stage.hpp"
#include "actoradapter.hpp" #include "actoradapter.hpp"
#include "idcollection.hpp" #include "idcollection.hpp"
#include "nestedidcollection.hpp" #include "nestedidcollection.hpp"

@ -3,6 +3,7 @@
#include <vector> #include <vector>
#include "idtablebase.hpp" #include "idtablebase.hpp"
#include "columnbase.hpp"
namespace namespace
{ {

@ -2,7 +2,6 @@
#define CSM_WOLRD_IDTREE_H #define CSM_WOLRD_IDTREE_H
#include "idtable.hpp" #include "idtable.hpp"
#include "universalid.hpp"
#include "columns.hpp" #include "columns.hpp"
/*! \brief /*! \brief

@ -1,5 +1,7 @@
#include "nestedcollection.hpp" #include "nestedcollection.hpp"
#include "columnbase.hpp"
CSMWorld::NestedCollection::NestedCollection() CSMWorld::NestedCollection::NestedCollection()
{} {}

@ -3,9 +3,11 @@
#include <map> #include <map>
#include <stdexcept> #include <stdexcept>
#include <memory>
#include "nestedcollection.hpp" #include "nestedcollection.hpp"
#include "nestedcoladapterimp.hpp" #include "collection.hpp"
#include "nestedcolumnadapter.hpp"
namespace ESM namespace ESM
{ {
@ -16,10 +18,17 @@ namespace CSMWorld
{ {
struct NestedTableWrapperBase; struct NestedTableWrapperBase;
struct Cell; struct Cell;
struct ColumnBase;
template<typename T, typename AT> template <typename ESXRecordT>
struct IdAccessor;
template <typename ESXRecordT, typename IdAccessorT>
class IdCollection; class IdCollection;
template <typename ESXRecordT>
class NestedColumnAdapter;
template<typename ESXRecordT, typename IdAccessorT = IdAccessor<ESXRecordT> > template<typename ESXRecordT, typename IdAccessorT = IdAccessor<ESXRecordT> >
class NestedIdCollection : public IdCollection<ESXRecordT, IdAccessorT>, public NestedCollection class NestedIdCollection : public IdCollection<ESXRecordT, IdAccessorT>, public NestedCollection
{ {

@ -5,8 +5,6 @@
#include <QAbstractProxyModel> #include <QAbstractProxyModel>
#include "universalid.hpp"
#include "columns.hpp"
#include "columnbase.hpp" #include "columnbase.hpp"
/*! \brief /*! \brief

@ -12,6 +12,9 @@ namespace CSMWorld
template<typename T, typename AT> template<typename T, typename AT>
class IdCollection; class IdCollection;
template<typename ESXRecordT>
struct IdAccessor;
/// \brief Wrapper for Pathgrid record /// \brief Wrapper for Pathgrid record
/// ///
/// \attention The mData.mX and mData.mY fields of the ESM::Pathgrid struct are not used. /// \attention The mData.mX and mData.mY fields of the ESM::Pathgrid struct are not used.

@ -7,6 +7,8 @@
#include "universalid.hpp" #include "universalid.hpp"
#include "record.hpp" #include "record.hpp"
#include "../doc/messages.hpp"
#include <string_view> #include <string_view>
namespace CSMWorld namespace CSMWorld

@ -4,12 +4,15 @@
#include <map> #include <map>
#include <string_view> #include <string_view>
#include "../doc/stage.hpp"
#include "collection.hpp" #include "collection.hpp"
#include "ref.hpp" #include "ref.hpp"
#include "record.hpp" #include "record.hpp"
namespace CSMDoc
{
class Messages;
}
namespace CSMWorld namespace CSMWorld
{ {
struct Cell; struct Cell;

@ -11,20 +11,17 @@ namespace ESM
namespace CSMWorld namespace CSMWorld
{ {
struct Cell; struct Cell;
template<typename T, typename AT>
class IdCollection;
/// \brief Single type collection of top level records that are associated with cells /// \brief Single type collection of top level records that are associated with cells
template<typename ESXRecordT, typename IdAccessorT = IdAccessor<ESXRecordT> > template<typename ESXRecordT, typename IdAccessorT = IdAccessor<ESXRecordT> >
class SubCellCollection : public NestedIdCollection<ESXRecordT, IdAccessorT> class SubCellCollection : public NestedIdCollection<ESXRecordT, IdAccessorT>
{ {
const IdCollection<Cell>& mCells; const IdCollection<Cell, IdAccessor<Cell>>& mCells;
void loadRecord (ESXRecordT& record, ESM::ESMReader& reader, bool& isDeleted) override; void loadRecord (ESXRecordT& record, ESM::ESMReader& reader, bool& isDeleted) override;
public: public:
SubCellCollection(const IdCollection<Cell, IdAccessor<Cell>>& cells);
SubCellCollection (const IdCollection<Cell>& cells);
}; };
template<typename ESXRecordT, typename IdAccessorT> template<typename ESXRecordT, typename IdAccessorT>
@ -37,7 +34,7 @@ namespace CSMWorld
template<typename ESXRecordT, typename IdAccessorT> template<typename ESXRecordT, typename IdAccessorT>
SubCellCollection<ESXRecordT, IdAccessorT>::SubCellCollection ( SubCellCollection<ESXRecordT, IdAccessorT>::SubCellCollection (
const IdCollection<Cell>& cells) const IdCollection<Cell, IdAccessor<Cell>>& cells)
: mCells (cells) : mCells (cells)
{} {}
} }

@ -6,7 +6,7 @@
#include <QPushButton> #include <QPushButton>
#include <QHBoxLayout> #include <QHBoxLayout>
#include "../../model/doc/document.hpp" #include "../../model/doc/state.hpp"
void CSVDoc::Operation::updateLabel (int threads) void CSVDoc::Operation::updateLabel (int threads)
{ {

@ -1,5 +1,7 @@
#include "runlogsubview.hpp" #include "runlogsubview.hpp"
#include "../../model/doc/document.hpp"
#include <QTextEdit> #include <QTextEdit>
CSVDoc::RunLogSubView::RunLogSubView (const CSMWorld::UniversalId& id, CSVDoc::RunLogSubView::RunLogSubView (const CSMWorld::UniversalId& id,

@ -3,6 +3,11 @@
#include "subview.hpp" #include "subview.hpp"
namespace CSMDoc
{
class Document;
}
namespace CSVDoc namespace CSVDoc
{ {
class RunLogSubView : public SubView class RunLogSubView : public SubView

@ -1,12 +1,8 @@
#ifndef CSV_DOC_SUBVIEW_H #ifndef CSV_DOC_SUBVIEW_H
#define CSV_DOC_SUBVIEW_H #define CSV_DOC_SUBVIEW_H
#include "../../model/doc/document.hpp"
#include "../../model/world/universalid.hpp" #include "../../model/world/universalid.hpp"
#include "subviewfactory.hpp"
#include <QDockWidget> #include <QDockWidget>
class QUndoStack; class QUndoStack;

@ -13,6 +13,8 @@
#include <QScreen> #include <QScreen>
#include "../../model/doc/document.hpp" #include "../../model/doc/document.hpp"
#include "../../model/doc/state.hpp"
#include "../../model/prefs/state.hpp" #include "../../model/prefs/state.hpp"
#include "../../model/prefs/shortcut.hpp" #include "../../model/prefs/shortcut.hpp"

@ -9,6 +9,8 @@
#include "../../model/doc/documentmanager.hpp" #include "../../model/doc/documentmanager.hpp"
#include "../../model/doc/document.hpp" #include "../../model/doc/document.hpp"
#include "../../model/doc/state.hpp"
#include "../../model/world/columns.hpp" #include "../../model/world/columns.hpp"
#include "../../model/world/idcompletionmanager.hpp" #include "../../model/world/idcompletionmanager.hpp"

@ -16,6 +16,7 @@
#include "../../model/world/idtree.hpp" #include "../../model/world/idtree.hpp"
#include "../../model/world/commands.hpp" #include "../../model/world/commands.hpp"
#include "../../model/world/commandmacro.hpp" #include "../../model/world/commandmacro.hpp"
#include "../../model/world/tablemimedata.hpp"
#include "../../model/prefs/shortcut.hpp" #include "../../model/prefs/shortcut.hpp"
#include "../widget/scenetoolbar.hpp" #include "../widget/scenetoolbar.hpp"

@ -8,7 +8,6 @@
#include <osg/Vec3d> #include <osg/Vec3d>
#include "../../model/world/cellcoordinates.hpp" #include "../../model/world/cellcoordinates.hpp"
#include "../../model/world/idcollection.hpp"
#include "../../model/world/subcellcollection.hpp" #include "../../model/world/subcellcollection.hpp"
#include "tagbase.hpp" #include "tagbase.hpp"

@ -3,8 +3,6 @@
#include "../widget/scenetoolmode.hpp" #include "../widget/scenetoolmode.hpp"
#include "mask.hpp"
class QAction; class QAction;
namespace CSVRender namespace CSVRender

@ -9,7 +9,6 @@
#include <osg/PositionAttitudeTransform> #include <osg/PositionAttitudeTransform>
#include <components/esm3/loadland.hpp> #include <components/esm3/loadland.hpp>
#include "../../model/world/cellcoordinates.hpp"
namespace osg namespace osg
{ {

@ -20,7 +20,7 @@
#include "../../model/prefs/state.hpp" #include "../../model/prefs/state.hpp"
#include "../../model/world/idtree.hpp" #include "../../model/world/idtree.hpp"
#include "../../model/world/tablemimedata.hpp" #include "../../model/world/commands.hpp"
#include "brushdraw.hpp" #include "brushdraw.hpp"
#include "commands.hpp" #include "commands.hpp"

@ -10,12 +10,9 @@
#include <QEvent> #include <QEvent>
#ifndef Q_MOC_RUN #ifndef Q_MOC_RUN
#include "../../model/world/data.hpp"
#include "../../model/world/land.hpp"
#include "../../model/doc/document.hpp" #include "../../model/doc/document.hpp"
#include "../../model/world/commands.hpp"
#include "../../model/world/idtable.hpp" #include "../../model/world/idtable.hpp"
#include "../../model/world/landtexture.hpp" #include "../../model/world/columnimp.hpp"
#include "../widget/brushshapes.hpp" #include "../widget/brushshapes.hpp"
#endif #endif
@ -27,6 +24,11 @@ namespace CSVWidget
class SceneToolShapeBrush; class SceneToolShapeBrush;
} }
namespace CSMWorld
{
class CellCoordinates;
}
namespace CSVRender namespace CSVRender
{ {
class PagedWorldspaceWidget; class PagedWorldspaceWidget;

@ -10,13 +10,9 @@
#include <QEvent> #include <QEvent>
#ifndef Q_MOC_RUN #ifndef Q_MOC_RUN
#include "../../model/world/data.hpp"
#include "../../model/world/land.hpp"
#include "../../model/doc/document.hpp" #include "../../model/doc/document.hpp"
#include "../../model/world/commands.hpp"
#include "../../model/world/idtable.hpp" #include "../../model/world/idtable.hpp"
#include "../../model/world/landtexture.hpp" #include "../../model/world/columnimp.hpp"
#include "../widget/brushshapes.hpp" #include "../widget/brushshapes.hpp"
#include "brushdraw.hpp" #include "brushdraw.hpp"
#endif #endif

@ -12,6 +12,7 @@
#include "../../model/world/universalid.hpp" #include "../../model/world/universalid.hpp"
#include "../../model/world/idtable.hpp" #include "../../model/world/idtable.hpp"
#include "../../model/world/tablemimedata.hpp"
#include "../../model/prefs/shortcut.hpp" #include "../../model/prefs/shortcut.hpp"
#include "../../model/prefs/state.hpp" #include "../../model/prefs/state.hpp"

@ -5,11 +5,9 @@
#include <osg/Vec3> #include <osg/Vec3>
#include "../../model/doc/document.hpp" #include "../../model/doc/document.hpp"
#include "../../model/world/tablemimedata.hpp"
#include "instancedragmodes.hpp" #include "instancedragmodes.hpp"
#include "scenewidget.hpp" #include "scenewidget.hpp"
#include "mask.hpp"
namespace CSMPrefs namespace CSMPrefs
{ {

@ -11,6 +11,7 @@
#include "../../model/doc/document.hpp" #include "../../model/doc/document.hpp"
#include "../../model/doc/documentmanager.hpp" #include "../../model/doc/documentmanager.hpp"
#include "../../model/doc/state.hpp"
#include "../doc/filewidget.hpp" #include "../doc/filewidget.hpp"
#include "../doc/adjusterwidget.hpp" #include "../doc/adjusterwidget.hpp"

@ -2,6 +2,9 @@
#include "reporttable.hpp" #include "reporttable.hpp"
#include "../../model/doc/state.hpp"
#include "../../model/doc/document.hpp"
CSVTools::ReportSubView::ReportSubView (const CSMWorld::UniversalId& id, CSMDoc::Document& document) CSVTools::ReportSubView::ReportSubView (const CSMWorld::UniversalId& id, CSMDoc::Document& document)
: CSVDoc::SubView (id), mDocument (document), mRefreshState (0) : CSVDoc::SubView (id), mDocument (document), mRefreshState (0)
{ {

@ -1,9 +1,7 @@
#ifndef IDTYPEDELEGATE_HPP #ifndef IDTYPEDELEGATE_HPP
#define IDTYPEDELEGATE_HPP #define IDTYPEDELEGATE_HPP
#include "enumdelegate.hpp"
#include "util.hpp" #include "util.hpp"
#include "../../model/world/universalid.hpp"
#include "datadisplaydelegate.hpp" #include "datadisplaydelegate.hpp"
namespace CSVWorld namespace CSVWorld

@ -7,6 +7,8 @@
#include "../widget/scenetoolbar.hpp" #include "../widget/scenetoolbar.hpp"
#include "../widget/scenetoolmode.hpp" #include "../widget/scenetoolmode.hpp"
#include "../../model/doc/document.hpp"
CSVWorld::PreviewSubView::PreviewSubView (const CSMWorld::UniversalId& id, CSMDoc::Document& document) CSVWorld::PreviewSubView::PreviewSubView (const CSMWorld::UniversalId& id, CSMDoc::Document& document)
: SubView (id), mTitle (id.toString().c_str()) : SubView (id), mTitle (id.toString().c_str())
{ {

@ -4,7 +4,6 @@
#include "util.hpp" #include "util.hpp"
#include "datadisplaydelegate.hpp" #include "datadisplaydelegate.hpp"
#include "../../model/world/record.hpp"
class QIcon; class QIcon;
class QFont; class QFont;

Loading…
Cancel
Save