/** * Map a C wc state constant to the Java constant. */ jobject EnumMapper::mapStatusKind(svn_wc_status_kind svnKind) { // We're assuming a valid value for the C enum above // The offset here is +1 return mapEnum(JAVA_PACKAGE"/types/Status$Kind", static_cast<int>(svnKind) - 1); }
jobject EnumMapper::mapChangePathAction(const char action) { switch (action) { case 'A': return mapEnum(JAVA_PACKAGE"/types/ChangePath$Action", 0); case 'D': return mapEnum(JAVA_PACKAGE"/types/ChangePath$Action", 1); case 'R': return mapEnum(JAVA_PACKAGE"/types/ChangePath$Action", 2); case 'M': return mapEnum(JAVA_PACKAGE"/types/ChangePath$Action", 3); default: return NULL; } }
void ValueStoreCache::endElement() { if (fGlobalMapStack->empty()) { return; // must be an invalid doc! } RefHashTableOf<ValueStore, PtrHasher>* oldMap = fGlobalMapStack->pop(); RefHashTableOfEnumerator<ValueStore, PtrHasher> mapEnum(oldMap, false, fMemoryManager); // Janitor<RefHashTableOf<ValueStore> > janMap(oldMap); while (mapEnum.hasMoreElements()) { ValueStore& oldVal = mapEnum.nextElement(); IdentityConstraint* ic = oldVal.getIdentityConstraint(); ValueStore* currVal = fGlobalICMap->get(ic); if (!currVal) { fGlobalICMap->put(ic, &oldVal); } else { currVal->append(&oldVal); } } delete oldMap; }
jobject EnumMapper::mapReposNotifyNodeAction(svn_node_action action) { // We're assuming a valid value for the C enum above return mapEnum(JAVA_PACKAGE"/ReposNotifyInformation$NodeAction", static_cast<int>(action)); }
/** * Map a C notify action constant to the Java constant. */ jobject EnumMapper::mapNotifyAction(svn_wc_notify_action_t action) { // We're assuming a valid value for the C enum above return mapEnum(JAVA_PACKAGE"/ClientNotifyInformation$Action", static_cast<int>(action)); }
/** * Map a C notify state constant to the Java constant. */ jobject EnumMapper::mapNotifyState(svn_wc_notify_state_t state) { // We're assuming a valid value for the C enum above return mapEnum(JAVA_PACKAGE"/ClientNotifyInformation$Status", static_cast<int>(state)); }
jobject EnumMapper::mapSummarizeKind(svn_client_diff_summarize_kind_t sKind) { // We're assuming a valid value for the C enum above return mapEnum(JAVA_PACKAGE"/DiffSummary$DiffKind", static_cast<int>(sKind)); }
jobject EnumMapper::mapTristate(svn_tristate_t tristate) { // We're assuming a valid value for the C enum above return mapEnum(JAVA_PACKAGE"/types/Tristate", static_cast<int>(tristate - svn_tristate_false)); }
jobject EnumMapper::mapOperation(svn_wc_operation_t operation) { // We're assuming a valid value for the C enum above return mapEnum(JAVA_PACKAGE"/ConflictDescriptor$Operation", static_cast<int>(operation)); }
jobject EnumMapper::mapDepth(svn_depth_t depth) { // We're assuming a valid value for the C enum above // The offset for depths is -2 return mapEnum(JAVA_PACKAGE"/types/Depth", static_cast<int>(depth) + 2); }
jobject EnumMapper::mapConflictKind(svn_wc_conflict_kind_t kind) { // We're assuming a valid value for the C enum above return mapEnum(JAVA_PACKAGE"/ConflictDescriptor$Kind", static_cast<int>(kind)); }
jobject EnumMapper::mapChecksumKind(svn_checksum_kind_t kind) { // We're assuming a valid value for the C enum above return mapEnum(JAVA_PACKAGE"/types/Checksum$Kind", static_cast<int>(kind)); }
/** * Map a C wc schedule constant to the Java constant. */ jobject EnumMapper::mapScheduleKind(svn_wc_schedule_t schedule) { // We're assuming a valid value for the C enum above return mapEnum(JAVA_PACKAGE"/types/Info$ScheduleKind", static_cast<int>(schedule)); }
/** * Map a C node kind constant to the Java constant. */ jobject EnumMapper::mapNodeKind(svn_node_kind_t nodeKind) { // We're assuming a valid value for the C enum above return mapEnum(JAVA_PACKAGE"/types/NodeKind", static_cast<int>(nodeKind)); }