tools/json_schema_compiler/cpp_util.py
def GetValueType(type_):
  """Returns the Value::Type corresponding to the model.Type.
  """
  if type_.property_type == PropertyType.ARRAY:
    return 'base::Value::Type::LIST'
  if type_.property_type == PropertyType.BINARY:
    return 'base::Value::Type::BINARY'
  if type_.property_type == PropertyType.BOOLEAN:
    return 'base::Value::Type::BOOLEAN'
  if type_.property_type == PropertyType.DOUBLE:
    return 'base::Value::Type::DOUBLE'
  if type_.property_type == PropertyType.ENUM:
    return 'base::Value::Type::STRING'
  if type_.property_type == PropertyType.FUNCTION:
    if type_.is_serializable_function:
      return 'base::Value::Type::STRING'
    return 'base::Value::Type::DICTIONARY'
  if type_.property_type == PropertyType.INTEGER:
    return 'base::Value::Type::INTEGER'
  if type_.property_type == PropertyType.OBJECT:
    return 'base::Value::Type::DICTIONARY'
  if type_.property_type == PropertyType.STRING:
    return 'base::Value::Type::STRING'

  raise ValueError('Invalid type: %s' % type_.name)
Returns the Value::Type corresponding to the model.Type.
  
Returns the Value::Type corresponding to the model.Type.
Returns the Value :: Type corresponding to the model . Type .
def GetValueType(type_):
  if type_.property_type == PropertyType.ARRAY:
    return 'base::Value::Type::LIST'
  if type_.property_type == PropertyType.BINARY:
    return 'base::Value::Type::BINARY'
  if type_.property_type == PropertyType.BOOLEAN:
    return 'base::Value::Type::BOOLEAN'
  if type_.property_type == PropertyType.DOUBLE:
    return 'base::Value::Type::DOUBLE'
  if type_.property_type == PropertyType.ENUM:
    return 'base::Value::Type::STRING'
  if type_.property_type == PropertyType.FUNCTION:
    if type_.is_serializable_function:
      return 'base::Value::Type::STRING'
    return 'base::Value::Type::DICTIONARY'
  if type_.property_type == PropertyType.INTEGER:
    return 'base::Value::Type::INTEGER'
  if type_.property_type == PropertyType.OBJECT:
    return 'base::Value::Type::DICTIONARY'
  if type_.property_type == PropertyType.STRING:
    return 'base::Value::Type::STRING'
  raise ValueError('Invalid type: %s' % type_.name)
def GetValueType ( type_ ) : if type_ . property_type == PropertyType . ARRAY : return 'base::Value::Type::LIST' if type_ . property_type == PropertyType . BINARY : return 'base::Value::Type::BINARY' if type_ . property_type == PropertyType . BOOLEAN : return 'base::Value::Type::BOOLEAN' if type_ . property_type == PropertyType . DOUBLE : return 'base::Value::Type::DOUBLE' if type_ . property_type == PropertyType . ENUM : return 'base::Value::Type::STRING' if type_ . property_type == PropertyType . FUNCTION : if type_ . is_serializable_function : return 'base::Value::Type::STRING' return 'base::Value::Type::DICTIONARY' if type_ . property_type == PropertyType . INTEGER : return 'base::Value::Type::INTEGER' if type_ . property_type == PropertyType . OBJECT : return 'base::Value::Type::DICTIONARY' if type_ . property_type == PropertyType . STRING : return 'base::Value::Type::STRING' raise ValueError ( 'Invalid type: %s' % type_ . name )
Returns the Value::Type corresponding to the model.Type.
Returns the Value :: Type corresponding to the model . Type .
"""Returns the Value::Type corresponding to the model.Type.
  """
type_