81
81
jobject EnumMapper::mapNotifyState(svn_wc_notify_state_t state)
83
83
// We're assuming a valid value for the C enum above
84
return mapEnum(JAVA_PACKAGE"/ClientNotifyInformation$Status", (int) state);
84
return mapEnum(JAVA_PACKAGE"/ClientNotifyInformation$Status",
85
static_cast<int>(state));
90
91
jobject EnumMapper::mapNotifyAction(svn_wc_notify_action_t action)
92
93
// We're assuming a valid value for the C enum above
93
return mapEnum(JAVA_PACKAGE"/ClientNotifyInformation$Action", (int) action);
94
return mapEnum(JAVA_PACKAGE"/ClientNotifyInformation$Action",
95
static_cast<int>(action));
96
98
jobject EnumMapper::mapReposNotifyNodeAction(svn_node_action action)
98
100
// We're assuming a valid value for the C enum above
99
return mapEnum(JAVA_PACKAGE"/ReposNotifyInformation$NodeAction", (int) action);
101
return mapEnum(JAVA_PACKAGE"/ReposNotifyInformation$NodeAction",
102
static_cast<int>(action));
105
108
jobject EnumMapper::mapReposNotifyAction(svn_repos_notify_action_t action)
107
110
// We're assuming a valid value for the C enum above
108
return mapEnum(JAVA_PACKAGE"/ReposNotifyInformation$Action", (int) action);
111
return mapEnum(JAVA_PACKAGE"/ReposNotifyInformation$Action",
112
static_cast<int>(action));
114
118
jobject EnumMapper::mapNodeKind(svn_node_kind_t nodeKind)
116
120
// We're assuming a valid value for the C enum above
117
return mapEnum(JAVA_PACKAGE"/types/NodeKind", (int) nodeKind);
121
return mapEnum(JAVA_PACKAGE"/types/NodeKind",
122
static_cast<int>(nodeKind));
123
128
jobject EnumMapper::mapNotifyLockState(svn_wc_notify_lock_state_t state)
125
130
// We're assuming a valid value for the C enum above
126
return mapEnum(JAVA_PACKAGE"/ClientNotifyInformation$LockStatus", (int) state);
131
return mapEnum(JAVA_PACKAGE"/ClientNotifyInformation$LockStatus",
132
static_cast<int>(state));
132
138
jobject EnumMapper::mapScheduleKind(svn_wc_schedule_t schedule)
134
140
// We're assuming a valid value for the C enum above
135
return mapEnum(JAVA_PACKAGE"/types/Info$ScheduleKind", (int) schedule);
141
return mapEnum(JAVA_PACKAGE"/types/Info$ScheduleKind",
142
static_cast<int>(schedule));
143
150
// We're assuming a valid value for the C enum above
144
151
// The offset here is +1
145
return mapEnum(JAVA_PACKAGE"/types/Status$Kind", ((int) svnKind) - 1);
152
return mapEnum(JAVA_PACKAGE"/types/Status$Kind",
153
static_cast<int>(svnKind) - 1);
148
156
jobject EnumMapper::mapChecksumKind(svn_checksum_kind_t kind)
150
158
// We're assuming a valid value for the C enum above
151
return mapEnum(JAVA_PACKAGE"/types/Checksum$Kind", (int) kind);
159
return mapEnum(JAVA_PACKAGE"/types/Checksum$Kind",
160
static_cast<int>(kind));
154
163
jobject EnumMapper::mapConflictKind(svn_wc_conflict_kind_t kind)
156
165
// We're assuming a valid value for the C enum above
157
return mapEnum(JAVA_PACKAGE"/ConflictDescriptor$Kind", (int) kind);
166
return mapEnum(JAVA_PACKAGE"/ConflictDescriptor$Kind",
167
static_cast<int>(kind));
160
170
jobject EnumMapper::mapConflictAction(svn_wc_conflict_action_t action)
162
172
// We're assuming a valid value for the C enum above
163
return mapEnum(JAVA_PACKAGE"/ConflictDescriptor$Action", (int) action);
173
return mapEnum(JAVA_PACKAGE"/ConflictDescriptor$Action",
174
static_cast<int>(action));
166
177
jobject EnumMapper::mapConflictReason(svn_wc_conflict_reason_t reason)
168
179
// We're assuming a valid value for the C enum above
169
return mapEnum(JAVA_PACKAGE"/ConflictDescriptor$Reason", (int) reason);
180
return mapEnum(JAVA_PACKAGE"/ConflictDescriptor$Reason",
181
static_cast<int>(reason));
172
184
int EnumMapper::toMergeinfoLogKind(jobject jLogKind)
182
194
svn_depth_t EnumMapper::toDepth(jobject jdepth)
184
196
// The offset for depths is -2
185
return (svn_depth_t) (getOrdinal(JAVA_PACKAGE"/types/Depth", jdepth) - 2);
197
return static_cast<svn_depth_t>(getOrdinal(JAVA_PACKAGE"/types/Depth", jdepth) - 2);
188
200
jobject EnumMapper::mapDepth(svn_depth_t depth)
190
202
// We're assuming a valid value for the C enum above
191
203
// The offset for depths is -2
192
return mapEnum(JAVA_PACKAGE"/types/Depth", ((int) depth) + 2);
204
return mapEnum(JAVA_PACKAGE"/types/Depth", static_cast<int>(depth) + 2);
195
207
jobject EnumMapper::mapOperation(svn_wc_operation_t operation)
197
209
// We're assuming a valid value for the C enum above
198
return mapEnum(JAVA_PACKAGE"/ConflictDescriptor$Operation", (int) operation);
210
return mapEnum(JAVA_PACKAGE"/ConflictDescriptor$Operation",
211
static_cast<int>(operation));
201
214
jobject EnumMapper::mapTristate(svn_tristate_t tristate)
203
216
// We're assuming a valid value for the C enum above
204
217
return mapEnum(JAVA_PACKAGE"/types/Tristate",
205
(int) (tristate - svn_tristate_false));
218
static_cast<int>(tristate - svn_tristate_false));
208
221
svn_wc_conflict_choice_t EnumMapper::toConflictChoice(jobject jchoice)
210
return (svn_wc_conflict_choice_t) getOrdinal(
211
JAVA_PACKAGE"/ConflictResult$Choice", jchoice);
223
return static_cast<svn_wc_conflict_choice_t>
224
(getOrdinal(JAVA_PACKAGE"/ConflictResult$Choice", jchoice));
214
227
svn_opt_revision_kind EnumMapper::toRevisionKind(jobject jkind)
216
return (svn_opt_revision_kind) getOrdinal(JAVA_PACKAGE"/types/Revision$Kind",
229
return static_cast<svn_opt_revision_kind>
230
(getOrdinal(JAVA_PACKAGE"/types/Revision$Kind", jkind));
220
233
jobject EnumMapper::mapSummarizeKind(svn_client_diff_summarize_kind_t sKind)
222
235
// We're assuming a valid value for the C enum above
223
return mapEnum(JAVA_PACKAGE"/DiffSummary$DiffKind", (int) sKind);
236
return mapEnum(JAVA_PACKAGE"/DiffSummary$DiffKind",
237
static_cast<int>(sKind));
226
240
jobject EnumMapper::mapEnum(const char *clazzName, int index)