Skip to content

Commit

Permalink
Merge pull request e8tools#271 from dmpas/feature/move-systemclasses
Browse files Browse the repository at this point in the history
Перемещён SystemClasses
  • Loading branch information
dmpas authored Apr 30, 2018
2 parents b0c02ee + 49fc334 commit 0e8309d
Show file tree
Hide file tree
Showing 87 changed files with 641 additions and 671 deletions.
14 changes: 0 additions & 14 deletions src/SystemClasses/.gitignore

This file was deleted.

1 change: 0 additions & 1 deletion src/ctool1cd/App.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
#include <boost/filesystem/fstream.hpp>

#include <iosfwd>
#include <System.IOUtils.hpp>
#include <vector>

#include "App.h"
Expand Down
2 changes: 1 addition & 1 deletion src/ctool1cd/App.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@

#include "Class_1CD.h"
#include "ParseCommandLine.h"
#include "String.hpp"
#include <string>
#include "Messenger.h"
#include "cfapi/APIcfBase.h"

Expand Down
3 changes: 1 addition & 2 deletions src/ctool1cd/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,11 @@ set (tool_VERSION_MAJOR 1)
set (tool_VERSION_MINOR 0)

set (CTOOL_SOURCES cTool_1CD_Main.cpp ParseCommandLine.cpp App.cpp)
set (CTOOL_HEADERS cTool_1CD_Main.h ParseCommandLine.h ErrorCode.h App.h)
set (CTOOL_HEADERS ParseCommandLine.h ErrorCode.h App.h)

add_executable (ctool1cd ${CTOOL_SOURCES} ${CTOOL_HEADERS})

include_directories (${SOURCE_DIR}/tool1cd)
include_directories (${SOURCE_DIR}/SystemClasses)
target_link_libraries (ctool1cd tool1cd)

find_package (Boost 1.53 REQUIRED COMPONENTS filesystem regex system)
Expand Down
3 changes: 2 additions & 1 deletion src/ctool1cd/ParseCommandLine.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@
*/

#include "ParseCommandLine.h"
#include <String.hpp>
#include "SystemClasses/String.hpp"

using namespace System;

//---------------------------------------------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion src/ctool1cd/ParseCommandLine.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
#define ParseCommandLineH

#include <vector>
#include "String.hpp"
#include <string>

//---------------------------------------------------------------------------
enum class Command
Expand Down
1 change: 0 additions & 1 deletion src/ctool1cd/cTool_1CD_Main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@

#include <iosfwd>

#include "cTool_1CD_Main.h"
#include "ErrorCode.h"
#include "App.h"

Expand Down
29 changes: 0 additions & 29 deletions src/ctool1cd/cTool_1CD_Main.h

This file was deleted.

2 changes: 1 addition & 1 deletion src/gtool1cd/BlobViewer/blob_viewer.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
#define BLOB_VIEWER_H

#include <QWidget>
#include <TStream.hpp>
#include <SystemClasses/TStream.hpp>
#include <QMap>

