-
Notifications
You must be signed in to change notification settings - Fork 0
/
unicly-docs.lisp
2086 lines (1910 loc) · 98.6 KB
/
unicly-docs.lisp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
;;; :FILE-CREATED <Timestamp: #{2011-04-14T12:17:12-04:00Z}#{11154} - by MON>
;;; :FILE unicly/unicly-docs.lisp
;;; ==============================
(in-package #:unicly)
;;; ==============================
;;; :SPECIALS-UUID-DOCUMENTATION
;;; ============================
(vardoc '*random-state-uuid*
"A random-state objet for use when generating UUIDv4 UUIDs.~%~@
:EXAMPLE~%
*random-state-uuid*~%
\(random-state-p *random-state-uuid*\)~%~@
:SEE-ALSO `cl:random-state', `cl:random-state-p'.~%")
(vardoc '*uuid-allow-empty-string-name-args*
"When value is null `make-v3-uuid' and `make-v5-uuid' will error when their NAME
argumement is not of type `unicly::string-not-empty'.~%~@
:SEE-ALSO `*uuid-allow-null-like-namespace-args*',
`unicly::verify-sane-namespace-and-name', `unicly::%verify-non-empty-name-arg',
`unicly::%verify-non-null-namespace-arg'.~%")
(vardoc '*uuid-allow-null-like-namespace-args*
"When value is null, `make-v3-uuid' and `make-v5-uuid' will error when their
NAMESPACE argumement is an instance of the class `unique-universal-identifier'
with all of its slot-values satisfying `cl:zerop' but which doesn't satisfy
`unique-universal-identifier-null-p'.~%~@
:NOTE RFC 4122 probably didn't have CLOS in mind w/r/t the null-uuid and as
such when either of the following type of object is allowed as a NAMESPACE
argument it may produce unexpected results and with unexpected consequences
which may not be easily detected after the fact:~%
\(unique-universal-identifier-null-p \(make-instance 'unique-universal-identifier\)\)
\(unique-universal-identifier-null-p \(make-instance 'unique-universal-identifier-null\)\)
\(unique-universal-identifier-null-p \(make-instance 'mop-frobbed-subclass-of-unique-universal-identifier\)\)
Their may be a performance impact when this argument is nil \(the default\) b/c we
will have to check the slot-values of each namespace arg for each evaluation
of `make-v5-uuid' / `make-v3-uuid'.~%~@
A reasonable way to avoid this impact is to cache the NAMESPACEs common to a
class you control and dynamically bind this variable inside a wrapper function:~%
\(make-v5-uuid-with-cached-namespace \(name\)
\(let \(\(*uuid-allow-null-like-namespace-args* t\)\)
\(make-v5-uuid <CACHED-NAMESPACE> name\)\)\)~%~@
:SEE-ALSO `*uuid-allow-empty-string-name-args*', `unicly::verify-sane-namespace-and-name',
`unicly::%verify-non-empty-name-arg',
`unicly::%verify-non-null-namespace-arg'.~%")
;;; ==============================
(vardoc '*uuid-namespace-dns*
"A DNS namespace as provided with RFC4122 Appendix C. \"Some Name Space IDs\".~%~@
It is suggested that this may be used as the NAMESPACE arg when generating v3
and v5 UUIDs where NAME is a string designating a FQDN \(Fully-Qualified Domain Name\).~%~@
:EXAMPLE~%
\(unique-universal-identifier-p *uuid-namespace-dns*\)~%~@
The default value of this namespace is generated from the hexadecimal integers
provided for `NameSpace_DNS` page 29 of the appendix.~%~@
These are:
#x6ba7b810 ;; uuid-ub32
#x9dad ;; uuid-ub16
#x11d1 ;; uuid-ub16
#x80 ;; uuid-ub8
#xb4 ;; uuid-ub8
#x00 #xc0 #x4f #xd4 #x30 #xc8 ;; uuid-ub48~%~@
With the string representation: \"6ba7b810-9dad-11d1-80b4-00c04fd430c8\"
:SEE-ALSO `make-v3-uuid', `make-v5-uuid', `make-v4-uuid'.~%")
(vardoc '*uuid-namespace-url*
"An URL namespace as provided with RFC4122 Appendix C. \"Some Name Space IDs\".~%~@
It is suggested that this may be used as the NAMESPACE arg when generating v3
and v5 UUIDs where NAME is a string designating an URL \(Universal Resource Locator\).~%~@
:EXAMPLE~%
\(unique-universal-identifier-p *uuid-namespace-url*\)~%~@
The default value for this namespace is generated from the hexadecimal integers
provided with RFC4122 Appendix C. - \"Some- Name Space IDs\" page 29.~%~@
These are:
#x6ba7b811 ;; uuid-ub32
#x9dad ;; uuid-ub16
#x11d1 ;; uuid-ub16
#x80 ;; uuid-ub8
#xb4 ;; uuid-ub8
#x00 #xc0, #x4f, #xd4, #x30, #xc8 ;; uuid-ub48~%~@
With the string representation: \"6ba7b811-9dad-11d1-80b4-00c04fd430c8\"~%~@
:SEE-ALSO `make-v3-uuid', `make-v5-uuid', `make-v4-uuid'.~%")
(vardoc '*uuid-namespace-oid*
"An OID namespace as provided with RFC4122 Appendix C. \"Some Name Space IDs\".~%~@
It is suggested that this may be used as the NAMESPACE arg when generating v3
and v5 UUIDs where NAME is a string designating an ISO OID .~%~@
:EXAMPLE~%
\(unique-universal-identifier-p *uuid-namespace-oid*\)~%~@
The default value for this namespace is generated from the hexadecimal integers
provided with RFC4122 Appendix C. - \"Some- Name Space IDs\" page 29.~%~@
#x6ba7b812 ;; uuid-ub32
#x9dad ;; uuid-ub16
#x11d1 ;; uuid-ub16
#x80 ;; uuid-ub8
#xb4 ;; uuid-ub8
#x00 #xc0, #x4f, #xd4, #x30, #xc8 ;; uuid-ub48~%~@
With the string representaton: \"6ba7b812-9dad-11d1-80b4-00c04fd430c8\"~%~@
:SEE (URL `http://www.techabulary.com/o/oid/')~%~@
:SEE-ALSO `make-v3-uuid', `make-v5-uuid', `make-v4-uuid'.~%")
(vardoc '*uuid-namespace-x500*
"An x500 namespace as provided with RFC4122 Appendix C. \"Some Name Space IDs\".~%~@
It is suggested that this may be used as the NAMESPACE arg when generating v3
and v5 UUIDs where NAME is a string designating an an X.500 Distinguished Name
in DER \(Distinguished Encoding Rules\) or a text output format.~%~@
:EXAMPLE~%~@
\(unique-universal-identifier-p *uuid-namespace-x500*\)~%~@
The default value for this namespace is generated from the hexadecimal integers
provided with RFC4122 Appendix C. - \"Some- Name Space IDs\" page 29.~%~@
#x6ba7b812 ;; uuid-ub32
#x9dad ;; uuid-ub16
#x11d1 ;; uuid-ub16
#x80 ;; uuid-ub8
#xb4 ;; uuid-ub8
#x00 #xc0, #x4f, #xd4, #x30, #xc8 ;; uuid-ub48~%~@
With the string representaton: \"6ba7b812-9dad-11d1-80b4-00c04fd430c8\"~%~@
:SEE \(URL `http://en.wikipedia.org/wiki/X.500'\)~%
:SEE \(URL `http://luca.ntop.org/Teaching/Appunti/asn1.html'\) esp. Section 6. ~%~@
:SEE-ALSO `make-v3-uuid', `make-v5-uuid', `make-v4-uuid'.~%")
(vardoc '*uuid-null-uuid*
"The default null-uuid per RFC4122 Section 4.1.7 \"Nil UUID\".~%
The value of this variable is initialized at loadtime with
`unicly::%make-null-uuid-loadtime'.~%~@
User code should not neither direclty access nor set the value of this
variable and should instead always use `unicly:make-null-uuid'!~%~@
It is an an object of type `unicly::unique-universal-identifier-null'.~%~@
The value of this variable should always evalute to the same object as there
are methods specialized it, e.g.:~%~@
\(uuid-eql *uuid-null-uuid* *uuid-null-uuid*\)~%
\(uuid-eql *uuid-null-uuid* \(make-null-uuid\)\)~%
\(uuid-eql \(make-null-uuid\) *uuid-null-uuid*\)~%
\(uuid-eql *uuid-null-uuid* \(make-instance 'unicly::unique-universal-identifier-null\)\)~%
\(uuid-eql *uuid-null-uuid* \(make-instance 'unicly::unique-universal-identifier\)\)~%
:NOTE The value of this variable should always return t for the following:~%
\(and \(slot-exists-p *uuid-null-uuid* '%uuid_null\)
\(slot-value *uuid-null-uuid* '%uuid_null\)\)~%~@
:SEE-ALSO `<XREF>'.~%")
;;; ==============================
;;; :UUID-TYPES-DOCUMENTATION
;;; ==============================
(typedoc 'uuid-unsigned-byte-size
"An object of type: \(unsigned-byte <SIZE>\)~%~@
:EXAMPLE~%~@
{ ... <EXAMPLE> ... } ~%~@
:SEE-ALSO `uuid-ub128', `uuid-ub64', `uuid-ub48', `uuid-ub32', `uuid-ub16',
`uuid-ub8'.~%")
(typedoc 'uuid-ub128
"An object of type: \(unsigned-byte 128\)~%~@
Octets: 16
Bits: 128
Hex value: #xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
Decimal value: 340282366920938463463374607431768211455
Octal value: #o3777777777777777777777777777777777777777777~%~@
An object of this type is capable of representing the combined the integer value
of the slots of class `unique-universal-identifier'.~%~@
:EXAMPLE~%~@
{ ... <EXAMPLE> ... } ~%~@
:SEE-ALSO `uuid-unsigned-byte-size', `uuid-ub128', `uuid-ub64', `uuid-ub48', `uuid-ub32',
`uuid-ub16', `uuid-ub8'.~%")
(typedoc 'uuid-ub64
"An object of type: \(unsigned-byte 64\)~%~@
An object of this type is capable of representing any integer value
of a slot of class `unique-universal-identifier'.~%~@
:EXAMPLE~%~@
{ ... <EXAMPLE> ... } ~%~@
:SEE-ALSO `uuid-unsigned-byte-size', `uuid-ub128', `uuid-ub64', `uuid-ub48',
`uuid-ub32', `uuid-ub16', `uuid-ub8'.~%")
(typedoc 'uuid-ub48
"An object of type: \(unsigned-byte 48\)~%~@
Octets: 6
Bits: 48
Hex value: #xFFFFFFFFFFFF
Decimal value: 281474976710655
Octal value: #o7777777777777777
:Binary value: #b111111111111111111111111111111111111111111111111~%~@
Capable of representing the integer value of slot `%uuid_node' of class
`unique-universal-identifier'.~%~@
An object of this type is capable of representing any integer value
of a slot of class `unique-universal-identifier'.~%~@
:EXAMPLE~%~@
{ ... <EXAMPLE> ... } ~%~@
:SEE-ALSO `uuid-unsigned-byte-size', `uuid-ub128', `uuid-ub64', `uuid-ub48',
`uuid-ub32', `uuid-ub16', `uuid-ub8'.~%")
(typedoc 'uuid-ub32
"An object of type: \(unsigned-byte 32\)~%~@
Octets: 4
Bits: 32
Hex value: #xFFFFFFFF
Decimal value: 4294967295
Octal value: #o37777777777
Binary value: #b11111111111111111111111111111111~%~@
Capable of representing the integer value of slot `%uuid_time-low' of class
`unique-universal-identifier'.~%~@
:EXAMPLE~%~@
{ ... <EXAMPLE> ... } ~%~@
:SEE-ALSO `uuid-unsigned-byte-size', `uuid-ub128', `uuid-ub64', `uuid-ub48',
`uuid-ub32', `uuid-ub16', `uuid-ub8'.~%")
(typedoc 'uuid-ub16
"An object of type: \(unsigned-byte 16\)~%~@
Octets: 2
Bits: 16
Hex value: #xFFFF
Decimal value: 65535
Octal value: #o177777
Binary value: #b1111111111111111~%~@
Capable of representing the integer value of slots `%uuid_time-mid' and
`%uuid_time-high-and-version' of class `unique-universal-identifier'.~%~@
:EXAMPLE~%~@
{ ... <EXAMPLE> ... } ~%~@
:SEE-ALSO `uuid-unsigned-byte-size', `uuid-ub128', `uuid-ub64', `uuid-ub48',
`uuid-ub32', `uuid-ub16', `uuid-ub8'.~%")
(typedoc 'uuid-ub8
"An object of type: \(unsigned-byte 8\)~%~@
Octets: 1
Bits: 8
Hex value: #xFF
Decimal value: 255
Octal value: #o377
Binary value: #b11111111~%~@
Capable of representing integer of any any element in an object of type
`uuid-byte-array' and the and the integer value of slots
`%uuid_clock-seq-and-reserved' `%uuid_clock-seq-low' of class
`unique-universal-identifier'.~%~@
:EXAMPLE~%~@
{ ... <EXAMPLE> ... } ~%~@
:SEE-ALSO `uuid-unsigned-byte-size', `uuid-ub128', `uuid-ub64', `uuid-ub48',
`uuid-ub32', `uuid-ub16', `uuid-ub8'.~%")
(typedoc 'uuid-string-36
"An object with the type signature: \(array character \(32\)\)
:EXAMPLE~%~@
{ ... <EXAMPLE> ... } ~%~@
:SEE-ALSO `uuid-byte-string', `uuid-byte-array-16', `uuid-string-32',
`uuid-string-36', `uuid-hex-string-32', `uuid-hex-string-36',
`uuid-hex-string-32-p', `uuid-hex-string-36-p',.~%")
(typedoc 'uuid-string-32
"An object with the type signature: \(array character \(36\)\)~%~@
:EXAMPLE~%~@
{ ... <EXAMPLE> ... } ~%~@
:SEE-ALSO `uuid-byte-string', `uuid-byte-array-16', `uuid-string-32',
`uuid-string-36', `uuid-hex-string-32', `uuid-hex-string-36',
`uuid-hex-string-32-p', `uuid-hex-string-36-p'.~%")
(typedoc 'uuid-hex-string-36
"An object of type \(array character \(36\)\) satsfying `uuid-hex-string-36-p'.~%~@
:EXAMPLE~%
(type ~%~@
\(typep \"6ba7b810-9dad-11d1-80b4-00c04fd430c8\" 'uuid-hex-string-36\)~%
\(typep \"6BA7B810-9DAD-11D1-80B4-00C04FD430C8\" 'uuid-hex-string-36-p\)~%~@
;; Following fails successfully:~%
\(typep \"6BA7B810--9DAD-11D1-80B4-00C04FD430C8\ 'uuid-hex-string-36-p\)~%~@
:SEE-ALSO `<XREF>'.~%")
(typedoc 'uuid-hex-string-32
"An object with the type signature:~%
\(array character \(32\)\)~%~@
And satisfies `mon:string-all-hex-char-p'.~%~@
:EXAMPLE~%
\(typep \(uuid-print-bytes nil *uuid-namespace-dns*\) 'uuid-hex-string-32\)~%
;; Following fails successfully:~%
\(typep \(print-object *uuid-namespace-dns* nil\) 'uuid-hex-string-32\)~%~@
:SEE-ALSO `<XREF>'.~%")
(typedoc 'uuid-byte-string
"An object of with type signature: \(simple-array character \(16\)\)~%~@
:EXAMPLE~%
\(typep \(uuid-get-bytes \(uuid-print-bytes nil *uuid-namespace-dns*\)\) 'uuid-byte-string\)~%~@
:SEE-ALSO `uuid-byte-array-16', `uuid-hex-string-36'.~%")
(typedoc 'uuid-bit-vector
"An object of type \(simple-bit-vector <LENGTH>\).
Objects of this type are capable of representing as bit-vectors the integer
values of slots of class `unique-universal-identifier'.~%~@
:EXAMPLE~%
\(typep \(uuid-bit-vector-128-zeroed\) 'uuid-bit-vector\)~%~@
:SEE-ALSO `uuid-bit-vector', `uuid-bit-vector-128', `uuid-bit-vector-48',
`uuid-bit-vector-32', `uuid-bit-vector-16', `uuid-bit-vector-8'.~%")
(typedoc 'uuid-bit-vector-128
"An object of type \(simple-bit-vector 128\) capable of representing all 128
bits of a `unique-universal-identifier'~%~@
Objects of this type have a length of type `uuid-bit-vector-128-length' and may
be used to represent the integer value of the combined slots of class
`unique-universal-identifier'.~%~@
:EXAMPLE~%
\(typep \(uuid-bit-vector-128-zeroed\) 'uuid-bit-vector-128\)~%~@
:SEE-ALSO `uuid-bit-vector', `uuid-bit-vector-128', `uuid-bit-vector-48',
`uuid-bit-vector-32', `uuid-bit-vector-16', `uuid-bit-vector-8'.~%")
(typedoc 'uuid-bit-vector-48
"An object of type \(simple-bit-vector 48\) capable of representing 48
bits of a `unique-universal-identifier'~%~@
Objects of this type have a length of type `uuid-bit-vector-48-length', and may
be used to represent the integer values of the slot `%uuid_node' of class
`unique-universal-identifier'.~%~@
:EXAMPLE~%
\(typep (subseq \(uuid-bit-vector-128-zeroed\) 0 48) 'uuid-bit-vector-48\)~%
\(typep \(uuid-bit-vector-128-zeroed\) 'uuid-bit-vector-128\)~%
:SEE-ALSO `uuid-bit-vector', `uuid-bit-vector-128', `uuid-bit-vector-48',
`uuid-bit-vector-32', `uuid-bit-vector-16', `uuid-bit-vector-8'.~%")
(typedoc 'uuid-bit-vector-32
"An object of type \(simple-bit-vector 32\) capable of representing 32
bits of a `unique-universal-identifier'~%~@
Objects of this type have a length of type `uuid-bit-vector-32-length', and may
be used to represent the integer values of the slot `%uuid_time-low' of class
`unique-universal-identifier'.~%~@
:EXAMPLE~%
\(typep (subseq \(uuid-bit-vector-128-zeroed\) 0 32) 'uuid-bit-vector-32\)~%
\(typep \(uuid-bit-vector-128-zeroed\) 'uuid-bit-vector-32\)~%~@
:SEE-ALSO `uuid-bit-vector', `uuid-bit-vector-128', `uuid-bit-vector-48',
`uuid-bit-vector-32', `uuid-bit-vector-16', `uuid-bit-vector-8'.~%")
(typedoc 'uuid-bit-vector-16
"An object of type \(simple-bit-vector 16\) capable of representing 16
bits of a `unique-universal-identifier'~%~@
Objects of this type have a length of type `uuid-bit-vector-16-length', and may
be used to represent the integer values of the slots `%uuid_time-mid' and
`%uuid_time-mid' of class `unique-universal-identifier'.~%~@
:EXAMPLE~%
\(typep (subseq \(uuid-bit-vector-128-zeroed\) 0 16) 'uuid-bit-vector-16\)~%
\(typep \(uuid-bit-vector-128-zeroed\) 'uuid-bit-vector-128\)~%~@
:SEE-ALSO `uuid-bit-vector', `uuid-bit-vector-128', `uuid-bit-vector-48',
`uuid-bit-vector-32', `uuid-bit-vector-16', `uuid-bit-vector-8'.~%")
(typedoc 'uuid-bit-vector-8
"An object of type \(simple-bit-vector 128\) capable of representing 8
bits of a `unique-universal-identifier'~%~@
Objects of this type have a length of type `uuid-bit-vector-8-length', and may
be used to represent an `uuid-ub8' value of any sub-sequence of bits in a
`uuid-bit-vector-128' and specifically those integer values of the slots
`%uuid_clock-seq-and-reserved' and `%uuid_clock-seq-low' of class
`unique-universal-identifier'.~%~@
:EXAMPLE~%
\(typep (subseq \(uuid-bit-vector-128-zeroed\) 0 8) 'uuid-bit-vector-8\)~%
\(typep \(uuid-bit-vector-128-zeroed\) 'uuid-bit-vector-128\)~%~@
:SEE-ALSO `uuid-bit-vector', `uuid-bit-vector-128', `uuid-bit-vector-48',
`uuid-bit-vector-32', `uuid-bit-vector-16', `uuid-bit-vector-8'.~%")
(typedoc 'uuid-bit-vector-length
"An object of type (integer <SIZE> <SIZE>).~%~@
:EXAMPLE~%
\(typep 16 '\(uuid-bit-vector-length 16\)\) => T~%
\(typep 17 '\(uuid-bit-vector-length 16\)\) => NIL~%~@
:SEE-ALSO `uuid-bit-vector-length', `uuid-bit-vector-128-length',
`uuid-bit-vector-48-length', `uuid-bit-vector-32-length',
`uuid-bit-vector-16-length', `uuid-bit-vector-8-length'.~%")
(typedoc 'uuid-bit-vector-128-length
"An object of type \(uuid-bit-vector-length 128\).~%~@
Objects of this type correspond with the length of a simple-bit-vector of type
`uuid-bit-vector-128' which are used to represent the integer value of the
combined slots of class `unique-universal-identifier'.~%~@
:EXAMPLE~%
\(typep 128 '\(uuid-bit-vector-128-length\)) => T~%
\(typep 127 '\(uuid-bit-vector-127-length\)\) => NIL~%~@
:SEE-ALSO `uuid-bit-vector-length', `uuid-bit-vector-128-length',
`uuid-bit-vector-48-length', `uuid-bit-vector-32-length',
`uuid-bit-vector-16-length', `uuid-bit-vector-8-length'.~%")
(typedoc 'uuid-bit-vector-48-length
"An object of type \(uuid-bit-vector-length 48\).~%~@
Objects of this type correspond with the length of a simple-bit-vector of type
`uuid-bit-vector-48' which are used to represent the integer values of the slot
`%uuid_node' of class `unique-universal-identifier'.~%~@
:EXAMPLE~%
\(typep 48 '\(uuid-bit-vector-48-length\)) => T~%
\(typep 47 '\(uuid-bit-vector-48-length\)\) => NIL~%~@
:SEE-ALSO `uuid-bit-vector-length', `uuid-bit-vector-128-length',
`uuid-bit-vector-48-length', `uuid-bit-vector-32-length',
`uuid-bit-vector-16-length', `uuid-bit-vector-8-length'.~%")
(typedoc 'uuid-bit-vector-32-length
"An object of type \(uuid-bit-vector-length 32\).~%~@
Objects of this type correspond with the length of a simple-bit-vector of type
`uuid-bit-vector-32' which are used to represent the integer values of the slot
`%uuid_time-low' of class `unique-universal-identifier'.~%~@
:EXAMPLE~%
\(typep 32 '\(uuid-bit-vector-32-length\)) => T~%
\(typep 31 '\(uuid-bit-vector-31-length\)\) => NIL~%~@
:SEE-ALSO `uuid-bit-vector-length', `uuid-bit-vector-128-length',
`uuid-bit-vector-48-length', `uuid-bit-vector-32-length',
`uuid-bit-vector-16-length', `uuid-bit-vector-8-length'.~%")
(typedoc 'uuid-bit-vector-16-length
"An object of type \(uuid-bit-vector-length 16\).~%~@
Objects of this type correspond with the length of a simple-bit-vector of type
`uuid-bit-vector-16' which are used to represent the integer values of the slots
`%uuid_time-mid' and `%uuid_time-high-and-version' of class
`unique-universal-identifier'.~%~@
:EXAMPLE~%
\(typep 16 '\(uuid-bit-vector-16-length\)) => T~%
\(typep 17 '\(uuid-bit-vector-16-length\)\) => NIL~%~@
:SEE-ALSO `uuid-bit-vector-length', `uuid-bit-vector-128-length',
`uuid-bit-vector-48-length', `uuid-bit-vector-32-length',
`uuid-bit-vector-16-length', `uuid-bit-vector-8-length'.~%")
(typedoc 'uuid-bit-vector-8-length
"An object of type \(uuid-bit-vector-length 8\).~%~@
Objects of this type correspond with the length of a simple-bit-vector of type
`uuid-bit-vector-8' which are used to represent the integer values of the slots
`%uuid_clock-seq-low' and `%uuid_clock-seq-and-reserved' of class
`unique-universal-identifier'.~%~@
:EXAMPLE~%
\(typep 8 '\(uuid-bit-vector-8-length\)) => T~%
\(typep 8 '\(uuid-bit-vector-8-length\)\) => NIL~%~@
:SEE-ALSO `uuid-bit-vector-length', `uuid-bit-vector-128-length',
`uuid-bit-vector-48-length', `uuid-bit-vector-32-length',
`uuid-bit-vector-16-length', `uuid-bit-vector-8-length'.~%")
(typedoc 'uuid-byte-array-16
"An object which has the type signature: \(simple-array \(unsigned-byte 8\) \(16\)\)~%~@
:EXAMPLE~%
\(typep \(uuid-to-byte-array *uuid-namespace-dns*\) 'uuid-byte-array-16\)~%~@
:SEE-ALSO `uuid-hex-string-36'.~%")
(typedoc 'uuid-byte-array-20
"An object which has the type signature: \(simple-array \(unsigned-byte 8\) \(20\)\)~%~@
:EXAMPLE~%
\(typep \(uuid-string-to-sha1-byte-array \"bubba\"\) 'uuid-byte-array-20\)~%~@
:SEE-ALSO `uuid-hex-string-36'.~%")
(typedoc 'uuid-byte-array-null
"An object of type `unicly:uuid-byte-array-16' with each element `cl:zerop'.~%~@
:EXAMPLE~%~@
\(typep \(uuid-byte-array-16-zeroed\) 'uuid-byte-array-null\)~%
\(typep \(make-array 16 :element-type 'uuid-ub8 :initial-element 0\) 'uuid-byte-array-null\)~%
\(not \(typep \(make-array 16 :element-type 'uuid-ub8 :initial-element 1\) 'uuid-byte-array-null\)\)~%
\(not \(typep \(uuid-bit-vector-128-zeroed\) 'uuid-byte-array-null\)\)~%
:SEE-ALSO `uuid-byte-array-16-zeroed', `uuid-byte-array-16-p'.~%")
(typedoc 'uuid-bit-vector-null
"An object of type `unicly:uuid-bit-vector-128' and satisfying
`unicly:uuid-bit-vector-eql'.~%~@
:EXAMPLE~%
\(typep \(uuid-bit-vector-128-zeroed\) 'uuid-bit-vector-null\)~%
\(typep \(make-array 128 :element-type 'bit :initial-element 1\) 'uuid-bit-vector-null\)~%
\(not \(typep \(uuid-byte-array-16-zeroed\) 'uuid-bit-vector-null\)\)~%~@
:SEE-ALSO `uuid-bit-vector-128', `uuid-bit-vector-128-zeroed',
`uuid-byte-array-16-zeroed', `uuid-byte-array-null'.~%")
(typedoc 'uuid-simple-vector-5
"Objects of this type are passed as the cl:nth-value 1 by funcitions which
frob objects of type `uuid-hex-string-36'.~%~@
:EXAMPLE~%~@
{ ... <EXAMPLE> ... } ~%~@
:SEE-ALSO `uuid-delimited-string-36-p', `uuid-hex-string-36-p',
`%uuid-hex-string-36-null-string-p',
`make-uuid-from-string-if', `make-uuid-from-string'.~%")
(typedoc 'uuid-hex-string-length
"A simple-array with element-type character of length STRING-LENGTH ~%~@
:EXAMPLE~%~@
\(typep \(svref #\(\"e3115c49\" \"6e13\" \"4d21\" \"9a37\" \"a1af250a8f88\"\) 4\) '\(uuid-hex-string-length 12\)\)~%~@
:SEE-ALSO `uuid-hex-string-length', `uuid-hex-string-12', `uuid-hex-string-8',
`uuid-hex-string-4', `uuid-hex-string-2'.~%")
(typedoc 'uuid-hex-string-12
"An object of type `uuid-hex-string-length' with length 12.~%~@
:EXAMPLE~%~@
\(typep \(svref #\(\"e3115c49\" \"6e13\" \"4d21\" \"9a37\" \"a1af250a8f88\"\) 4\) 'uuid-hex-string-12\)~%~@
:SEE-ALSO `uuid-hex-string-length', `uuid-hex-string-12', `uuid-hex-string-8',
`uuid-hex-string-4', `uuid-hex-string-2'.~%")
(typedoc 'uuid-hex-string-8
"An object of type `uuid-hex-string-length' with length 8. ~%~@
:EXAMPLE~%~@
\(typep \(svref #\(\"e3115c49\" \"6e13\" \"4d21\" \"9a37\" \"a1af250a8f88\"\) 0\) 'uuid-hex-string-8\)~%~@
:SEE-ALSO `uuid-hex-string-length', `uuid-hex-string-12', `uuid-hex-string-8',
`uuid-hex-string-4', `uuid-hex-string-2'.~%")
(typedoc 'uuid-hex-string-4
"An object of type `uuid-hex-string-length' with length 4.~%~@
:EXAMPLE~%~@
\(typep \(svref #\(\"e3115c49\" \"6e13\" \"4d21\" \"9a37\" \"a1af250a8f88\"\) 1\) 'uuid-hex-string-4\)~%~@
:SEE-ALSO `uuid-hex-string-length', `uuid-hex-string-12', `uuid-hex-string-8',
`uuid-hex-string-4', `uuid-hex-string-2'.~%")
(typedoc 'uuid-hex-string-2
"An object of type `uuid-hex-string-length' with length ~%~@
:EXAMPLE~%~@
\(typep \(subseq \(svref #\(\"e3115c49\" \"6e13\" \"4d21\" \"9a37\" \"a1af250a8f88\"\) 3\) 0 2\) 'uuid-hex-string-2\)~%~@
:SEE-ALSO `uuid-hex-string-length', `uuid-hex-string-12', `uuid-hex-string-8',
`uuid-hex-string-4', `uuid-hex-string-2'.~%")
(typedoc 'uuid-version-int
"An integer value in the range [0,5].~%~@
Range represents the possible return values for `unicly:uuid-version-uuid' when
an object is a UUID as per return value of:~%
`unicly:make-v3-uuid', `unicly:make-v4-uuid', `unicly:make-v5-uuid'~%~@
and exclusive of return value for `unicly:make-null-uuid'.~%~@
:EXAMPLE~%
\(loop
for x from 0 below 6
for y = \(typep x 'uuid-version-int\)
always y\)~%~@
:SEE-ALSO `unicly::uuid-v3-or-5-int', `unicly::uuid-v3-4-or-5-int', `unicly::uuid-version-bit-vector'.~%")
(typedoc 'uuid-v3-or-5-int
"An integer value either 3 or 5.~%~@
Range represents the possible return values for `unicly:uuid-version-uuid' when
an object is a UUID as per return value of:~%
`make-v3-uuid' `make-v5-uuid'~%~@
:EXAMPLE~%
\(equal \(subseq \(mapcar #'\(lambda \(x\) \(typep x 'uuid-v3-or-5-int\)\)
\(loop for x from 2 below 7 collect x\)\)
1 4\)
\(list T NIL T\)\)~%
\(equal \(mapcar #'\(lambda \(x\) \(typep \(uuid-version-uuid x\) 'uuid-v3-or-5-int\)\)
\(list \(make-v3-uuid *uuid-namespace-dns* \"bubba\"\)
\(make-v4-uuid\)
\(make-v5-uuid *uuid-namespace-dns* \"bubba\"\)\)\)
\(list T NIL T\)\)~%~@
:SEE-ALSO `unicly::uuid-version-int', `unicly::uuid-v3-4-or-5-int', `unicly::uuid-version-bit-vector'.~%")
(typedoc 'uuid-v3-4-or-5-int
"An integer value in the range [3,5].~%~@
Range represents the possible return values for `unicly:uuid-version-uuid' when
an object is a UUID as per return value of:~%
`make-v3-uuid' `make-v4-uuid' `make-v5-uuid'~%~@
:EXAMPLE~%
\(equal \(subseq \(mapcar #'\(lambda \(x\) \(typep x 'uuid-v3-4-or-5-int\)\)
\(loop for x from 2 below 7 collect x\)\)
1 4\)
\(list T T T\)\)~%~@
\(equal \(mapcar #'\(lambda \(x\) \(typep \(uuid-version-uuid x\) 'uuid-v3-4-or-5-int\)\)
\(list \(make-v3-uuid *uuid-namespace-dns* \"bubba\"\)
\(make-v4-uuid\)
\(make-v5-uuid *uuid-namespace-dns* \"bubba\"\)\)\)
\(list T T T\)\)~%~@
:SEE-ALSO `unicly::uuid-version-int', `unicly::uuid-v3-or-5-int', `unicly::uuid-version-bit-vector'.~%")
;;; ==============================
;;; :UUID-MACRO-DOCUMENTATION
;;; ==============================
;; For whaterver reason Clisp doesn't like evaluating fundoc for macros...
#-clisp
(progn
(fundoc 'def-uuid-type-definer
"Convenience macro for use by macros which define uuid sub-type specifiers.~%~@
Arg PARENT-TYPE is an unquoted symbol naming a uuid-type specifer which
accepts a positive integer value as an argument.~%~@
FORMAT-STRING is a format-string used to generate the symbol-name of the type to be defined.
The types defined with by expanders of this macro have an integer value as
part of theier symbol name, as such format-string should contain the
format-control flag \"~~D\" in an appropriate position.~%~@
LENGTH-ARG an positive integer value. It is used as the format-argument to
FORMAT-STRING and as the argument to its PARENT-TYPE.~%~@
:EXAMPLE~%
\(macroexpand-1 '\(def-uuid-type-definer uuid-bit-vector \"UUID-BIT-VECTOR-~~D\" 128\)\)~%~@
:SEE-ALSO `def-uuid-type-definer', `def-uuid-unsigned-byte-size',
`def-uuid-bit-vector-N-type', `def-uuid-bit-vector-length-type',
`def-uuid-unsigned-byte-integer-length',
`def-uuid-uuid-hex-string-length', `def-uuid-byte-array-length'.~%")
(fundoc 'def-uuid-unsigned-byte-size
"Convenience macro for defining subtypes of type `uuid-unsigned-byte-size'.~%~@
Arg SIZE-BYTES is an positive integer value indicating the size of an unsigned-byte.~%~@
:EXAMPLE~%
\(macroexpand-1 '\(def-uuid-unsigned-byte-size 128\)\)~%~@
:SEE-ALSO `def-uuid-type-definer', `def-uuid-unsigned-byte-size',
`def-uuid-bit-vector-N-type', `def-uuid-bit-vector-length-type',
`def-uuid-unsigned-byte-integer-length',
`def-uuid-uuid-hex-string-length', `def-uuid-byte-array-length'.~%")
(fundoc 'def-uuid-bit-vector-N-type
"Convenience macro for defining subtypes of type `uuid-bit-vector'.~%~@
Arg BV-LENGTH-TYPE is an positive integer value indicating the number of bits in a uuid-bit-vector.~%~@
:EXAMPLE~%
\(macroexpand-1 '\(def-uuid-bit-vector-N-type 16\)\)~%~@
:SEE-ALSO `def-uuid-type-definer', `def-uuid-unsigned-byte-size',
`def-uuid-bit-vector-N-type', `def-uuid-bit-vector-length-type',
`def-uuid-unsigned-byte-integer-length',
`def-uuid-uuid-hex-string-length', `def-uuid-byte-array-length'.~%")
(fundoc 'def-uuid-bit-vector-length-type
"Convenience macro for defining subtypes of type `uuid-bit-vector-length'.~%~@
Arg BV-LENGTH is an positive integer value indicating the length of a uuid-bit-vector.~%~@
:EXAMPLE~%
\(macroexpand-1 '\(def-uuid-bit-vector-length-type 16\)\)~%~@
:SEE-ALSO `def-uuid-type-definer', `def-uuid-unsigned-byte-size',
`def-uuid-bit-vector-N-type', `def-uuid-bit-vector-length-type',
`def-uuid-unsigned-byte-integer-length',
`def-uuid-uuid-hex-string-length', `def-uuid-byte-array-length'.~%")
(fundoc 'def-uuid-byte-array-length
"Convenience macro for defining subtypes of type `uuid-byte-array'.~%~@
BYTE-ARRAY-LENGTH is a positive integer indication the length of a simple-array with elements of type `uuid-ub8'.
:EXAMPLE~%~@
\(macroexpand-1 '\(def-uuid-byte-array-length 16\)\)~%~@
:SEE-ALSO `def-uuid-type-definer', `def-uuid-unsigned-byte-size',
`def-uuid-bit-vector-N-type', `def-uuid-bit-vector-length-type',
`def-uuid-unsigned-byte-integer-length',
`def-uuid-uuid-hex-string-length', `def-uuid-byte-array-length'.~%")
(fundoc 'def-uuid-unsigned-byte-integer-length
"Convenience macro for defining subtypes of type `uuid-unsigned-byte-integer-length'.~%~@
Arg UNSIGNED-LENGTH is an positive integer value indicating the
integer-length of the integer represetned at the upper-bounds of an
unsigned-byte.~%~@
:EXAMPLE~%
\(macroexpand-1 '\(def-uuid-unsigned-byte-integer-length 16\)\)~%~@
:SEE-ALSO `def-uuid-type-definer', `def-uuid-unsigned-byte-size',
`def-uuid-bit-vector-N-type', `def-uuid-bit-vector-length-type',
`def-uuid-unsigned-byte-integer-length',
`def-uuid-uuid-hex-string-length'.~%")
(fundoc 'def-uuid-uuid-hex-string-length
"Convenience macro for defining subtypes of type `uuid-hex-string-length'.~%~@
Arg HEX-STRING-LENGTH is an positive integer value indicating the length of a simple-array of characters.~%~@
:EXAMPLE~%
\(macroexpand-1 '\(def-uuid-uuid-hex-string-length 12\)\)~%~@
:SEE-ALSO `def-uuid-type-definer', `def-uuid-unsigned-byte-size',
`def-uuid-bit-vector-N-type', `def-uuid-bit-vector-length-type',
`def-uuid-unsigned-byte-integer-length',
`def-uuid-uuid-hex-string-length'.~%")
(fundoc 'def-indexed-hexstring-integer-parser
"Convenience macro for defining functions which `cl:parse-integer' of the
simple-array character elements returnd as nth-value 1 as an object of type
`uuid-simple-vector-5' by `uuid-hex-string-36-p'~%~@
FUN-NAME is a string used when generating a function-name to intern in the UNICLY package.
String should not be preceded/trailed by #\\- or whitespace.~%~@
Arg VEC-INDEX is an integer value of type (mod 5) indicating an index into the
return value of `uuid-hex-string-36-p'.~%~@
Arg STRING-TYPE-AT-INDEX is an unqouted symol naming a subtype of
`uuid-hex-string-length'. Valid types are:~%
`uuid-hex-string-8' `uuid-hex-string-4' `uuid-hex-string-12'~%~@
Arg STRING-START is a postivie integer indicating the lower bounds of the
hex-string located at VEC-INDEX.~%~@
Arg STRING-END is a postivie integer value indicating an upper bounds of the
hex-string located at VEC-INDEX.~%~@
STRING-INTEGER-TYPE Is an unquoted symbol naming an uuid unsigned-byte type to
declare for the value returned by `cl:parse-integer' of the string at
VEC-INDEX. Valid types are:~%
`uuid-ub32' `uuid-ub16' `uuid-ub8' `uuid-ub48'~%~@
Expands to a function defining form with the following format:~%
\(defun <FUN-NAME> \(hex-vector-5\)
\(declare \(uuid-simple-vector-5 hex-vector-5\)
\(optimize \(speed 3\)\)\)
\(uuid-string-parse-integer
\(uuid-svref-for-parse-integer HEX-VECTOR-5 <VEC-INDEX> <STRING-TYPE-AT-INDEX>\)
<STRING-START> <STRING-END> <STRING-INTEGER-TYPE> \)\)~%~@
:EXAMPLE~%
\(macroexpand-1 '\(def-indexed-hexstring-integer-parser
\"time-low\"
0
uuid-hex-string-8
0 8 uuid-ub32\)\)~%~@
:SEE-ALSO `uuid-hex-vector-parse-time-low', `uuid-hex-vector-parse-time-mid',
`uuid-hex-vector-parse-time-high-and-version',
`uuid-hex-vector-parse-clock-seq-and-reserved',
`uuid-hex-vector-parse-clock-seq-low', `uuid-hex-vector-parse-node'.~%")
(fundoc 'uuid-svref-for-parse-integer
"Convenience macro for declared references to STRING-TYPEs at INDEX of SIMPLE-VECTOR-5.~%~@
Wrapped by macros `def-indexed-hexstring-integer-parser' and `uuid-string-parse-integer'.~%~@
SIMPLE-VECTOR-5 is an object of type `uuid-simple-vector-5' as returned as the
`cl:nth-value' 1 of `uuid-hex-string-36-p'.~%~@
STRING-TYPE is a subtype of `uuid-hex-string-length' ~%~@
Arg STRING-TYPE is an unqouted symol naming the type of string at INDEX. It
should be a subtype of `uuid-hex-string-length'. Valid types are:~%
`uuid-hex-string-8' `uuid-hex-string-4' `uuid-hex-string-12'~%~@
:EXAMPLE~%
\(macroexpand-1 '\(uuid-svref-for-parse-integer
\(nth-value 1 \(uuid-hex-string-36-p \(uuid-princ-to-string \(make-v4-uuid\)\)\)\)
4 uuid-hex-string-12\)\)~%~@
:SEE-ALSO `<XREF>'.~%")
(fundoc 'uuid-string-parse-integer
"Helper macro for `make-uuid-from-string' to `cl:parse-integer' a hex-string.~%~@
Wraps macro `uuid-svref-for-parse-integer'.~%~@
Wrapped by macro `def-indexed-hexstring-integer-parser'.~%~@
Arg UUID-HEX-STRING is a `uuid-hex-string-36' or a subtype.~%~@
Arg START is a lower bounds indexing into UUID-HEX-STRING.~%~@
Arg END is an upper bounds indexing into UUID-HEX-STRING.~%~@
INTEGER-TYPE is an unquoted symbol naming the type of uuid-unsigned-byte-size to
declare for the value returned by `cl:parse-integer' of the hex-string at at
index bounded by START and END Valid types are:~%
`uuid-ub32' `uuid-ub16' `uuid-ub8' `uuid-ub48'~%~@
:EXAMPLE~%
\(macroexpand-1 '\(uuid-string-parse-integer \"6ba7b810-9dad-11d1-80b4-00c04fd430c8\" 0 8 uuid-ub32\)\)~%~@
\(let \(\(uuid-str \"6ba7b810-9dad-11d1-80b4-00c04fd430c8\"\)
\(parse-specs '\(\(0 8 uuid-ub32\)
\(9 13 uuid-ub16\)
\(14 18 uuid-ub16\)
\(19 21 uuid-ub8\)
\(21 23 uuid-ub8\)
\(24 36 uuid-ub48\)\)\)
\(gthr '\(\)\)\)
\(dolist \(m parse-specs \(setf gthr \(nreverse gthr\)\)\)
\(push \(apply #'uuid-string-parse-integer m\) gthr\)\)\)~%~@
:SEE-ALSO `make-uuid-from-string-if'.~%")
(fundoc '%def-uuid-format-and-intern-symbol-type-predicate
"Concatenate the string or symbol TYPE-SYMBOL-OR-STRING \"-P\" and intern it.
Expanded in macro `def-uuid-predicate-and-type-check-definer'.~%
:EXAMPLE~%~@
\(%def-uuid-format-and-intern-symbol-type-predicate 'FOO-BAR\) => FOO-BAR-P ; interned~%
:SEE-ALSO `%def-uuid-format-and-intern-symbol-type-predicate', `def-uuid-type-predicate-definer'.~%")
(fundoc '%def-uuid-format-and-intern-symbol-type-checker
"Concatenate the string or symbol TYPE-SYMBOL-OR-STRING \"-CHECK-TYPE\" and intern it.
Expanded in macro `def-uuid-predicate-and-type-check-definer'.~%
:EXAMPLE~%~@
\(%def-uuid-format-and-intern-symbol-type-checker 'FOO-BAR\) => FOO-BAR-CHECK-TYPE ; interned~%
:SEE-ALSO `%def-uuid-format-and-intern-symbol-type-predicate', `def-uuid-type-predicate-definer'.~%")
(fundoc 'def-uuid-type-predicate-definer
"Define a type predicate with PREDICATE-NAME for an existing TYPE-TO-CHECK.
:EXAMPLE~%~@
\(macroexpand-1 '\(def-uuid-type-predicate-definer PREDICATE-NAME TYPE-TO-CHECK\)\)
Expanded in macro `def-uuid-predicate-and-type-check-definer'.~%
:SEE-ALSO `def-uuid-type-predicate-definer'.~%")
(fundoc 'def-uuid-type-check-definer
"Define a type checking function with TYPE-CHECK-NAME declairing NAME-PREDICATE inline.
If TYPE-TO-CHECK doesn't satisfy the defined functions arg CHECKED-VAL, an error
of type `uuid-simple-type-error' is signaled.~%
Function definition has the form:~%~@
\(defun TYPE-CHECK-NAME \(checked-val\)
\(declare \(inline NAME-PREDICATE\) \(optimize \(speed 3\)\)\)
\(if \(NAME-PREDICATE checked-val\)
\(the boolean T\)
\(uuid-simple-type-error :datum checked-val :expected-type 'CHECKED-TYPE\)\)\)~%
Expanded in macro `def-uuid-predicate-and-type-check-definer'.~%
:SEE-ALSO `def-uuid-type-predicate-definer'.~%")
(fundoc 'def-uuid-predicate-and-type-check-definer
"Convenience macro for defining predicate and check-type functions for Unicly types.~%~@
TYPE-FOR-PRED-AND-CHECK is a token designating an existing type-specifier.
Its symbol-name is used to generate two symbol-names to use as function names when defining a
the predicate and check-type functions.
Generated predicate name has the form:~%~@
<TYPE-FOR-PRED-AND-CHECK>-P
Generated check-type name has the form:~%~@
<TYPE-FOR-PRED-AND-CHECK>-CHECK-TYPE
So given the type specifier UUID-BIT-VECTOR-8,
the following two functions would be defined:~%~@
`uuid-bit-vector-8-p' `uuid-bit-vector-8-check-type'~%~@
In the case, `uuid-bit-vector-8-check-type' is defined with a body which checks if
some value satisfies `uuid-bit-vector-8-p' and if not signals a condition of type
`uuid-simple-type-error' its body having the format:~%
\(unless \(uuid-bit-vector-8-p <SOME-VALUE>\)
\(uuid-simple-type-error :datum <SOME-VALUE>
:expected-type uuid-bit-vector-8\)\)~%~@
:EXAMPLE~%
\(macroexpand-1 '\(def-uuid-predicate-and-type-check-definer uuid-bit-vector-32\)\)~%~@
\(macroexpand-all '\(def-uuid-predicate-and-type-check-definer uuid-bit-vector-32\)\)~%~@
:NOTE The body of this macro expands into two addtional macros:~%
`def-uuid-type-predicate-definer'
`def-uuid-type-check-definer'~%~@
:SEE-ALSO `%def-uuid-format-and-intern-symbol-type-predicate',
`%def-uuid-format-and-intern-symbol-type-checker'.~%")
(fundoc 'def-uuid-request-integer-bit-vector
"Convenience macro for functions which extract slot values of class `unique-universal-identifier'.~%~@
:EXAMPLE~%
\(macroexpand-1 '\(def-uuid-request-integer-bit-vector \"time-low\" 0 32\)\)~%
\(macroexpand-1 '\(def-uuid-request-integer-bit-vector \"time-mid\" 32 16\)\)~%
\(macroexpand-1 '\(def-uuid-request-integer-bit-vector \"time-high-and-version\" 48 16\)\)~%
\(macroexpand-1 '\(def-uuid-request-integer-bit-vector \"clock-seq-and-reserved\" 64 8\)\)~%
\(macroexpand-1 '\(def-uuid-request-integer-bit-vector \"clock-seq-low\" 72 8\)\)~%
\(macroexpand-1 '\(def-uuid-request-integer-bit-vector \"node\" 80 48\)\)~%~@
:SEE-ALSO `%uuid_time-low-request-bit-vector', `%uuid_time-mid-request-bit-vector',
`%uuid_time-high-and-version-request-bit-vector',
`%uuid_clock-seq-and-reserved-request-bit-vector',
`%uuid_clock-seq-low-request-bit-vector', `%uuid_node-request-bit-vector'.~%")
) ;; close progn
;;; ==============================
;;; :UUID-TYPE-PREDICATE-DOCUMENTATION
;;; ==============================
(fundoc 'uuid-string-32-p
"Whether object is of type `uuid-string-32'.~%~@
:EXAMPLE~%~@
{ ... <EXAMPLE> ... } ~%~@
:SEE-ALSO `<XREF>'.~%")
(fundoc 'uuid-string-36-p
"Whether object is of type `uuid-string-36'.~%~@
:EXAMPLE~%~@
{ ... <EXAMPLE> ... } ~%~@
:SEE-ALSO `<XREF>'.~%")
(fundoc 'uuid-hex-string-32-p
"Whether object is of type `uuid-hex-string-32'.~%~@
Return T when object has the type signature:~%
\(array character \(32\)\)~%~@
and satisfies `mon:string-all-hex-char-p'.~%~@
:EXAMPLE~%
\(uuid-hex-string-32-p \(uuid-print-bytes nil *uuid-namespace-dns*\)\)~%
;; Following fails successfully:~%
\(uuid-hex-string-32-p \(print-object *uuid-namespace-dns* nil\)\)~%~@
:SEE-ALSO `uuid-hex-string-36', `uuid-hex-string-36-p'.~%")
(fundoc 'uuid-delimited-string-36-p
"Whether MAYBE-DELIM-STRING-36 is potentially of type `uuid-hex-string-36' or `uuid-hex-string-36-zeroed'~%~@
Return nil when MAYBE-DELIM-STRING-36 is not `uuid-string-36-p'.
Else, return as if by `cl:values':
cl:nth-value-0 is T
cl:nth-value-1 is an object of type \(simple-vector 5\)
each elt of vector is a simple-string generated by splitting
MAYBE-DELIM-STRING-36 at occurences of #\\-.
An object will satisfy `uuid-string-36-p' when following constraints are met:~%
- Its type is '(array character 36)
- When split to list of strings on the character delimter #\\- the list is of length is 5
- The length of each string in the list matches the pattern 8-4-4-4-12
- each string in the list satisfies is a hexadecimal character or #\\-~%~@
:EXAMPLE~%
\(uuid-delimited-string-36-p \(uuid-princ-to-string \(make-v4-uuid\)\)\)~%
\(uuid-delimited-string-36-p \(uuid-princ-to-string \(make-null-uuid\)\)\)~%
\(uuid-delimited-string-36-p \(make-string 36 :initial-element #\\-\)\)~%~@
:SEE-ALSO `<XREF>'.~%")
(fundoc 'uuid-hex-string-36-p
"Whether MAYBE-UUID-HEX-STRING-36 is a valid string representation of a UUID.~%~@
Return T when MAYBE-UUID-HEX-STRING-36 satisfies the following constraints:~%
- Its type is '\(array character 36\)~%
- When split to list of strings on #\\- delimter the list is of length is 5~%
- The length of each string in the list matches the pattern 8-4-4-4-12~%
- each string in the list satisfies `mon:string-all-hex-char-p'~%
:EXAMPLE~%
\(uuid-hex-string-36-p \"6ba7b810-9dad-11d1-80b4-00c04fd430c8\"\)~%
\(uuid-hex-string-36-p \"6BA7B810-9DAD-11D1-80B4-00C04FD430C8\"\)~%~@
;; Following fails successfully:~%
\(uuid-hex-string-36-p \"6BA7B810--9DAD-11D1-80B4-00C04FD430C8\"\)~%~@
:SEE-ALSO `uuid-hex-string-32-p', `uuid-hex-string-32',
`%uuid-hex-string-36-null-string-p' `mon:split-string-on-chars'.~%")
(fundoc '%uuid-hex-string-36-null-string-p
"Whether MAYBE-ALL-ZERO-OR-DASH-STRING-36 is of type `uuid-hex-string-36' every
character is `cl:char=' either #\\0 or #\\-.~%~@
:EXAMPLE~%
\(%uuid-hex-string-36-null-string-p \"00000000-0000-0000-0000-000000000000\"\)~%
\(%uuid-hex-string-36-null-string-p \"00000000-0000-0000-0000-000000000001\"\)~%~@
:SEE-ALSO `uuid-hex-string-36-p'.~%")
(fundoc 'uuid-byte-array-16-p
"Whether MAYBE-UUID-BYTE-ARRAY-16 is of type `uuid-byte-array-16'.~%~@
Return T when MAYBE-UUID-BYTE-ARRAY-16 has the type signature:~%
\(simple-array \(unsigned-byte 8\) \(16\)\)~%~@
:EXAMPLE~%
\(uuid-byte-array-16-p \(uuid-to-byte-array *uuid-namespace-dns*\)\)~%~@
:SEE-ALSO `uuid-hex-string-36', `uuid-hex-string-36-p'.~%")
(fundoc 'uuid-byte-array-20-p
"Whether MAYBE-UUID-BYTE-ARRAY-16 is of type `uuid-byte-array-20'.~%~@
Return T when MAYBE-UUID-BYTE-ARRAY-16 has the type signature:~%
\(simple-array \(unsigned-byte 8\) \(20\)\)~%~@
:EXAMPLE~%
\(uuid-byte-array-20-p \(uuid-string-to-sha1-byte-array \"bubba\"\)\)~%~@
:SEE-ALSO `uuid-hex-string-36', `uuid-hex-string-36-p'.~%")
(fundoc 'uuid-byte-string-p
"Whether object is of type `uuid-byte-string'.~%~@
Return T when object has the type signature:~%
\(simple-array character \(16\)\)~%~@
:EXAMPLE~%
\(uuid-byte-string-p \(uuid-get-bytes \(uuid-print-bytes nil *uuid-namespace-dns*\)\)\)~%~@
:SEE-ALSO `uuid-hex-string-36-p', `uuid-byte-array-16-p'.~%")
(fundoc 'uuid-bit-vector-v3-p
" <DOCSTR> ~%~@
:EXAMPLE~%~@
{ ... <EXAMPLE> ... } ~%~@
:SEE-ALSO `uuid-version-bit-vector', `uuid-bit-vector-v3-p',
`uuid-bit-vector-v4-p' `uuid-bit-vector-v5-p', `uuid-bit-vector-128',
`uuid-eql'.~%")
(fundoc 'uuid-bit-vector-v4-p
" <DOCSTR> ~%~@
:EXAMPLE~%~@
{ ... <EXAMPLE> ... } ~%~@
:SEE-ALSO `uuid-version-bit-vector', `uuid-bit-vector-v3-p',
`uuid-bit-vector-v4-p' `uuid-bit-vector-v5-p', `uuid-bit-vector-128',
`uuid-eql'.~%")
(fundoc 'uuid-bit-vector-v5-p
" <DOCSTR> ~%~@
:EXAMPLE~%~@
{ ... <EXAMPLE> ... } ~%~@
:SEE-ALSO `uuid-version-bit-vector', `uuid-bit-vector-v3-p',
`uuid-bit-vector-v4-p' `uuid-bit-vector-v5-p', `uuid-bit-vector-128',
`uuid-eql'.~%")
(fundoc 'uuid-bit-vector-null-p
"Whether BIT-VECTOR-MAYBE-NULL is of type `unicly:uuid-bit-vector-null'.~%~@
:EXAMPLE~%
\(uuid-bit-vector-null-p \(uuid-bit-vector-128-zeroed\)\)~%
\(uuid-bit-vector-null-p \(make-array 128 :element-type 'bit :initial-element 1\)\)~%
\(null \(uuid-bit-vector-null-p \(uuid-byte-array-16-zeroed\)\)\)~%~@
:SEE-ALSO `unicly:uuid-bit-vector-eql', `unicly:uuid-bit-vector-128-zeroed',
`unicly:uuid-bit-vector-128', `unicly:uuid-bit-vector-128-p'.~%")
(fundoc 'uuid-byte-array-null-p
"Whether object is of type `unicly:uuid-byte-array-null'.~%~@
:EXAMPLE~%~@
\(uuid-byte-array-null-p \(uuid-byte-array-16-zeroed\)\)~%
\(uuid-byte-array-null-p \(make-array 16 :element-type 'uuid-ub8 :initial-element 0\)\)~%
\(not \(uuid-byte-array-null-p \(make-array 16 :element-type 'uuid-ub8 :initial-element 1\)\)\)~%
\(not \(uuid-byte-array-null-p \(uuid-bit-vector-128-zeroed\)\)\)~%~@
:SEE-ALSO `uuid-byte-array-16-zeroed', `uuid-byte-array-16-p'.~%")
;;; ==============================
;;; UUID-FUNCTIONS-DOCUMENTATION
;;; ==============================
(fundoc 'uuid-version-bit-vector
"Return the version of uuid version of UUID-BIT-VECTOR.~%~@
UUID-BIT-VECTOR is on object of type `uuid-bit-vector-128'.~%~@
When object is the null uuid return as if by `cl:values':
0,null-uuid~%~@
If for some reason bit 48 of object is not `cl:zerop' an error is signaled.~%~@
:EXAMPLE~%
\(uuid-version-bit-vector \(uuid-to-bit-vector \(make-v4-uuid\)\)\)~%
\(uuid-version-bit-vector \(uuid-to-bit-vector
\(make-v5-uuid *uuid-namespace-dns* \"bubba\"\)\)\)~%
\(uuid-version-bit-vector \(uuid-to-bit-vector
\(make-v3-uuid *uuid-namespace-dns* \"bubba\"\)\)\)~%
\(uuid-version-bit-vector \(uuid-to-bit-vector \(make-null-uuid\)\)\)~%~@
;; Following successfully signals an error:~%
\(let \(\(bv-z \(uuid-bit-vector-128-zeroed\)\)\)
\(setf \(sbit bv-z 48\) 1\)
\(uuid-version-bit-vector bv-z\)\)~%~@
:SEE-ALSO `uuid-version-bit-vector', `uuid-bit-vector-v3-p',
`uuid-bit-vector-v4-p' `uuid-bit-vector-v5-p', `uuid-bit-vector-128',
`uuid-eql'.~%")
(fundoc '%verify-slot-boundp-and-type
"Check that VERIFY-UUID has all slots `cl:slot-boundp' and of the correct type.~%~@
Signal either a `cl:simple-condition' or `cl:type-error' error if not.~%~@
Helper function for `uuid-copy-uuid'.~%~@
:EXAMPLE~%~@
{ ... <EXAMPLE> ... } ~%~@
:SEE-ALSO `<XREF>'.~%")
(fundoc 'uuid-copy-uuid
"Copy slot-value's of UUID-INSTANCE to new instance and return new instance.~%~@
UUID-INSTANCE should satisfy `unique-universal-identifier-p', an error is
signaled if not.~%~@
:EXAMPLE~%
\(let* \(\(source *uuid-namespace-dns*\)
\(clone \(uuid-copy-uuid source\)\)\)
\(not \(or \(eq clone source\)
\(eql clone source\)
\(equal clone source\)
\(equalp clone source\)\)\)\)~%~@
:NOTE The base slot-values of an instance of `unique-universal-identifier' class
are constants and satisfy `cl:constantp':~%
\(constantp \(slot-value *uuid-namespace-dns* '%uuid_time-low\)\)~%~@
Therefor, the newly returned copy will not share mutable structure with
its source UUID-INSTANCE.~%~@
:NOTE Because there should only ever be one true instance of the null-uuid when
UUID-INSTANCE satisfies `unique-universal-identifier-null-p' the returned copy
of UUID-INSTANCE is an instance of class `unique-universal-identifier' not an
instance of class `unique-universal-identifier-null' and the returned copy does
not satisfy `unique-universal-identifier-null-p'. For example:~%
\(unique-universal-identifier-null-p \(make-null-uuid\)\)~%
\(unique-universal-identifier-null-p \(uuid-copy-uuid \(make-null-uuid\)\)\)~%
\(type-of \(uuid-copy-uuid \(make-null-uuid\)\)\)~%~@
:SEE-ALSO `<XREF>'.~%")
(fundoc 'uuid-bit-vector-128-zeroed
"Return a bit vector of 128 elements with all elements zeroed.~%~@
:EXAMPLE~%
\(uuid-bit-vector-128-zeroed\)~%
\(typep \(uuid-bit-vector-128-zeroed\) 'uuid-bit-vector-128\)~%~@
:SEE-ALSO `uuid-bit-vector-128', `uuid-deposit-octet-to-bit-vector',
`uuid-byte-array-to-bit-vector', `make-null-uuid'.~%")
(fundoc 'uuid-byte-array-16-zeroed
"Return an array of type `uuid-byte-array-16' with all elements zeroed.~%~@
:EXAMPLE~%~@
\(uuid-byte-array-16-zeroed\)~%
\(typep \(uuid-byte-array-16-zeroed\) 'uuid-byte-array-16\)~%
\(uuid-byte-array-16-p \(uuid-byte-array-16-zeroed\)\)~%~@
:SEE-ALSO `uuid-bit-vector-128-zeroed', `uuid-byte-array-16-p',
`uuid-byte-array-null-p', `uuid-byte-array-null'.~%")
(fundoc 'uuid-bit-vector-to-integer