PBX UUID are composed of 24 hex characters. They only need to be unique within the same project.
This implementation simply counts upward from 0.
nitc :: PbxUUIDGenerator :: _seed
nitc :: PbxUUIDGenerator :: defaultinit
nitc :: PbxUUIDGenerator :: seed
nitc :: PbxUUIDGenerator :: seed=
nitc $ PbxUUIDGenerator :: SELF
Type of this instance, automatically specialized in every classnitc :: PbxUUIDGenerator :: _seed
core :: Object :: class_factory
Implementation used byget_class
to create the specific class.
nitc :: PbxUUIDGenerator :: defaultinit
core :: Object :: defaultinit
core :: Object :: is_same_instance
Return true ifself
and other
are the same instance (i.e. same identity).
core :: Object :: is_same_serialized
Isself
the same as other
in a serialization context?
core :: Object :: is_same_type
Return true ifself
and other
have the same dynamic type.
core :: Object :: native_class_name
The class name of the object in CString format.core :: Object :: output_class_name
Display class name on stdout (debug only).nitc :: PbxUUIDGenerator :: seed
nitc :: PbxUUIDGenerator :: seed=
# Generator of PBX UUIDs
#
# PBX UUID are composed of 24 hex characters.
# They only need to be unique within the same project.
#
# This implementation simply counts upward from 0.
class PbxUUIDGenerator
private var seed = 0
# Generate a new UUID
fun next_uuid: String
do
seed += 1
var hex_val = seed.to_hex.to_upper
return "0"*(24-hex_val.length) + hex_val
end
end
src/platform/xcode_templates.nit:60,1--77,3