Ejemplo n.º 1
0
/**
 * 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);
}
Ejemplo n.º 2
0
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;
    }
}
Ejemplo n.º 3
0
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;
}
Ejemplo n.º 4
0
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));
}
Ejemplo n.º 5
0
/**
 * 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));
}
Ejemplo n.º 6
0
/**
 * 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));
}
Ejemplo n.º 7
0
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));
}
Ejemplo n.º 8
0
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));
}
Ejemplo n.º 9
0
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));
}
Ejemplo n.º 10
0
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);
}
Ejemplo n.º 11
0
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));
}
Ejemplo n.º 12
0
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));
}
Ejemplo n.º 13
0
/**
 * 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));
}
Ejemplo n.º 14
0
/**
 * 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));
}