namespace Ui {
Expand Down
1 change: 0 additions & 1 deletion src/gtool1cd/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,6 @@ endif()
add_executable(gtool1cd WIN32 ${SOURCE_FILES} ${HEADER_FILES} ${UI_FILES} ${RESOURCES})

include_directories (${SOURCE_DIR}/tool1cd)
include_directories (${SOURCE_DIR}/SystemClasses)
target_link_libraries (gtool1cd tool1cd)


Expand Down
2 changes: 1 addition & 1 deletion src/gtool1cd/container_form.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
#include "container_form.h"
#include "ui_container_form.h"
#include <QFileInfo>
#include <TFileStream.hpp>
#include <SystemClasses/TFileStream.hpp>

ContainerForm::ContainerForm(QWidget *parent) :
QWidget(parent),
Expand Down
3 changes: 2 additions & 1 deletion src/gtool1cd/models/skobka_tree_model.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,12 @@
#include "skobka_tree_model.h"
#include <QBuffer>
#include "stream_device.h"
#include <SystemClasses/TMemoryStream.hpp>

const int PATH_COLUMN = 0;
const int DATA_COLUMN = 1;

SkobkaTreeModel::SkobkaTreeModel(unique_ptr<Tree> data_tree)
SkobkaTreeModel::SkobkaTreeModel(std::unique_ptr<Tree> data_tree)
: data_tree(std::move(data_tree))
{

Expand Down
5 changes: 3 additions & 2 deletions src/gtool1cd/models/skobka_tree_model.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,12 @@

#include <Parse_tree.h>
#include <QAbstractItemModel>
#include <memory>

class SkobkaTreeModel : public QAbstractItemModel
{
public:
explicit SkobkaTreeModel(unique_ptr<Tree> data_tree);
explicit SkobkaTreeModel(std::unique_ptr<Tree> data_tree);


virtual int rowCount(const QModelIndex &parent) const override;
Expand All @@ -43,7 +44,7 @@ class SkobkaTreeModel : public QAbstractItemModel
virtual QVariant headerData(int section, Qt::Orientation orientation, int role) const override;

private:
unique_ptr<Tree> data_tree;
std::unique_ptr<Tree> data_tree;
};

#endif // SKOBKA_TREE_MODEL_H
2 changes: 1 addition & 1 deletion src/gtool1cd/models/stream_device.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
#define STREAM_DEVICE_H

#include <QIODevice>
#include <TStream.hpp>
#include <SystemClasses/TStream.hpp>

class StreamDevice : public QIODevice
{
Expand Down
3 changes: 3 additions & 0 deletions src/gtool1cd/models/table_data_model.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@
#include <TempStream.h>
#include <UZLib.h>
#include <QDebug>
#include "SystemClasses/String.hpp"

using namespace System;

TableDataModel::TableDataModel(Table *table, Index *index)
: table(table), _index(index) {}
Expand Down
2 changes: 1 addition & 1 deletion src/gtool1cd/models/table_data_model.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
#include <QAbstractItemModel>
#include <Table.h>
#include <TableIterator.h>
#include <TStream.hpp>
#include <SystemClasses/TStream.hpp>

class TableDataModel : public QAbstractItemModel
{
Expand Down
2 changes: 1 addition & 1 deletion src/gtool1cd/table_data_window.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ void TableDataWindow::on_dataView_activated(const QModelIndex &index)
{
}

unique_ptr<Tree> try_parse_tree(const QVariant &data)
std::unique_ptr<Tree> try_parse_tree(const QVariant &data)
{
std::string string_data = data.toString().toStdString();
if (string_data.substr(0, 1) != "{") {
Expand Down
1 change: 0 additions & 1 deletion src/tests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ add_executable(testproject ${TEST_SYSTEM_SOURCES} ${TEST_TOOL1CD_SOURCES} catch_
add_definitions (-DCMAKE_SOURCE_DIR="${CMAKE_SOURCE_DIR}")

include_directories (${SOURCE_DIR}/tool1cd)
include_directories (${SOURCE_DIR}/SystemClasses)
target_link_libraries (testproject tool1cd)

find_package (Boost 1.53 REQUIRED COMPONENTS filesystem regex system)
Expand Down
6 changes: 3 additions & 3 deletions src/tests/SystemClasses/test_string.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@
along with test_project. If not, see <http://www.gnu.org/licenses/>.
*/
#include "../catch.hpp"
#include <String.hpp>
#include <System.SysUtils.hpp>
#include <SystemClasses/String.hpp>
#include <SystemClasses/System.SysUtils.hpp>

using namespace System;
using namespace std;
Expand Down Expand Up @@ -80,4 +80,4 @@ TEST_CASE("Конвертация строк", "[SystemClasses][String][Encoding
}
}
}
}
}
2 changes: 1 addition & 1 deletion src/tests/catch_main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
along with test_project. If not, see <http://www.gnu.org/licenses/>.
*/
#define CATCH_CONFIG_RUNNER
#include <System.SysUtils.hpp>
#include <SystemClasses/System.SysUtils.hpp>
#include <string>
#include <MessageRegistration.h>
#include <Messenger.h>
Expand Down
3 changes: 1 addition & 2 deletions src/tests/tool1cd/test_binarydecimal.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
*/
#include "../catch.hpp"
#include "BinaryDecimalNumber.h"
#include <System.Classes.hpp>

TEST_CASE( "Проверка обработки Двоично-Десятичных чисел", "[tool1cd][lib][BinaryDecimal]" ) {

Expand All @@ -44,4 +43,4 @@ TEST_CASE( "Проверка обработки Двоично-Десятичн
}
}
}
}
}
4 changes: 2 additions & 2 deletions src/tests/tool1cd/test_blockheader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
*/
#include "../catch.hpp"
#include "cfapi/APIcfBase.h"
#include <System.Classes.hpp>
#include <SystemClasses/String.hpp>

TEST_CASE( "Проверка BlockHeader", "[tool1cd][lib][stBlockHeader]" ) {

Expand All @@ -30,7 +30,7 @@ TEST_CASE( "Проверка BlockHeader", "[tool1cd][lib][stBlockHeader]" ) {
std::string bytes = data.toString();
THEN("Имеем массив '\r\n00000000 00000000 00000000 \r\n'") {

REQUIRE( Equal(bytes, "\r\n00000000 00000000 00000000 \r\n") );
REQUIRE( System::Equal(bytes, "\r\n00000000 00000000 00000000 \r\n") );
}
}
}
Expand Down
1 change: 0 additions & 1 deletion src/tests/tool1cd/test_depotv5.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
#include "../catch.hpp"
#include <Class_1CD.h>
#include <boost/filesystem.hpp>
#include <String.hpp>

