-
Notifications
You must be signed in to change notification settings - Fork 140
/
opennurbs_compstat.h
881 lines (729 loc) · 21.4 KB
/
opennurbs_compstat.h
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
//
// Copyright (c) 1993-2022 Robert McNeel & Associates. All rights reserved.
// OpenNURBS, Rhinoceros, and Rhino3D are registered trademarks of Robert
// McNeel & Associates.
//
// THIS SOFTWARE IS PROVIDED "AS IS" WITHOUT EXPRESS OR IMPLIED WARRANTY.
// ALL IMPLIED WARRANTIES OF FITNESS FOR ANY PARTICULAR PURPOSE AND OF
// MERCHANTABILITY ARE HEREBY DISCLAIMED.
//
// For complete openNURBS copyright information see <http://www.opennurbs.org>.
//
////////////////////////////////////////////////////////////////
#if !defined(OPENNURBS_COMPSTAT_INC_)
#define OPENNURBS_COMPSTAT_INC_
//////////////////////////////////////////////////////////////////////////
//
// ON_ComponentState and ON_ComponentStatus
//
#pragma region RH_C_SHARED_ENUM [ON_ComponentState] [Rhino.Geometry.ComponentState] [internal:byte]
///<summary><para>Provides a set of values describing component state.</para>
///<para>This is not a bit field.</para>
///<para>Some of these values are mutually exclusive and should not be combined.</para></summary>
enum class ON_ComponentState : unsigned char
{
///<summary>Not a valid status.</summary>
Unset = 0,
///<summary>This is a default component state.</summary>
Clear = 1,
///<summary>This is a default component state, but not selected.</summary>
NotSelected = 2,
///<summary>This component is selected.</summary>
Selected = 3,
///<summary>This component is selected persistently.</summary>
SelectedPersistent = 4,
///<summary>This is a default component state, but not highlighted.</summary>
NotHighlighted = 5,
///<summary>This component is highlighted.</summary>
Highlighted = 6,
///<summary>This is a default component state, but not hidden.</summary>
NotHidden = 7,
///<summary>This component is hidden.</summary>
Hidden = 8,
///<summary>This is a default component state, but not locked.</summary>
NotLocked = 9,
///<summary>This component is locked.</summary>
Locked = 10,
///<summary>This is a default component state, but not damaged.</summary>
NotDamaged = 11,
///<summary>This component is damaged.</summary>
Damaged = 12,
///<summary>This component is not deleted.</summary>
NotDeleted = 13,
///<summary>This component is deleted.</summary>
Deleted = 14,
///<summary>This runtime mark is clear.</summary>
RuntimeMarkClear = 15,
///<summary>This runtime mark is set.</summary>
RuntimeMarkSet = 16
};
#pragma endregion
ON_DECL
ON_ComponentState ON_ComponentStateFromUnsigned(
unsigned int state_as_unsigned
);
class ON_CLASS ON_ComponentStatus
{
public:
static const ON_ComponentStatus NoneSet;
static const ON_ComponentStatus Selected;
static const ON_ComponentStatus SelectedPersistent;
static const ON_ComponentStatus Highlighted;
static const ON_ComponentStatus Hidden;
static const ON_ComponentStatus Locked;
static const ON_ComponentStatus Deleted;
static const ON_ComponentStatus Damaged;
static const ON_ComponentStatus Marked;
/*
The six bits for SelectedPersistent, Highlighted, Hidden, Locked, and Damaged are set.
The two bits for Deleted and RuntimeMark are clear.
*/
static const ON_ComponentStatus AllSet;
/*
Returns:
A logical and of the status bit in lhs and rhs.
*/
static const ON_ComponentStatus LogicalAnd(ON_ComponentStatus lhs, ON_ComponentStatus rhs);
/*
Returns:
A logical and of the status bit in lhs and rhs.
*/
static const ON_ComponentStatus LogicalOr(ON_ComponentStatus lhs, ON_ComponentStatus rhs);
/*
Description:
A tool for adding a status check filter. This tool pays attention to RuntimeMark().
Parameters:
candidate - [in]
pass_bits - [in]
fail_bits - [in]
Returns:
Checking is performed in the following order and every bit, include the RuntimeMark() bit, are tested.
First:
If ON_ComponentStatus::LogicalAnd(candidate,status_pass) has any set bits,
then true is returned.
Second:
If ON_ComponentStatus::LogicalAnd(candidate,status_fail) has any set bits,
then false is returned.
Third:
If status_fail has no set bits the true is returned.
Forth:
If status_pass has any set bits then false is returned.
Fifth:
True is returned.
Examples:
StatusCheck(candidate,ON_ComponentStatus::Selected,ON_ComponentStatus::NoneSet) = candidate.>IsSelected().
StatusCheck(candidate,ON_ComponentStatus::NoneSet,ON_ComponentStatus::Selected) = !candidate.>IsSelected().
StatusCheck(candidate,ON_ComponentStatus::NoneSet,ON_ComponentStatus::NoneSet) = true;
StatusCheck(candidate,ON_ComponentStatus::AllSet,ON_ComponentStatus::NoneSet) = true;
StatusCheck(candidate,ON_ComponentStatus::NoneSet,ON_ComponentStatus::AllSet) = candidate.IsClear() && false==candidate.RuntimeMark();
*/
static bool StatusCheck(
ON_ComponentStatus candidate,
ON_ComponentStatus status_pass,
ON_ComponentStatus status_fail
);
ON_ComponentStatus() = default;
~ON_ComponentStatus() = default;
ON_ComponentStatus(const ON_ComponentStatus&) = default;
ON_ComponentStatus& operator=(const ON_ComponentStatus&) = default;
/*
Description:
Constructs a status with the specified state set.
*/
ON_ComponentStatus(
ON_ComponentState state
);
bool operator==(ON_ComponentStatus);
bool operator!=(ON_ComponentStatus);
/*
Returns:
True if every setting besides runtime mark is 0 or false.
Ignores the runtime mark state.
Remarks:
The runtime mark setting is ignored by IsClear().
*/
bool IsClear() const;
/*
Returns:
True if some setting besides runtime mark is 1 or true.
Ignores the runtime mark state.
Remarks:
The runtime mark setting is ignored by IsNotClear().
*/
bool IsNotClear() const;
/*
Description:
Sets *this = status_to_copy and returns 1 if a state setting changed.
Returns:
1 if status changed.
0 if status did not change.
Remarks:
The runtime mark setting cannot be changed using SetStatus().
*/
unsigned int SetStatus(
ON_ComponentStatus status_to_copy
);
/*
Description:
If a state is set in states_to_set, the same state is set in "this".
Parameters:
states_to_set - [in]
Returns:
1 if status changed.
0 if status did not change.
Remarks:
The runtime mark setting cannot be changed using SetStates().
*/
unsigned int SetStates(
ON_ComponentStatus states_to_set
);
/*
Description:
If a state is set in states_to_clear, the same state is cleared in "this".
Parameters:
states_to_clear - [in]
Returns:
1 if status changed.
0 if status did not change.
Remarks:
The runtime mark setting cannot be changed using ClearStates().
*/
unsigned int ClearStates(
ON_ComponentStatus states_to_clear
);
//////////////////////////////////////////////////////////////////////////
//
// RuntimeMark
//
bool RuntimeMark() const;
/*
Returns:
Input value of RuntimeMark();
*/
bool SetRuntimeMark(
bool bRuntimeMark
);
/*
Returns:
Input value of RuntimeMark();
*/
bool SetRuntimeMark();
/*
Returns:
Input value of RuntimeMark();
*/
bool ClearRuntimeMark();
ON__UINT8 MarkBits() const;
ON__UINT8 SetMarkBits(ON__UINT8 bits);
/*
Returns:
(0==mark_bits) ? RuntimeMark() : (mark_bits == MarkBits()
*/
bool IsMarked(
ON__UINT8 mark_bits
) const;
//////////////////////////////////////////////////////////////////////////
//
// Selection
//
/*
Returns:
ON_ComponentState::not_selected,
ON_ComponentState::Selected or
ON_ComponentState::Selected_pesistent.
*/
ON_ComponentState SelectedState() const;
/*
Returns:
1 if status changed.
0 if status did not change.
*/
unsigned int SetSelectedState(
bool bSelectedState,
bool bPersistent,
bool bSynchronizeHighlight
);
unsigned int SetSelectedState(
ON_ComponentState selected_state,
bool bSynchronizeHighlight
);
/*
Returns:
false
The selection state is ON_ComponentState::not_selected.
true
The selection state is ON_ComponentState::Selected
or ON_ComponentState::Selected_pesistent.
*/
bool IsSelected() const;
/*
Returns:
false
The selection state is ON_ComponentState::not_selected.
true
The selection state is ON_ComponentState::Selected_pesistent.
*/
bool IsSelectedPersistent() const;
//////////////////////////////////////////////////////////////////////////
//
// Highlighted
//
/*
Returns:
1 if status changed.
0 if status did not change.
*/
unsigned int SetHighlightedState(
bool bIsHighlighed
);
/*
Returns:
false if not highlighted.
true otherwise.
*/
bool IsHighlighted() const;
//////////////////////////////////////////////////////////////////////////
//
// Hidden
//
/*
Returns:
1 if status changed.
0 if status did not change.
*/
unsigned int SetHiddenState(
bool bIsHidden
);
/*
Returns:
false if not hidden.
true otherwise.
(ON_ComponentStatus::HIDDEN_STATE::not_hidden != HiddenState())
*/
bool IsHidden() const;
//////////////////////////////////////////////////////////////////////////
//
// Locked
//
/*
Returns:
1 if status changed.
0 if status did not change.
*/
unsigned int SetLockedState(
bool bIsLocked
);
/*
Returns:
false if not locked.
true otherwise.
(ON_ComponentStatus::LOCKED_STATE::not_locked != LockedState())
*/
bool IsLocked() const;
//////////////////////////////////////////////////////////////////////////
//
// Deleted
//
/*
Returns:
1 if status changed.
0 if status did not change.
*/
unsigned int SetDeletedState(
bool bIsDeleted
);
/*
Returns:
false if not hidden.
true otherwise.
(ON_ComponentStatus::DELETED_STATE::not_deleted != DeletedState())
*/
bool IsDeleted() const;
//////////////////////////////////////////////////////////////////////////
//
// Damaged
//
/*
Returns:
1 if status changed.
0 if status did not change.
*/
unsigned int SetDamagedState(
bool bIsDamaged
);
/*
Returns:
false if not damaged.
true otherwise.
(ON_ComponentStatus::DAMAGED_STATE::not_damaged != DamagedState())
*/
bool IsDamaged() const;
//////////////////////////////////////////////////////////////////////////
//
// Checking multiple state values efficiently
//
bool operator==(const ON_ComponentStatus&) const;
bool operator!=(const ON_ComponentStatus&) const;
/*
Parameters:
states_filter - [in]
If no states are specified, then false is returned.
comparand - [in]
If a state is set in states_filter, the corresponding state
in "this" and comparand will be tested.
Returns:
True if every tested state in "this" and comparand are identical.
Remarks:
For the purposes of this test, ON_ComponentState::Selected
and ON_ComponentState::SelectedPersistent are considered equal.
*/
bool AllEqualStates(
ON_ComponentStatus states_filter,
ON_ComponentStatus comparand
) const;
/*
Parameters:
states_filter - [in]
If no states are specified, then false is returned.
comparand - [in]
If a state is set in states_filter, the corresponding state
in "this" and comparand will be tested.
Returns:
True if at least one tested state in "this" and comparand are identical.
Remarks:
For the purposes of this test, ON_ComponentState::Selected
and ON_ComponentState::SelectedPersistent are considered equal.
*/
bool SomeEqualStates(
ON_ComponentStatus states_filter,
ON_ComponentStatus comparand
) const;
/*
Parameters:
states_filter - [in]
If no states are specified, then false is returned.
comparand - [in]
If a state is set in states_filter, the corresponding state
in "this" and comparand will be tested.
Returns:
True if every tested state in "this" and comparand are different.
Remarks:
For the purposes of this test, ON_ComponentState::Selected
and ON_ComponentState::SelectedPersistent are considered equal.
*/
bool NoEqualStates(
ON_ComponentStatus states_filter,
ON_ComponentStatus comparand
) const;
private:
friend class ON_AggregateComponentStatus;
// NOTE:
// Hidden, Selected, ..., Mark() bool values are saved
// as single bits on m_status_flags.
unsigned char m_status_flags = 0U;
// extra bits for advanced marking
// no rules for use and runtime only - never saved in 3dm archives
// NOTE: Mark() and MarkBits() are independent.
// bool Mark() is a bit on m_status_flags.
// ON__UINT8 MarkBits() returns m_mark_bits.
ON__UINT8 m_mark_bits = 0U;
};
//////////////////////////////////////////////////////////////////////////
//
// ON_AggregateComponentStatus
//
//
/*
ON_AggregateComponentStatus is obsolete.
It exists because the virtual interface on ON_Object and the member on ON_Brep
cannot be changed without breakky the pubic C++ SDK.
Whenever possible, use ON_AggregateComponentStatusEx.
*/
class ON_CLASS ON_AggregateComponentStatus
{
public:
static const ON_AggregateComponentStatus Empty;
static const ON_AggregateComponentStatus NotCurrent;
ON_AggregateComponentStatus() = default;
~ON_AggregateComponentStatus() = default;
ON_AggregateComponentStatus(const ON_AggregateComponentStatus&) = default;
ON_AggregateComponentStatus& operator=(const ON_AggregateComponentStatus&) = default;
ON_AggregateComponentStatus(const class ON_AggregateComponentStatusEx&);
ON_AggregateComponentStatus& operator=(const class ON_AggregateComponentStatusEx&);
/*
Description:
Sets all states to clear.
Marks status as current.
Does not change component count
Returns
true if successful.
false if information is not current and ClearAllStates() failed.
*/
bool ClearAllStates();
/*
Description:
Sets all states specified by states_to_clear to clear.
Does not change current mark.
Does not change component count.
Returns
true if successful.
false if information is not current and ClearAggregateStatus() failed.
*/
bool ClearAggregateStatus(
ON_ComponentStatus states_to_clear
);
/*
Description:
Add the status information in component_status to this aggregate status.
Parameters:
component_status - [in]
Returns:
true if successful.
false if information is not current and Add failed.
*/
bool Add(
ON_ComponentStatus component_status
);
/*
Description:
Add the status information in aggregate_status to this aggregate status.
Parameters:
aggregate_status - [in]
Returns:
true if successful.
false if information is not current and Add failed.
*/
bool Add(
const ON_AggregateComponentStatus& aggregate_status
);
/*
Returns:
true if this is empty
false if not empty.
*/
bool IsEmpty() const;
/*
Returns:
true if the information is current (valid, up to date, ...).
false if the information is not current.
Remarks:
If the information is not current, all counts are zero and states are clear.
*/
bool IsCurrent() const;
/*
Description:
Mark the information as not current.
Erases all information.
*/
void MarkAsNotCurrent();
ON_ComponentStatus AggregateStatus() const;
unsigned int ComponentCount() const;
/*
Returns:
Number of components that are selected or persistently selected.
*/
unsigned int SelectedCount() const;
/*
Returns:
Number of components that are persistently selected.
*/
unsigned int SelectedPersistentCount() const;
unsigned int HighlightedCount() const;
unsigned int HiddenCount() const;
unsigned int LockedCount() const;
unsigned int DamagedCount() const;
private:
// a bitwise or of all component status settings
ON_ComponentStatus m_aggregate_status = ON_ComponentStatus::NoneSet;
private:
unsigned char m_current = 0; // 0 = empty, 1 = current, 2 = dirty
private:
unsigned char m_reserved1 = 0;
private:
// number of components
unsigned int m_component_count = 0;
// number of selected components (includes persistent and non persistent)
unsigned int m_selected_count = 0;
// number of selected components
unsigned int m_selected_persistent_count = 0;
// number of highlighted components
unsigned int m_highlighted_count = 0;
// number of hidden components
unsigned int m_hidden_count = 0;
// number of locked components
unsigned int m_locked_count = 0;
// number of damaged components
unsigned int m_damaged_count = 0;
};
class ON_CLASS ON_AggregateComponentStatusEx : private ON_AggregateComponentStatus
{
public:
static const ON_AggregateComponentStatusEx Empty;
static const ON_AggregateComponentStatusEx NotCurrent;
ON_AggregateComponentStatusEx() = default;
~ON_AggregateComponentStatusEx() = default;
ON_AggregateComponentStatusEx(const ON_AggregateComponentStatusEx&) = default;
ON_AggregateComponentStatusEx& operator=(const ON_AggregateComponentStatusEx&) = default;
ON_AggregateComponentStatusEx(const ON_AggregateComponentStatus&);
ON_AggregateComponentStatusEx& operator=(const ON_AggregateComponentStatus&);
/*
Returns:
A runtime serial number that is incremented every time a component status setting
changes, even when the actual counts may be unknown.
If the returned value is 0, status information is unknown.
*/
ON__UINT64 ComponentStatusSerialNumber() const;
/*
Description:
Sets all states to clear.
Marks status as current.
Does not change component count
Returns
true if successful.
false if information is not current and ClearAllStates() failed.
*/
bool ClearAllStates();
/*
Description:
Sets all states specified by states_to_clear to clear.
Does not change current mark.
Does not change component count.
Returns
true if successful.
false if information is not current and ClearAggregateStatus() failed.
*/
bool ClearAggregateStatus(
ON_ComponentStatus states_to_clear
);
/*
Description:
Add the status information in component_status to this aggregate status.
Parameters:
component_status - [in]
Returns:
true if successful.
false if information is not current and Add failed.
*/
bool Add(
ON_ComponentStatus component_status
);
/*
Description:
Add the status information in aggregate_status to this aggregate status.
Parameters:
aggregate_status - [in]
Returns:
true if successful.
false if information is not current and Add failed.
*/
bool Add(
const ON_AggregateComponentStatus& aggregate_status
);
/*
Returns:
true if this is empty
false if not empty.
*/
bool IsEmpty() const;
/*
Returns:
true if the information is current (valid, up to date, ...).
false if the information is not current.
Remarks:
If the information is not current, all counts are zero and states are clear.
*/
bool IsCurrent() const;
/*
Description:
Mark the information as not current.
Erases all information.
*/
void MarkAsNotCurrent();
ON_ComponentStatus AggregateStatus() const;
unsigned int ComponentCount() const;
/*
Returns:
Number of components that are selected or persistently selected.
*/
unsigned int SelectedCount() const;
/*
Returns:
Number of components that are persistently selected.
*/
unsigned int SelectedPersistentCount() const;
unsigned int HighlightedCount() const;
unsigned int HiddenCount() const;
unsigned int LockedCount() const;
unsigned int DamagedCount() const;
private:
// Whenever component status changes, m_runtime_serial_number is changed by calling Internal_ChangeStatusSerialNumber().
void Internal_ChangeStatusSerialNumber();
ON__UINT64 m_component_status_serial_number = 0;
};
//////////////////////////////////////////////////////////////////////////
//
// ON_UniqueTester
//
class ON_CLASS ON_UniqueTester
{
public:
ON_UniqueTester() = default;
~ON_UniqueTester();
ON_UniqueTester(const ON_UniqueTester&);
ON_UniqueTester& operator=(const ON_UniqueTester&);
public:
/*
Description:
If p is not in the list, it is added.
Returns:
True if p is in the list.
*/
bool InList(ON__UINT_PTR x) const;
/*
Description:
If p is not in the list, it is added.
Returns:
True if p is not in the list and was added. False if p was already in the list.
*/
bool AddToList(ON__UINT_PTR x);
void ClearList();
unsigned int Count() const;
public:
/*
Description:
Add x to the list. The expert caller is certain that x is not already in the list.
For large lists, using this function when appropriate, can result in substantial
speed improvements.
Parameters:
x - [in]
A value that is known to not be in the list.
*/
void ExpertAddNewToList(ON__UINT_PTR x);
private:
class Block
{
public:
static Block* NewBlock();
static void DeleteBlock(Block*);
public:
enum : size_t {BlockCapacity=1000};
size_t m_count = 0;
ON__UINT_PTR* m_a = nullptr;
class Block* m_next = nullptr;
bool InBlock(size_t sorted_count,ON__UINT_PTR p) const;
void SortBlock();
private:
static int Compare(ON__UINT_PTR* lhs, ON__UINT_PTR* rhs);
Block() = default;
~Block() = delete;
Block(const Block&) = delete;
Block& operator=(const Block&) = delete;
};
size_t m_sorted_count = 0;
Block* m_block_list = nullptr;
private:
void Internal_CopyFrom(const ON_UniqueTester& src);
void Internal_Destroy();
void Internal_AddValue(ON__UINT_PTR x);
};
#endif