Skip to content

Commit

Permalink
Refactored includes
Browse files Browse the repository at this point in the history
  • Loading branch information
maartenplieger committed Feb 14, 2025
1 parent 414e40b commit a29b49a
Show file tree
Hide file tree
Showing 10 changed files with 52 additions and 81 deletions.
2 changes: 1 addition & 1 deletion adagucserverEC/CMakeEProfile.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
#include <algorithm>
#include "CMakeEProfile.h"
#include "CImageDataWriter.h"
#include "CUniqueRequests/CURConstants.h"
#include "CUniqueRequests/CURTypes.h"

const char *CMakeEProfile::className = "CMakeEProfile";

Expand Down
3 changes: 2 additions & 1 deletion adagucserverEC/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -192,9 +192,10 @@ add_library(
CServerParams.h
CStyleConfiguration.cpp
CStyleConfiguration.h
CUniqueRequests/CURResult.h
CUniqueRequests/CURTypes.h
CUniqueRequests/requestUtils.h
CUniqueRequests/requestUtils.cpp
CUniqueRequests/CURUniqueRequests.h
CUniqueRequests/CURUniqueRequests.cpp
CXMLGen.cpp
CXMLGen.h
Expand Down
16 changes: 0 additions & 16 deletions adagucserverEC/CUniqueRequests/CURAggregatedDimension.h

This file was deleted.

4 changes: 0 additions & 4 deletions adagucserverEC/CUniqueRequests/CURConstants.h

This file was deleted.

18 changes: 0 additions & 18 deletions adagucserverEC/CUniqueRequests/CURDimInfo.h

This file was deleted.

13 changes: 0 additions & 13 deletions adagucserverEC/CUniqueRequests/CURFileInfo.h

This file was deleted.

21 changes: 0 additions & 21 deletions adagucserverEC/CUniqueRequests/CURResult.h

This file was deleted.

47 changes: 47 additions & 0 deletions adagucserverEC/CUniqueRequests/CURTypes.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
#ifndef CURTYPES_H
#define CURTYPES_H

#include <map>
#include "CTString.h"
#define CCUniqueRequests_MAX_DIMS 255
typedef std::map<int, std::string> map_type_dimvalindex;
typedef std::map<int, std::string>::iterator it_type_dimvalindex;

class CURUniqueRequests;

struct CURAggregatedDimensionNoName {
int start;
std::vector<std::string> values;
};
struct CURAggregatedDimensionAndName {
CT::string name;
int start;
std::vector<std::string> values;
};

struct CURDimInfo {
map_type_dimvalindex dimValuesMap; // All values, many starts with 1 count, result of set()
std::vector<CURAggregatedDimensionNoName> aggregatedValues; // Aggregated values (start/count series etc), result of addDimSet()
};

typedef std::map<std::string, CURDimInfo> map_type_diminfo;
typedef map_type_diminfo::iterator it_type_diminfo;

struct CURDimensionKey {
std::string name;
int type;
};

struct CURResult {
CURUniqueRequests *parent;
CURDimensionKey dimensionKeys[CCUniqueRequests_MAX_DIMS];
CT::string value;
int numDims;
};

struct CURFileInfo {
std::vector<std::vector<CURAggregatedDimensionAndName>> requests;
map_type_diminfo dimInfoMap; // AggregatedDimension name is key
};

#endif
7 changes: 1 addition & 6 deletions adagucserverEC/CUniqueRequests/CURUniqueRequests.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,14 @@
#include <map>
#include "CTString.h"
#include "CDebugger.h"
#include "CURConstants.h"
#include "CURDimInfo.h"
#include "CURFileInfo.h"
#include "CURTypes.h"
#include "CServerParams.h"
#include "CDrawImage.h"
#include "CDataSource.h"
#include "CImageWarper.h"
#include "CUniqueRequests/CURResult.h"
#include "CUniqueRequests/requestUtils.h"
#include "requestUtils.h"

struct CURResult;

class CURUniqueRequests {

typedef std::map<std::string, CURFileInfo>::iterator it_type_file;
Expand Down
2 changes: 1 addition & 1 deletion adagucserverEC/CUniqueRequests/requestUtils.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#ifndef REQUESTUTILS_H
#define REQUESTUTILS_H
#include "CUniqueRequests/CURResult.h"
#include "CUniqueRequests/CURTypes.h"

void padTo(std::string &str, const size_t num, const char paddingChar = ' ');

Expand Down

0 comments on commit a29b49a

Please sign in to comment.