using boost::filesystem::path;
using namespace System;
Expand Down
1 change: 0 additions & 1 deletion src/tests/tool1cd/test_depotv6.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
#include "../catch.hpp"
#include <Class_1CD.h>
#include <boost/filesystem.hpp>
#include <String.hpp>

using boost::filesystem::path;
using namespace System;
Expand Down
1 change: 0 additions & 1 deletion src/tests/tool1cd/test_depotv7.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
#include "../catch.hpp"
#include <Class_1CD.h>
#include <boost/filesystem.hpp>
#include <String.hpp>

using boost::filesystem::path;
using namespace System;
Expand Down
2 changes: 2 additions & 0 deletions src/tests/tool1cd/test_treeparser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@
#include "../catch.hpp"
#include <Parse_tree.h>
#include <string>
#include <SystemClasses/TMemoryStream.hpp>
#include <SystemClasses/System.SysUtils.hpp>

TEST_CASE( "Проверка Parse_tree", "[tool1cd][common][Parse_tree]" ) {

Expand Down
2 changes: 1 addition & 1 deletion src/tool1cd/Base64.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
#ifndef Base64H
#define Base64H

#include <System.Classes.hpp>
#include "SystemClasses/TStream.hpp"

void base64_encode(TStream* infile, TStream* outfile, int linesize);
void base64_decode(TStream* infile, TStream* outfile);
Expand Down
1 change: 0 additions & 1 deletion src/tool1cd/BinaryGuid.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@

#include <array>
#include <string>
#include <System.hpp>

const int GUID_BINARY_SIZE = 16;
const size_t GUID_LEN = 36;
Expand Down
47 changes: 23 additions & 24 deletions src/tool1cd/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,30 +20,29 @@
cmake_minimum_required (VERSION 2.8)
project (tool1cd)

include_directories(../SystemClasses)
set (SYSTEMCLASSES_SOURCES ../SystemClasses/String.cpp
../SystemClasses/System.Classes.cpp
../SystemClasses/System.cpp
../SystemClasses/System.IOUtils.cpp
../SystemClasses/TFileStream.cpp
../SystemClasses/TMemoryStream.cpp
../SystemClasses/TStream.cpp
../SystemClasses/TStreamReader.cpp
../SystemClasses/TStreamWriter.cpp
../SystemClasses/System.SysUtils.cpp
../SystemClasses/GetTickCount.cpp)
set (SYSTEMCLASSES_HEADERS ../SystemClasses/String.hpp
../SystemClasses/System.Classes.hpp
../SystemClasses/System.hpp
../SystemClasses/System.IOUtils.hpp
../SystemClasses/TFileStream.hpp
../SystemClasses/TMemoryStream.hpp
../SystemClasses/TStream.hpp
../SystemClasses/TStreamReader.hpp
../SystemClasses/TStreamWriter.hpp
../SystemClasses/System.SysUtils.hpp
../SystemClasses/GetTickCount.hpp
../SystemClasses/Exception.hpp)
set (SYSTEMCLASSES_SOURCES SystemClasses/String.cpp
SystemClasses/System.Classes.cpp
SystemClasses/System.cpp
SystemClasses/System.IOUtils.cpp
SystemClasses/TFileStream.cpp
SystemClasses/TMemoryStream.cpp
SystemClasses/TStream.cpp
SystemClasses/TStreamReader.cpp
SystemClasses/TStreamWriter.cpp
SystemClasses/System.SysUtils.cpp
SystemClasses/GetTickCount.cpp)
set (SYSTEMCLASSES_HEADERS SystemClasses/String.hpp
SystemClasses/System.Classes.hpp
SystemClasses/System.hpp
SystemClasses/System.IOUtils.hpp
SystemClasses/TFileStream.hpp
SystemClasses/TMemoryStream.hpp
SystemClasses/TStream.hpp
SystemClasses/TStreamReader.hpp
SystemClasses/TStreamWriter.hpp
SystemClasses/System.SysUtils.hpp
SystemClasses/GetTickCount.hpp
SystemClasses/Exception.hpp)


set (TOOL1CD_SOURCES MessageRegistration.cpp Class_1CD.cpp
Expand Down
3 changes: 2 additions & 1 deletion src/tool1cd/CRC32.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@
#ifndef CRC32H
#define CRC32H

#include <System.Classes.hpp>
#include "SystemClasses/TStream.hpp"
#include <cstdint>

//---------------------------------------------------------------------------
uint32_t _crc32(TStream* str);
Expand Down
2 changes: 1 addition & 1 deletion src/tool1cd/Class_1CD.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
*/

#include <vector>
#include <System.IOUtils.hpp>
#include "SystemClasses/System.IOUtils.hpp"
#include <boost/filesystem.hpp>
#include <boost/uuid/uuid.hpp>
#include <boost/uuid/uuid_generators.hpp>
Expand Down
Loading

0 comments on commit 0e8309d

Please sign in to comment.