mirror of
https://github.com/Heretek-AI/GDevelop.git
synced 2026-07-24 03:54:34 -04:00
a8559bfbbc
* Update all CMakeLists of extensions to use clang-format * Run clang-format on all Extensions * Update GDCore CMakeLists.txt to add clang-format * Run clang-format on GDCore files * Update GDJS and GDCpp CMakeLists.txt to add clang-format * Run clang-format on GDCpp and GDJS files
52 lines
1.3 KiB
C++
52 lines
1.3 KiB
C++
/*
|
|
* GDevelop Core
|
|
* Copyright 2008-2016 Florian Rival (Florian.Rival@gmail.com). All rights
|
|
* reserved. This project is released under the MIT License.
|
|
*/
|
|
#ifndef RESOURCESABSOLUTEPATHCHECKER_H
|
|
#define RESOURCESABSOLUTEPATHCHECKER_H
|
|
|
|
#include "GDCore/IDE/AbstractFileSystem.h"
|
|
#include "GDCore/IDE/Project/ArbitraryResourceWorker.h"
|
|
#include "GDCore/String.h"
|
|
|
|
namespace gd {
|
|
|
|
/**
|
|
* \brief Helper used to check if a project has at least a resource with an
|
|
* absolute filename.
|
|
*
|
|
* \see ArbitraryResourceWorker
|
|
*
|
|
* \ingroup IDE
|
|
*/
|
|
class GD_CORE_API ResourcesAbsolutePathChecker
|
|
: public ArbitraryResourceWorker {
|
|
public:
|
|
ResourcesAbsolutePathChecker(AbstractFileSystem& fileSystem)
|
|
: ArbitraryResourceWorker(),
|
|
hasAbsoluteFilenames(false),
|
|
fs(fileSystem){};
|
|
virtual ~ResourcesAbsolutePathChecker(){};
|
|
|
|
/**
|
|
* Return true if there is at least a resource with an absolute filename.
|
|
*/
|
|
bool HasResourceWithAbsoluteFilenames() const {
|
|
return hasAbsoluteFilenames;
|
|
};
|
|
|
|
/**
|
|
* Check if there is a resource with an absolute path
|
|
*/
|
|
virtual void ExposeFile(gd::String& resource);
|
|
|
|
private:
|
|
bool hasAbsoluteFilenames;
|
|
AbstractFileSystem& fs;
|
|
};
|
|
|
|
} // namespace gd
|
|
|
|
#endif // RESOURCESABSOLUTEPATHCHECKER_H
|