Ejemplo n.º 1
0
 def setSchema(self, schemaName, schemaValue):
     C11Type.setSchema(self, schemaName, schemaValue)
     if u'type' in schemaValue:
         schemaValueType = schemaValue[u'type']
         if schemaValueType == u'bool' or schemaValueType == u'boolean':
             self.c11Type = C11TypeBool()
         elif schemaValueType == u'integer':
             self.c11Type = C11TypeInteger()
         elif schemaValueType == u'number':
             self.c11Type = C11TypeNumber()
         elif schemaValueType == u'string':
             self.c11Type = C11TypeString()
         elif schemaValueType == u'array':
             self.c11Type = C11TypeArray()
     if self.c11Type == None:
         if u'allOf' in schemaValue:
             schemaValueAllOf = schemaValue[u'allOf']
             for schemaValueAllOfItem in schemaValueAllOf:
                 if u'$ref' in schemaValueAllOfItem:
                     self.parents[schemaValueAllOfItem[u'$ref']] = None
         if u'properties' in schemaValue:
             schemaValueProperties = schemaValue[u'properties']
             for key in schemaValueProperties:
                 self.variables[key] = C11Variable(
                     key, schemaValueProperties[key])
Ejemplo n.º 2
0
 def setSchema(self, schemaName, schemaValue):
     C11Type.setSchema(self, schemaName, schemaValue)
Ejemplo n.º 3
0
 def setSchema(self, schemaName, schemaValue):
     C11Type.setSchema(self, schemaName, schemaValue)
     self.typeName = u'int32_t'
Ejemplo n.º 4
0
 def setSchema(self, schemaName, schemaValue):
     C11Type.setSchema(self, schemaName, schemaValue)
     self.typeName = u'float'