-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathPySegmentAnalysisResultsGraphViewController.cpp
188 lines (155 loc) · 5.77 KB
/
PySegmentAnalysisResultsGraphViewController.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
#include "stdafx.h"
#include "PySegmentAnalysisResultsGraphViewController.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
void CPySegmentAnalysisResultsGraphViewController::Init(ISegmentAnalysisResultsGraphViewController* pViewController)
{
m_pMyViewController = pViewController;
CPyViewControllerBase::Init(pViewController);
}
void CPySegmentAnalysisResultsGraphViewController::SetGraphMode(ISegmentAnalysisResultsGraphViewController::GraphMode mode)
{
m_pMyViewController->SetGraphMode(mode);
}
ISegmentAnalysisResultsGraphViewController::GraphMode CPySegmentAnalysisResultsGraphViewController::GetGraphMode() const
{
return m_pMyViewController->GetGraphMode();
}
CSegmentKey CPySegmentAnalysisResultsGraphViewController::GetSegment() const
{
return m_pMyViewController->GetSegment();
}
void CPySegmentAnalysisResultsGraphViewController::SelectSegment(const CSegmentKey& segmentKey)
{
m_pMyViewController->SelectSegment(segmentKey);
}
void CPySegmentAnalysisResultsGraphViewController::SetResultsType(ResultsType resultsType)
{
m_pMyViewController->SetResultsType(resultsType);
}
ResultsType CPySegmentAnalysisResultsGraphViewController::GetResultsType() const
{
return m_pMyViewController->GetResultsType();
}
std::vector<ActionType> CPySegmentAnalysisResultsGraphViewController::GetActionTypes() const
{
return m_pMyViewController->GetActionTypes();
}
boost::python::str CPySegmentAnalysisResultsGraphViewController::GetActionName(ActionType action) const
{
USES_CONVERSION;
const char* pstrName = T2A(m_pMyViewController->GetActionName(action));
boost::python::str strName(pstrName);
return strName;
}
void CPySegmentAnalysisResultsGraphViewController::SetActionType(ActionType actionType)
{
m_pMyViewController->SetActionType(actionType);
}
ActionType CPySegmentAnalysisResultsGraphViewController::GetActionType() const
{
return m_pMyViewController->GetActionType();
}
void CPySegmentAnalysisResultsGraphViewController::SetAnalysisType(pgsTypes::AnalysisType analysisType)
{
m_pMyViewController->SetAnalysisType(analysisType);
}
pgsTypes::AnalysisType CPySegmentAnalysisResultsGraphViewController::GetAnalysisType() const
{
return m_pMyViewController->GetAnalysisType();
}
void CPySegmentAnalysisResultsGraphViewController::SelectStressLocation(pgsTypes::StressLocation location, bool bSelect)
{
m_pMyViewController->SelectStressLocation(location, bSelect);
}
bool CPySegmentAnalysisResultsGraphViewController::IsStressLocationSelected(pgsTypes::StressLocation location) const
{
return m_pMyViewController->IsStressLocationSelected(location);
}
IndexType CPySegmentAnalysisResultsGraphViewController::GetGraphTypeCount() const
{
return m_pMyViewController->GetGraphTypeCount();
}
boost::python::str CPySegmentAnalysisResultsGraphViewController::GetGraphType(IndexType idx) const
{
USES_CONVERSION;
const char* pstrName = T2A(m_pMyViewController->GetGraphType(idx));
boost::python::str strName(pstrName);
return strName;
}
void CPySegmentAnalysisResultsGraphViewController::SelectGraphTypeByIndex(IndexType idx)
{
m_pMyViewController->SelectGraphType(idx);
}
void CPySegmentAnalysisResultsGraphViewController::SelectGraphTypeByName(LPCSTR lpszType)
{
USES_CONVERSION;
m_pMyViewController->SelectGraphType(A2T(lpszType));
}
IndexType CPySegmentAnalysisResultsGraphViewController::GetGraphCount() const
{
return m_pMyViewController->GetGraphCount();
}
IndexType CPySegmentAnalysisResultsGraphViewController::GetSelectedGraphCount() const
{
return m_pMyViewController->GetSelectedGraphCount();
}
boost::python::list CPySegmentAnalysisResultsGraphViewController::GetSelectedGraphs() const
{
boost::python::list list;
std::vector<IndexType> vSelectedGraphs = m_pMyViewController->GetSelectedGraphs();
std::for_each(vSelectedGraphs.cbegin(), vSelectedGraphs.cend(), [&list](const auto& index) {list.append(index);});
return list;
}
boost::python::str CPySegmentAnalysisResultsGraphViewController::GetGraphName(IndexType graphIdx) const
{
USES_CONVERSION;
const char* pstrName = T2A(m_pMyViewController->GetGraphName(graphIdx));
boost::python::str strGraphName(pstrName);
return strGraphName;
}
void CPySegmentAnalysisResultsGraphViewController::SelectGraphByIndex(IndexType graphIdx)
{
m_pMyViewController->SelectGraph(graphIdx);
}
void CPySegmentAnalysisResultsGraphViewController::SelectGraphByName(LPCSTR lpszGraphName)
{
USES_CONVERSION;
m_pMyViewController->SelectGraph(A2T(lpszGraphName));
}
void CPySegmentAnalysisResultsGraphViewController::SelectGraphsByIndex(const boost::python::list& lGraphs)
{
boost::python::stl_input_iterator<IndexType> begin(lGraphs), end;
std::vector<IndexType> vGraphs(begin, end);
m_pMyViewController->SelectGraphs(vGraphs);
}
void CPySegmentAnalysisResultsGraphViewController::SelectGraphsByName(const boost::python::list& lGraphs)
{
boost::python::stl_input_iterator<const char*> begin(lGraphs), end;
std::vector<CString> vGraphs(begin, end);
m_pMyViewController->SelectGraphs(vGraphs);
}
void CPySegmentAnalysisResultsGraphViewController::SetShowGrid(bool bShow)
{
m_pMyViewController->ShowGrid(bShow);
}
bool CPySegmentAnalysisResultsGraphViewController::GetShowGrid() const
{
return m_pMyViewController->ShowGrid();
}
void CPySegmentAnalysisResultsGraphViewController::SetShowGirder(bool bShow)
{
m_pMyViewController->ShowGirder(bShow);
}
bool CPySegmentAnalysisResultsGraphViewController::GetShowGirder() const
{
return m_pMyViewController->ShowGirder();
}
CPySegmentAnalysisResultsGraphViewController* CPySegmentAnalysisResultsGraphViewController::GetGraphController(CPyViewControllerBase* pController)
{
auto pMyController = static_cast<CPySegmentAnalysisResultsGraphViewController*>(pController);
return pMyController;
}