doxy/node/xml2js.js
function getType(type_c, parent) {
  var type_js = type_c;
  _.find(xml2js.TYPEMAPS, function(to, from) {
    var pattern = new RegExp(from, 'i');
    if (type_c.search(pattern) == 0) {
      type_js = to;
      return true;
    }
  });
  if (isPointer(type_js)) {
    var dataType = getPointerDataType(type_js);
    var className = parent.toLowerCase();
    if (_.has(xml2js.ARRAY_TYPEMAPS, dataType) && _.contains(xml2js.ARRAY_TYPEMAPS[dataType].classes, className)) {
      type_js = xml2js.ARRAY_TYPEMAPS[dataType].arrayType;
    } else if (_.has(xml2js.POINTER_TYPEMAPS, className) && _.has(xml2js.POINTER_TYPEMAPS[className], dataType)) {
      type_js = xml2js.POINTER_TYPEMAPS[className][dataType];
    } else if (_.has(xml2js.CLASSES, dataType)) { // TODO: verify that swig does this mapping
      type_js = dataType;
    } else {
      type_js = dataType + ' &#42;'
    }
  }
  return type_js;
}
function getType(type_c, parent) {
  var type_js = type_c;
  _.find(xml2js.TYPEMAPS, function(to, from) {
    var pattern = new RegExp(from, 'i');
    if (type_c.search(pattern) == 0) {
      type_js = to;
      return true;
    }
  });
  if (isPointer(type_js)) {
    var dataType = getPointerDataType(type_js);
    var className = parent.toLowerCase();
    if (_.has(xml2js.ARRAY_TYPEMAPS, dataType) && _.contains(xml2js.ARRAY_TYPEMAPS[dataType].classes, className)) {
      type_js = xml2js.ARRAY_TYPEMAPS[dataType].arrayType;
    } else if (_.has(xml2js.POINTER_TYPEMAPS, className) && _.has(xml2js.POINTER_TYPEMAPS[className], dataType)) {
      type_js = xml2js.POINTER_TYPEMAPS[className][dataType];
    } else if (_.has(xml2js.CLASSES, dataType)) { // TODO: verify that swig does this mapping
      type_js = dataType;
    } else {
      type_js = dataType + ' &#42;'
    }
  }
  return type_js;
}
function getType ( type_c , parent ) { var type_js = type_c ; _ . find ( xml2js . TYPEMAPS , function ( to , from ) { var pattern = new RegExp ( from , 'i' ) ; if ( type_c . search ( pattern ) == 0 ) { type_js = to ; return true ; } } ) ; if ( isPointer ( type_js ) ) { var dataType = getPointerDataType ( type_js ) ; var className = parent . toLowerCase ( ) ; if ( _ . has ( xml2js . ARRAY_TYPEMAPS , dataType ) && _ . contains ( xml2js . ARRAY_TYPEMAPS [ dataType ] . classes , className ) ) { type_js = xml2js . ARRAY_TYPEMAPS [ dataType ] . arrayType ; } else if ( _ . has ( xml2js . POINTER_TYPEMAPS , className ) && _ . has ( xml2js . POINTER_TYPEMAPS [ className ] , dataType ) ) { type_js = xml2js . POINTER_TYPEMAPS [ className ] [ dataType ] ; } else if ( _ . has ( xml2js . CLASSES , dataType ) ) { // TODO: verify that swig does this mapping type_js = dataType ; } else { type_js = dataType + ' &#42;' } } return type_js ; }
get the equivalent javascript type from the given c type
get the equivalent javascript type from the given c type