Difference between revisions of "TypeSystems"

From Sirikata Wiki
Jump to navigation Jump to search
Line 4: Line 4:
 
This gives us the following types
 
This gives us the following types
  
{| border="1" cellpadding="2"
+
{| border="1" cellpadding="0"
 
!width="50"|Name
 
!width="50"|Name
!width="225"|Effect
+
|-
!width="225"|Games Found In
 
 
|double
 
|double
 +
|-
 
|float
 
|float
 +
|-
 
|int32
 
|int32
 +
|-
 
|int64
 
|int64
 +
|-
 
|uint32
 
|uint32
 +
|-
 
|uint64
 
|uint64
 +
|-
 
|sint32
 
|sint32
 +
|-
 
|sint64
 
|sint64
 +
|-
 
|fixed32
 
|fixed32
 +
|-
 
|fixed64
 
|fixed64
 +
|-
 
|sfixed32
 
|sfixed32
 +
|-
 
|sfixed64
 
|sfixed64
 +
|-
 
|bool
 
|bool
 +
|-
 
|string
 
|string
 +
|-
 
|bytes
 
|bytes
}
+
 
 +
There are some additional types that would be nice to add:
 +
{| border="1" cellpadding="0"
 +
!width="50"|Name||Basic Types Built From
 +
|-
 +
|Fixed Length Arrays || bytes
 +
|-
 +
|UUID || Fixed Length Array [16]
 +
|-
 +
|URI || Variable Length Array of Strings
 +
|-
 +
|Time
 +
|-
 +
|Duration
 +
|-
 +
|flags (enum where each enumerant can be toggled)
 +
|-
 +
|Vector3f
 +
|-
 +
|Vector2f
 +
|-
 +
|Vector3d
 +
|-
 +
|Vector2d
 +
|-
 +
|Quaternion
 +
|-
 +
|Angle (0-2pi)
 +
|-
 +
|Bounding box/sphere (NULL defined)

Revision as of 00:11, 14 February 2009

We want the type system to be serialization agnostic so we can support different backends.

Our current implementation ideas revolve around starting from the serialization format specified in protocol buffers. This gives us the following types

Name
double
float
int32
int64
uint32
uint64
sint32
sint64
fixed32
fixed64
sfixed32
sfixed64
bool
string
bytes

There are some additional types that would be nice to add:

Name Basic Types Built From
Fixed Length Arrays bytes
UUID Fixed Length Array [16]
URI Variable Length Array of Strings
Time
Duration
flags (enum where each enumerant can be toggled)
Vector3f
Vector2f
Vector3d
Vector2d
Quaternion
Angle (0-2pi)
Bounding box/sphere (NULL defined)