Subversion Repositories tpanel

Rev

Rev 137 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 137 Rev 186
Line 20... Line 20...
20
#include "terror.h"
20
#include "terror.h"
21
#include "tconfig.h"
21
#include "tconfig.h"
22
#include "tresources.h"
22
#include "tresources.h"
23
#include "texpat++.h"
23
#include "texpat++.h"
24
 
24
 
-
 
25
#if __cplusplus < 201402L
-
 
26
#   error "This module requires at least C++14 standard!"
-
 
27
#else
-
 
28
#   if __cplusplus < 201703L
-
 
29
#       include <experimental/filesystem>
-
 
30
namespace fs = std::experimental::filesystem;
-
 
31
#       warning "Support for C++14 and experimental filesystem will be removed in a future version!"
-
 
32
#   else
-
 
33
#       include <filesystem>
-
 
34
#       ifdef __ANDROID__
-
 
35
namespace fs = std::__fs::filesystem;
-
 
36
#       else
-
 
37
namespace fs = std::filesystem;
-
 
38
#       endif
-
 
39
#   endif
-
 
40
#endif
-
 
41
 
25
using std::string;
42
using std::string;
26
using std::vector;
43
using std::vector;
27
using std::map;
44
using std::map;
28
using std::pair;
45
using std::pair;
29
using namespace Expat;
46
using namespace Expat;
30
 
47
 
31
TPalette::TPalette()
48
TPalette::TPalette()
32
{
49
{
33
    DECL_TRACER("TPalette::TPalette()");
50
    DECL_TRACER("TPalette::TPalette()");
-
 
51
 
-
 
52
    mPath = TConfig::getProjectPath();
34
}
53
}
35
 
54
 
36
TPalette::TPalette(const std::string& file)
55
TPalette::TPalette(const std::string& file)
37
{
56
{
38
    DECL_TRACER("TPalette::TPalette(const std::string& file)");
57
    DECL_TRACER("TPalette::TPalette(const std::string& file)");
-
 
58
 
-
 
59
    mPath = TConfig::getProjectPath();
39
    initialize(file);
60
    initialize(file);
40
}
61
}
41
 
62
 
42
TPalette::~TPalette()
63
TPalette::~TPalette()
43
{
64
{
Line 46... Line 67...
46
 
67
 
47
void TPalette::initialize(const std::string& file)
68
void TPalette::initialize(const std::string& file)
48
{
69
{
49
    DECL_TRACER("TPalette::initialize(const std::string& file)");
70
    DECL_TRACER("TPalette::initialize(const std::string& file)");
50
 
71
 
-
 
72
    if (!fs::exists(mPath + "/prj.xma"))
-
 
73
        mPath += "/__system";
-
 
74
 
51
    makeFileName(TConfig::getProjectPath(), file);
75
    makeFileName(mPath, file);
52
    string path;
76
    string path;
53
 
77
 
54
    if (isValidFile())
78
    if (isValidFile())
55
        path = getFileName();
79
        path = getFileName();
56
 
80