Subversion Repository Public Repository

Divide-Dependencies

This repository has no backups
This repository's network speed is throttled to 100KB/sec

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
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions
// are met:
//  * Redistributions of source code must retain the above copyright
//    notice, this list of conditions and the following disclaimer.
//  * Redistributions in binary form must reproduce the above copyright
//    notice, this list of conditions and the following disclaimer in the
//    documentation and/or other materials provided with the distribution.
//  * Neither the name of NVIDIA CORPORATION nor the names of its
//    contributors may be used to endorse or promote products derived
//    from this software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY
// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
// PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE COPYRIGHT OWNER OR
// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
// OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
// Copyright (c) 2008-2018 NVIDIA Corporation. All rights reserved.
 
#ifndef NV_PARAMETERIZED_H
#define NV_PARAMETERIZED_H

/**
 * APEX uses a framework called NvParameterized for storing asset and actor data. 
 * NvParameterized classes provide reflection on every parameter they include making it 
 * effective for serialization and auto-generation of user interfaces for tools.<br>
 *
 * NvParameterized stores data in C++ classes which are auto-generated from their 
 * descriptions written in a special domain specific language (DSL). Description files 
 * contain information on internal layout and various high-level metadata of corresponding 
 * classes and their members. All generated classes implement special interface for 
 * run time reflection and modification of data.
 * */

/*!
\file
\brief NvParameterized classes
*/

#include "foundation/PxVec2.h"
#include "foundation/PxVec3.h"
#include "foundation/PxVec4.h"
#include "foundation/PxQuat.h"
#include "foundation/PxBounds3.h"
#include "foundation/PxMat44.h"
#include <stdio.h>
#include <stdarg.h>
#include <new> // for placement new

PX_PUSH_PACK_DEFAULT

//! \brief NvParameterized namespace
namespace NvParameterized
{

class Interface;
class Traits;

/**
\brief Various errors that may be returned from NvParameterized calls
*/
enum ErrorType
{
   ERROR_NONE = 0,
   ERROR_TYPE_NOT_SUPPORTED,
   ERROR_INDEX_OUT_OF_RANGE,
   ERROR_INVALID_PARAMETER_NAME,
   ERROR_INVALID_PARAMETER_HANDLE,
   ERROR_CAST_FAILED,
   ERROR_INVALID_ENUM_VAL,
   ERROR_SYNTAX_ERROR_IN_NAME,
   ERROR_IS_LEAF_NODE,
   ERROR_RESULT_BUFFER_OVERFLOW,
   ERROR_NAME_DOES_NOT_MATCH_DEFINITION,
   ERROR_NOT_AN_ARRAY,
   ERROR_ARRAY_SIZE_IS_FIXED,
   ERROR_ARRAY_RESIZING_IS_NOT_SUPPORTED,
   ERROR_ARRAY_IS_TOO_SMALL,
   ERROR_INVALID_ARRAY_DIMENSION,
   ERROR_INVALID_ARRAY_SIZE,
   ERROR_PARAMETER_HANDLE_DOES_NOT_MATCH_CLASS,
   ERROR_MEMORY_ALLOCATION_FAILURE,
   ERROR_INVALID_REFERENCE_INCLUDE_HINT,
   ERROR_INVALID_REFERENCE_VALUE,
   ERROR_PARAMETER_HANDLE_NOT_INITIALIZED,
   ERROR_PARAMETER_DEFINITIONS_DO_NOT_MATCH,
   ERROR_HANDLE_MISSING_INTERFACE_POINTER,
   ERROR_HANDLE_INVALID_INTERFACE_POINTER,
   ERROR_INVALID_CALL_ON_NAMED_REFERENCE,
   ERROR_NOT_IMPLEMENTED,
   ERROR_OBJECT_CONSTRUCTION_FAILED,
   ERROR_MODIFY_CONST_HANDLE
};

/**
\brief These types are supported in NvParameterized schemas
\warning Do not change values of enums!
*/    
enum DataType
{
    TYPE_UNDEFINED = 0,

    /**
    \brief Array type, size may be static or dynamic
    \see Definition::arraySizeIsFixed(), Handle::resizeArray(), Handle::getArraySize()
    */
    TYPE_ARRAY = 1,

    TYPE_STRUCT = 2,

    TYPE_BOOL = 3,
    /**
    \brief String type, represented by a const char pointer
    \see Handle::getParamString(), Handle::setParamString()
    */
    TYPE_STRING = 4,

    /**
    \brief Enum type, represented by a const char pointer
    \see Definition::numEnumVals(), Definition::enumVal(), Handle::getParamEnum(), Handle::setParamEnum()
    */
    TYPE_ENUM = 5,

    /**
    \brief Reference type, may be a named or included reference

    References are intended to be used in instances where a class needs either a 
    named reference (an emitter asset references an IOFX and IOS asset), or an 
    included reference (a destructible asset that serializes an APEX render mesh).
    References may also used to create a unions within a class.  Each reference will
    contain one or more variants to allow for unions.
        
    \see Handle::initParamRef(), Definition::numRefVariants(), Definition::refVariantVal(), Handle::initParamRef(), Handle::getParamRef(), Handle::setParamRef()
    */
    TYPE_REF = 6,

    TYPE_I8 = 7,
    TYPE_I16 = 8,
    TYPE_I32 = 9,
    TYPE_I64 = 10,

    TYPE_U8 = 11,
    TYPE_U16 = 12,
    TYPE_U32 = 13,
    TYPE_U64 = 14,

    TYPE_F32 = 15,
    TYPE_F64 = 16,

    TYPE_VEC2 = 17,
    TYPE_VEC3 = 18,
    TYPE_VEC4 = 19,
    TYPE_QUAT = 20,
    TYPE_MAT33 = 21,
    TYPE_BOUNDS3 = 23,
    TYPE_MAT44 = 24,

    TYPE_POINTER = 25,

    TYPE_TRANSFORM = 26,

	TYPE_MAT34 = 27,

    TYPE_LAST
};

/**
\brief Provides hints about the parameter definition

\see Definition
*/
class Hint
{
    public:

    /**
    \brief Destructor
    */
    virtual ~Hint() {}
    /**
    \brief Returns the name of the hint
    */
    virtual const char *    name(void) const = 0;

    /**
    \brief Returns the type of the hint
    */    
    virtual DataType         type(void) const = 0;

    /**
    \brief Returns the unsigned 64-bit value of the hint
    \note Undefined results if the type != TYPE_U64
    */
    virtual    uint64_t             asUInt(void) const = 0;
    
    /**
    \brief Returns the 64-bit floating point value of the hint
    \note Undefined results if the type != TYPE_FU64
    */    
    virtual double             asFloat(void) const = 0;

    /**
    \brief Returns the const character pointer for hint
    \note Undefined results if the type != TYPE_STRING
    */
    virtual const char *    asString(void) const = 0;

    /**
    \brief Set the value if the hint is a 64bit unsigned type
    */
	virtual bool setAsUInt(uint64_t v) = 0;

    private:
};

/**
\brief Provides information about a parameter
*/
class Definition
{
public:

    /**
    \brief Destructor
    */
    virtual ~Definition() {}

    /**
    \brief Destroys the Definition object and all nested dynamic objects contained within
    */
    virtual void destroy() = 0;

    /**
    \brief Returns the number of hints in the parameter Definition
    */
    virtual int32_t                             numHints(void) const = 0;

    /**
    \brief Returns the Hint located at the index
    \returns NULL if index >= Hint::numHints()
    */
    virtual const Hint *                    hint(int32_t index) const = 0;

    /**
    \brief Returns the Hint that matches the input name
    \returns NULL if name does not match any of the Definition's hints
    */
    virtual const Hint *                    hint(const char *name) const = 0;

	/**
	\brief Store parameter hints
	\warning Only for internal use
	*/
    virtual void                            setHints(const Hint **hints, int32_t n) = 0;

	/**
	\brief Add parameter hint
	\warning Only for internal use
	*/
	virtual void                            addHint(Hint *hint) = 0;
    
    /**
    \brief Returns this Definition's parent Definition
    \returns NULL if at the top level
    */
    virtual const Definition *    parent(void) const = 0;

    /**
    \brief Returns this Definition's top most ancestor
    */
    virtual const Definition *    root(void) const = 0;

    /**
    \brief Returns the name of the parameter 
    */
    virtual const char *                    name(void) const = 0;

    /**
    \brief Returns the long name of the parameter 
    If the parameter is a member of a struct or an array the long name will contain these
    parent names
    */
    virtual const char *                    longName(void) const = 0;

    /**
    \brief Returns the name of parameter's struct type
	\returns NULL if not struct
    */
    virtual const char *                    structName(void) const = 0;

	/**
    \brief Returns the parameter type
    */
    virtual DataType                        type(void) const = 0;

	/**
	\brief Return the parameter type in string form
	*/
	virtual const char*						typeString() const = 0;

    /**
    \brief Returns the number of variants this parameter could be
    A reference is sometimes a union of different types, each different type is referred to as 
    a "variant". Variants can be used in either included or named references.
    */
    virtual    int32_t                             numRefVariants(void) const = 0;

    /**
    \brief Given the ref variant name, get its val index
    \returns -1 if input ref_val is not found
    */
    virtual    int32_t                             refVariantValIndex( const char * ref_val ) const = 0;

    /**
    \brief Get the string value of the reference variant
    */
    virtual    const char *                     refVariantVal(int32_t index) const = 0;

    /**
    \brief Returns the number of enums for the parameter
    */
    virtual int32_t                             numEnumVals(void) const = 0;

    /**
    \brief Given the enum string, get the enum val index
    \returns -1 if input enum_val is not found
    */
    virtual    int32_t                             enumValIndex( const char * enum_val ) const = 0;

    /**
    \brief Returns the Enum string located at the index
    \returns NULL if index >= Hint::numEnumVals()
    */
    virtual const char *                    enumVal(int32_t index) const = 0;

	/**
	\brief Store possible enum values for TYPE_ENUM parameter
	\warning Only for internal use
	*/
    virtual void                             setEnumVals(const char **enum_vals, int32_t n) = 0;

	/**
	\brief Add new enum value to a list of possible enum values for TYPE_ENUM parameter
	\warning Only for internal use
	*/
    virtual void                             addEnumVal(const char *enum_val) = 0;

    /**
    \brief Returns custom alignment if parameter uses it; otherwise returns 0
    */
    virtual uint32_t alignment(void) const = 0;

    /**
    \brief Returns custom padding if parameter uses it; otherwise returns 0
    */
    virtual uint32_t padding(void) const = 0;

	/**
    \brief Returns the number of dimensions of a static array
    */
    virtual int32_t arrayDimension(void) const = 0;

    /**
    \brief Returns the array size of a static array
    \returns 0 for dynamic arrays
    */
    virtual int32_t arraySize(int32_t dimension = 0) const = 0;

    /**
    \brief Used to determine if an array is static or dynamic
    */
    virtual bool arraySizeIsFixed(void) const = 0;

	/**
	\brief Set size of static array
	\warning Only for internal use
	*/
    virtual bool setArraySize(int32_t size) = 0; // -1 if the size is not fixed

	/**
	\brief Used to determine if parameter is aggregate (TYPE_STRUCT or TYPE_ARRAY) or not.
	*/
    virtual bool isLeaf(void) const = 0;
    
    /**
    \brief Used to determine if reference is included or not.
    */
    virtual bool isIncludedRef(void) const = 0;

    /**
    \brief Returns the number of children (for a struct or static array)
    */
    virtual int32_t numChildren(void) const = 0;

	/**
	\brief Access definition of i-th child parameter.
	*/
    virtual const Definition *child(int32_t index) const = 0;

	/**
	\brief Access definition of child parameter with given name
	\warning Only used with TYPE_STRUCT
	*/
    virtual const Definition *child(const char *name, int32_t &index) const = 0;

	/**
	\brief Store definitions of child parameters
	\warning Only for internal use
	*/
	virtual void setChildren(Definition **children, int32_t n) = 0;

	/**
	\brief Add definition of one morechild parameter
	\warning Only for internal use
	*/
    virtual void addChild(Definition *child) = 0;

    /**
    \brief Set indices of child handles which must be released when downsizing array
    */
    virtual void setDynamicHandleIndicesMap(const uint8_t *indices, uint32_t numIndices) = 0;

    /**
    \brief Get indices of child handles which must be released when downsizing array
    */
    virtual const uint8_t * getDynamicHandleIndicesMap(uint32_t &outNumIndices) const = 0;

    /**
    \brief Used to determine whether type is not an aggregate (array, ref or struct)
    \param [in] simpleStructs structure of simple types is also considered simple
    \param [in] simpleStrings strings are considered simple
    */
    virtual bool isSimpleType(bool simpleStructs = true, bool simpleStrings = true) const = 0;
};

/**
\brief Provides access to individual parameters within the NvParameterized object
*/
class Handle
{
public:

    enum { MAX_DEPTH = 16 };

    /**
    \brief The constructor takes a pointer (if the user requires an instance before the ::NvParameterized::Interface exists)
    */
    PX_INLINE Handle(::NvParameterized::Interface *iface);

    /**
    \brief The constructor takes a reference
    */
    PX_INLINE Handle(::NvParameterized::Interface &iface);

    /**
    \brief The constructor takes a const interface
    \note Handles which are constructed from const objects are not allowed to modify them.
    */
    PX_INLINE Handle(const ::NvParameterized::Interface &iface);

    /**
    \brief Copy constructor
    */
    PX_INLINE Handle(const Handle &param_handle);

    /**
    \brief This constructor allows the user to create a handle that initially points at a particular parameter in the instance
    */
    PX_INLINE Handle(::NvParameterized::Interface &instance, const char *longName);

    /**
    \brief This constructor allows the user to create a handle that initially points at a particular parameter in the instance
    \note Handles which are constructed from const objects are not allowed to modify them.
    */
    PX_INLINE Handle(const ::NvParameterized::Interface &instance, const char *longName);

	/**
    \brief Get the parameter Definition for the handle's parameter
    */
    PX_INLINE const Definition *parameterDefinition(void) const { return(mParameterDefinition); }
    
    /**
    \brief Get the depth of the handle within the NvParameterized object
    */
    PX_INLINE int32_t numIndexes(void) const { return(mNumIndexes); }

    /**
    \brief Get the index at the specified depth within the NvParameterized object
    */
    PX_INLINE int32_t index(int32_t i) const { return(mIndexList[i]); }

    /**
    \brief Reduce the handle's depth within the NvParameterized object
    */
    PX_INLINE int32_t popIndex(int32_t levels = 1);

	/**
     \brief Set the Handle so it references a parameter in the specified instance with the name child_long_name
    */
    PX_INLINE ErrorType set(const ::NvParameterized::Interface *instance, const Definition *root, const char *child_long_name);

	/**
    \brief Set the Handle so it references a parameter in the specified instance with the name child_long_name
    */
   	PX_INLINE ErrorType set(const ::NvParameterized::Interface *instance, const char *child_long_name);
    
    /**
    \brief Get the parameter specified by longName and set the Handle to point it
    Given a long name like "mystruct.somearray[10].foo", it will return
    a handle to that specific parameter.  The handle can then be used to
    set/get values, as long as it's a handle to a leaf node.
    \note this method will not work if an included reference's child is included in the longName
    */
    PX_INLINE ErrorType getParameter(const char *longName);

    /**
    \brief Set the depth of the handle within the handle's parameter

    The set method is useful for accessing indices within an array of parameters or members
    within a struct.
    */
    PX_INLINE ErrorType set(int32_t child_index);

    /**
    \brief Get a child handle of this handle
    Sets handle to point to a child of this handle, with child_long_name being
    relative to the current long name.
    */
    PX_INLINE ErrorType getChildHandle(const ::NvParameterized::Interface *instance, const char *child_long_name, Handle &outHandle);

	/**
    \brief Get a child handle of this handle
    Sets handle to point to a direct child of this handle.  Works with structs and arrays.
    */
    PX_INLINE ErrorType getChildHandle(int32_t index, Handle &outHandle);

    /**
    \brief Returns the long name of the parameter, with indexes into str.
    \returns false if the long name didn't fit in str.
    */
    PX_INLINE bool getLongName(char *str, uint32_t max_str_len) const;

    /**
    \brief Reset all of the state data for the handle
    */
    PX_INLINE void reset();

	/**
	\brief Does handle correspond to an existing Interface?
	*/
    PX_INLINE bool isConst(void) const { return(mIsConst); }

	/**
	\brief Does handle correspond to a valid parameter?
	*/
    PX_INLINE bool isValid(void) const { return(mIsValid); }

	/**
	\brief Same as isValid
	*/
    PX_INLINE operator bool() const { return(isValid()); }

	/**
	\brief Return user data stored in handle
	*/
    PX_INLINE const void *userData(void) const { return(mUserData); }

	/**
	\brief Return user data stored in handle
	*/
    PX_INLINE void *userData(void) { return(mUserData); }

	/**
	\brief Store user data in handle
	*/
    PX_INLINE void setUserData(void *user_data) { mUserData = user_data; }

	/**
	\brief Get associated NvParameterized object
	\note Will return NULL in case of const handle (use getConstInterface instead)
	*/
	PX_INLINE ::NvParameterized::Interface * getInterface(void) const { return mIsConst ? 0 : mInterface; }

	/**
	\brief Get associated NvParameterized object
	*/
    PX_INLINE const ::NvParameterized::Interface * getConstInterface(void) const { return mInterface; }

	/**
	\brief Set associated NvParameterized object
	*/
    PX_INLINE void setInterface(::NvParameterized::Interface *iface) { mIsConst = false; mInterface = iface; }

	/**
	\brief Set associated NvParameterized object
	*/
	PX_INLINE void setInterface(const ::NvParameterized::Interface *iface) { mIsConst = true; mInterface = (::NvParameterized::Interface *)iface; }

    /**
    \brief Initialize a Reference parameter

    \param [in] chosenRefStr This string must be one of the strings returned from 
    Definition::refVariantVal()

	\param [in] doDestroyOld Sets whether the previous object should be destroyed or not

    \see Interface::initParamRef(), Definition::numRefVariants(), Definition::refVariantVal()
    */
    PX_INLINE ErrorType initParamRef(const char *chosenRefStr = 0, bool doDestroyOld = false);

    /**
    \brief Store this Handle's parameter to a string
    \param [in] buf this buffer is used to store any strings that need to be constructed
    \param [in] bufSize size of buf
    \param [out] ret this contains a pointer to the value as a string, it may or may not 
    be equal to buf, depending if the value had to be constructed dynamically or if it already exists as a static string
    */
    PX_INLINE ErrorType valueToStr(char *buf, uint32_t bufSize, const char *&ret);
    
    /**
    \brief Store the string to this Handle's parameter
    \returns ERROR_TYPE_NOT_SUPPORTED if the Handle's parameter type is an array, struct, or reference
    \returns ERROR_NONE if the Handle's parameter type is a simple type (u32, i32, vec3, etc)
    */
    PX_INLINE ErrorType strToValue(const char *str, const char **endptr);

    /**
    \brief Resize the array that the Handle points to
    */
    ErrorType resizeArray(int32_t new_size);

	/**
    \brief Get the array size for the given array dimension
	*/
    PX_INLINE ErrorType getArraySize(int32_t &size, int32_t dimension = 0) const;

	/**
	\brief Swap two elements of an array
	*/
    PX_INLINE ErrorType swapArrayElements(uint32_t firstElement, uint32_t secondElement);

    // These functions wrap the raw(Get|Set)XXXXX() methods.  They deal with
    // error handling and casting.
	
	/**
	\brief Get param
	*/
    PX_INLINE ErrorType getParamBool(bool &val) const ;

	/**
	\brief Set param
	*/
    PX_INLINE ErrorType setParamBool(bool val) ;

	/**
	\brief Get param
	*/
    PX_INLINE ErrorType getParamBoolArray(bool *array, int32_t n, int32_t offset = 0) const ;

	/**
	\brief Set param
	*/
    PX_INLINE ErrorType setParamBoolArray(const bool *array, int32_t n, int32_t offset = 0) ;

	/**
	\brief Get param
	*/
    PX_INLINE ErrorType getParamString(const char *&val) const ;

	/**
	\brief Set param
	*/
    PX_INLINE ErrorType setParamString(const char *val) ;

	/**
	\brief Get param
	*/
    PX_INLINE ErrorType getParamStringArray(char **array, int32_t n, int32_t offset = 0) const ;

	/**
	\brief Set param
	*/
    PX_INLINE ErrorType setParamStringArray(const char **array, int32_t n, int32_t offset = 0) ;

	/**
	\brief Get param
	*/
    PX_INLINE ErrorType getParamEnum(const char *&val) const ;

	/**
	\brief Set param
	*/
    PX_INLINE ErrorType setParamEnum(const char *val) ;

	/**
	\brief Get param
	*/
    PX_INLINE ErrorType getParamEnumArray(char **array, int32_t n, int32_t offset = 0) const ;

	/**
	\brief Set param
	*/
    PX_INLINE ErrorType setParamEnumArray(const char **array, int32_t n, int32_t offset = 0) ;

	/**
	\see Interface::getParamRef()
	*/
    PX_INLINE ErrorType getParamRef(::NvParameterized::Interface *&val) const ;

	/**
	\see Interface::getParamRefArray()
	*/
    PX_INLINE ErrorType getParamRefArray(::NvParameterized::Interface **array, int32_t n, int32_t offset = 0) const ;

	/**
	\see Interface::setParamRef()
	*/
    PX_INLINE ErrorType setParamRef(::NvParameterized::Interface * val, bool doDestroyOld = false) ;

	/**
	\see Interface::setParamRefArray()
	*/
    PX_INLINE ErrorType setParamRefArray(::NvParameterized::Interface **array, int32_t n, int32_t offset = 0, bool doDestroyOld = false) ;

	/**
	\brief Get param
	*/
    PX_INLINE ErrorType getParamI8(int8_t &val) const ;

	/**
	\brief Set param
	*/
    PX_INLINE ErrorType setParamI8(int8_t val) ;

	/**
	\brief Get param
	*/
    PX_INLINE ErrorType getParamI8Array(int8_t *array, int32_t n, int32_t offset = 0) const ;

	/**
	\brief Set param
	*/
    PX_INLINE ErrorType setParamI8Array(const int8_t *val, int32_t n, int32_t offset = 0) ;

	/**
	\brief Get param
	*/
    PX_INLINE ErrorType getParamI16(int16_t &val) const ;

	/**
	\brief Set param
	*/
    PX_INLINE ErrorType setParamI16(int16_t val) ;

	/**
	\brief Get param
	*/
    PX_INLINE ErrorType getParamI16Array(int16_t *array, int32_t n, int32_t offset = 0) const ;

	/**
	\brief Set param
	*/
    PX_INLINE ErrorType setParamI16Array(const int16_t *val, int32_t n, int32_t offset = 0) ;

	/**
	\brief Get param
	*/
    PX_INLINE ErrorType getParamI32(int32_t &val) const ;

	/**
	\brief Set param
	*/
    PX_INLINE ErrorType setParamI32(int32_t val) ;

	/**
	\brief Get param
	*/
    PX_INLINE ErrorType getParamI32Array(int32_t *array, int32_t n, int32_t offset = 0) const ;

	/**
	\brief Set param
	*/
    PX_INLINE ErrorType setParamI32Array(const int32_t *val, int32_t n, int32_t offset = 0) ;

	/**
	\brief Get param
	*/
    PX_INLINE ErrorType getParamI64(int64_t &val) const ;

	/**
	\brief Set param
	*/
    PX_INLINE ErrorType setParamI64(int64_t val) ;

	/**
	\brief Get param
	*/
    PX_INLINE ErrorType getParamI64Array(int64_t *array, int32_t n, int32_t offset = 0) const ;

	/**
	\brief Set param
	*/
    PX_INLINE ErrorType setParamI64Array(const int64_t *val, int32_t n, int32_t offset = 0) ;

	/**
	\brief Get param
	*/
    PX_INLINE ErrorType getParamU8(uint8_t &val) const ;

	/**
	\brief Set param
	*/
    PX_INLINE ErrorType setParamU8(uint8_t val) ;
	
	/**
	\brief Get param
	*/
    PX_INLINE ErrorType getParamU8Array(uint8_t *array, int32_t n, int32_t offset = 0) const ;

	/**
	\brief Set param
	*/
    PX_INLINE ErrorType setParamU8Array(const uint8_t *val, int32_t n, int32_t offset = 0) ;

	/**
	\brief Get param
	*/
    PX_INLINE ErrorType getParamU16(uint16_t &val) const ;

	/**
	\brief Set param
	*/
    PX_INLINE ErrorType setParamU16(uint16_t val) ;

	/**
	\brief Get param
	*/
    PX_INLINE ErrorType getParamU16Array(uint16_t *array, int32_t n, int32_t offset = 0) const ;

	/**
	\brief Set param
	*/
    PX_INLINE ErrorType setParamU16Array(const uint16_t *array, int32_t n, int32_t offset = 0) ;

	/**
	\brief Get param
	*/
    PX_INLINE ErrorType getParamU32(uint32_t &val) const ;

	/**
	\brief Set param
	*/
    PX_INLINE ErrorType setParamU32(uint32_t val) ;

	/**
	\brief Get param
	*/
    PX_INLINE ErrorType getParamU32Array(uint32_t *array, int32_t n, int32_t offset = 0) const ;

	/**
	\brief Set param
	*/
    PX_INLINE ErrorType setParamU32Array(const uint32_t *array, int32_t n, int32_t offset = 0) ;

	/**
	\brief Get param
	*/
    PX_INLINE ErrorType getParamU64(uint64_t &val) const ;

	/**
	\brief Set param
	*/
    PX_INLINE ErrorType setParamU64(uint64_t val) ;

	/**
	\brief Get param
	*/
    PX_INLINE ErrorType getParamU64Array(uint64_t *array, int32_t n, int32_t offset = 0) const ;

	/**
	\brief Set param
	*/
    PX_INLINE ErrorType setParamU64Array(const uint64_t *array, int32_t n, int32_t offset = 0) ;

	/**
	\brief Get param
	*/
    PX_INLINE ErrorType getParamF32(float &val) const ;

	/**
	\brief Set param
	*/
    PX_INLINE ErrorType setParamF32(float val) ;

	/**
	\brief Get param
	*/
    PX_INLINE ErrorType getParamF32Array(float *array, int32_t n, int32_t offset = 0) const ;

	/**
	\brief Set param
	*/
    PX_INLINE ErrorType setParamF32Array(const float *array, int32_t n, int32_t offset = 0) ;

	/**
	\brief Get param
	*/
    PX_INLINE ErrorType getParamF64(double &val) const ;

	/**
	\brief Set param
	*/
    PX_INLINE ErrorType setParamF64(double val) ;

	/**
	\brief Get param
	*/
    PX_INLINE ErrorType getParamF64Array(double *array, int32_t n, int32_t offset = 0) const ;

	/**
	\brief Set param
	*/
    PX_INLINE ErrorType setParamF64Array(const double *array, int32_t n, int32_t offset = 0) ;

	/**
	\brief Set param
	*/
    PX_INLINE ErrorType setParamVec2(const physx::PxVec2 &val) ;

	/**
	\brief Get param
	*/
    PX_INLINE ErrorType getParamVec2(physx::PxVec2 &val) const ;

	/**
	\brief Get param
	*/
    PX_INLINE ErrorType getParamVec2Array(physx::PxVec2 *array, int32_t n, int32_t offset = 0) const ;

	/**
	\brief Set param
	*/
    PX_INLINE ErrorType setParamVec2Array(const physx::PxVec2 *array, int32_t n, int32_t offset = 0) ;

	/**
	\brief Get param
	*/
    PX_INLINE ErrorType setParamVec3(const physx::PxVec3 &val) ;

	/**
	\brief Set param
	*/
    PX_INLINE ErrorType getParamVec3(physx::PxVec3 &val) const ;

	/**
	\brief Get param
	*/
    PX_INLINE ErrorType getParamVec3Array(physx::PxVec3 *array, int32_t n, int32_t offset = 0) const ;

	/**
	\brief Set param
	*/
    PX_INLINE ErrorType setParamVec3Array(const physx::PxVec3 *array, int32_t n, int32_t offset = 0) ;

	/**
	\brief Get param
	*/
    PX_INLINE ErrorType setParamVec4(const physx::PxVec4 &val) ;

	/**
	\brief Set param
	*/
    PX_INLINE ErrorType getParamVec4(physx::PxVec4 &val) const ;

	/**
	\brief Get param
	*/
    PX_INLINE ErrorType getParamVec4Array(physx::PxVec4 *array, int32_t n, int32_t offset = 0) const ;

	/**
	\brief Set param
	*/
    PX_INLINE ErrorType setParamVec4Array(const physx::PxVec4 *array, int32_t n, int32_t offset = 0) ;

	/**
	\brief Get param
	*/
    PX_INLINE ErrorType setParamQuat(const physx::PxQuat &val) ;

	/**
	\brief Set param
	*/
    PX_INLINE ErrorType getParamQuat(physx::PxQuat &val) const ;

	/**
	\brief Get param
	*/
    PX_INLINE ErrorType getParamQuatArray(physx::PxQuat *array, int32_t n, int32_t offset = 0) const ;

	/**
	\brief Set param
	*/
    PX_INLINE ErrorType setParamQuatArray(const physx::PxQuat *array, int32_t n, int32_t offset = 0) ;

	/**
	\brief Get param
	*/
    PX_INLINE ErrorType setParamMat33(const physx::PxMat33 &val) ;

	/**
	\brief Set param
	*/
    PX_INLINE ErrorType getParamMat33(physx::PxMat33 &val) const ;

	/**
	\brief Get param
	*/
    PX_INLINE ErrorType getParamMat33Array(physx::PxMat33 *array, int32_t n, int32_t offset = 0) const ;

	/**
	\brief Set param
	*/
    PX_INLINE ErrorType setParamMat33Array(const physx::PxMat33 *array, int32_t n, int32_t offset = 0) ;

	/**
	\brief Set param
	*/
    PX_INLINE ErrorType setParamMat44(const physx::PxMat44 &val) ;

	/**
	\brief Get param
	*/
    PX_INLINE ErrorType getParamMat44(physx::PxMat44 &val) const ;
    
	/**
	\brief Get param
	*/
	PX_INLINE ErrorType getParamMat44Array(physx::PxMat44 *array, int32_t n, int32_t offset = 0) const ;

	/**
	\brief Set param
	*/
    PX_INLINE ErrorType setParamMat44Array(const physx::PxMat44 *array, int32_t n, int32_t offset = 0) ;

	/**
	\brief Set param
	*/
    PX_INLINE ErrorType setParamMat34Legacy(const float (&val)[12]) ;

	/**
	\brief Get param
	*/
    PX_INLINE ErrorType getParamMat34Legacy(float (&val)[12]) const ;
    
	/**
	\brief Get param
	*/
	PX_INLINE ErrorType getParamMat34LegacyArray(float* array, int32_t n, int32_t offset = 0) const ;

	/**
	\brief Set param
	*/
    PX_INLINE ErrorType setParamMat34LegacyArray(const float *array, int32_t n, int32_t offset = 0) ;

	/**
	\brief Set param
	*/
    PX_INLINE ErrorType setParamBounds3(const physx::PxBounds3 &val) ;

	/**
	\brief Get param
	*/
    PX_INLINE ErrorType getParamBounds3(physx::PxBounds3 &val) const ;

	/**
	\brief Get param
	*/
    PX_INLINE ErrorType getParamBounds3Array(physx::PxBounds3 *array, int32_t n, int32_t offset = 0) const ;

	/**
	\brief Set param
	*/
    PX_INLINE ErrorType setParamBounds3Array(const physx::PxBounds3 *array, int32_t n, int32_t offset = 0) ;

		/**
	\brief Set param
	*/
    PX_INLINE ErrorType setParamTransform(const physx::PxTransform &val) ;

	/**
	\brief Get param
	*/
    PX_INLINE ErrorType getParamTransform(physx::PxTransform &val) const ;
    
	/**
	\brief Get param
	*/
	PX_INLINE ErrorType getParamTransformArray(physx::PxTransform *array, int32_t n, int32_t offset = 0) const ;

	/**
	\brief Set param
	*/
    PX_INLINE ErrorType setParamTransformArray(const physx::PxTransform *array, int32_t n, int32_t offset = 0) ;


	/// Template version of setParamXxx
    template <typename T> PX_INLINE ErrorType setParam(const T &val);

	/// Template version of getParamXxx
    template <typename T> PX_INLINE ErrorType getParam(T &val) const;

	/// Template version of getParamXxxArray
    template <typename T> PX_INLINE ErrorType getParamArray(T *array, int32_t n, int32_t offset = 0) const;

	/// Template version of setParamXxxArray
    template <typename T> PX_INLINE ErrorType setParamArray(const T *array, int32_t n, int32_t offset = 0);

private:

    PX_INLINE void pushIndex(int32_t index);

    bool mIsValid, mIsConst;
    int32_t mNumIndexes;
    int32_t mIndexList[MAX_DEPTH];
    const Definition *mParameterDefinition;
    void *mUserData;
    ::NvParameterized::Interface    *mInterface;
};

/// A callback class for notification just prior to serialization
class SerializationCallback
{
public:
    virtual ~SerializationCallback() {}
	/// Callback method
    virtual void preSerialize(void* userData = NULL) = 0;
};


/**
\brief Represents the interface to the NvParameterized object
*/
class Interface
{
    friend class Handle;
public:

    /**
    \brief Destructor
    */
    virtual ~Interface() {}

    /**
    \brief Destroys the NvParameterized object and all nested dynamic objects contained within
    */
    virtual void destroy() = 0;

    /**
    \brief Initializes all parameters to their default value
    */
    virtual void initDefaults(void) = 0;

    /**
    \brief Initializes all parameters with random values
    */
    virtual void initRandom(void) = 0;

    /**
    \brief Get the class name
    */
    virtual const char * className(void) const = 0;
    
    /**
    \brief Sets the class name
    
    This method is used for named references. The input name should be one of the possible variants.
    \see Definition::numRefVariants(), Definition::refVariantVal()
    */
    virtual void setClassName(const char *name) = 0;

    /**
    \brief Get the name of the NvParameterized object
    This method is used for named references. The name will typically specify an asset to be loaded.
    */
    virtual const char * name(void) const = 0;
    
    /**
    \brief Set the name of the NvParameterized object
    This method is used for named references. The name will typically specify an asset to be loaded.
    */
    virtual void setName(const char *name) = 0;

    /**
    \brief Get the class version
    */
    virtual uint32_t version(void) const = 0;

    /**
    \brief Get the major part of class version
    */
	virtual uint16_t getMajorVersion(void) const = 0;

    /**
    \brief Get the minor part of class version
    */
	virtual uint16_t getMinorVersion(void) const = 0;

    /**
    \brief Get the class checksum.
    \param bits contains the number of bits contained in the checksum
    \returns A pointer to a constant array of uint32_t values representing the checksum
    */    
    virtual const uint32_t * checksum(uint32_t &bits) const = 0;

    /**
    \brief Get the number of parameters contained in the NvParameterized object
    */
    virtual int32_t numParameters(void) = 0;

    /**
    \brief Get the definition of i-th parameter
    */
    virtual const Definition *parameterDefinition(int32_t index) = 0;

    /**
    \brief Get definition of root structure
    */
    virtual const Definition *rootParameterDefinition(void) = 0;

    /**
    \brief Get definition of root structure
    */
	virtual const Definition *rootParameterDefinition(void) const = 0;

    /**
    \brief Set the Handle to point to the parameter specified by longName
    Given a long name like "mystruct.somearray[10].foo", it will return
    a handle to that specific parameter.  The handle can then be used to
    set/get values, as long as it's a handle to a leaf node.
    \note this method will not work if an included reference's child is included in the longName
    */
    virtual ErrorType getParameterHandle(const char *longName, Handle  &handle) const = 0;

    /**
    \brief Set the Handle to point to the parameter specified by longName
    Given a long name like "mystruct.somearray[10].foo", it will return
    a handle to that specific parameter.  The handle can then be used to
    set/get values, as long as it's a handle to a leaf node.
    \note this method will not work if an included reference's child is included in the longName
    */
    virtual ErrorType getParameterHandle(const char *longName, Handle  &handle) = 0;

    /// An application may set a callback function that is called immediately before serialization
    virtual void setSerializationCallback(SerializationCallback *cb, void *userData = NULL) = 0;

	/// Called prior by Serializer to serialization
    virtual ErrorType callPreSerializeCallback() const = 0;


    /**
    \brief Compares two NvParameterized objects
    \param [in] obj The other ::NvParameterized::Interface object (this == obj)
    \param [out] handlesOfInequality If the return value is False, these handles will contain the path to where definition or data is not identical
    \param [in] numHandlesOfInequality The number of handles that can be written to.
	\param [in] doCompareNotSerialized If false differences of parameters with DONOTSERIALIZE-hint are ignored.
    \returns true if parameter definition tree is equal as well as parameter values
    */
    virtual bool equals(const ::NvParameterized::Interface &obj, Handle* handlesOfInequality = NULL, uint32_t numHandlesOfInequality = 0, bool doCompareNotSerialized = true) const = 0;

    /**
    \brief Checks if object satisfies schema constraints
    \param [out] invalidHandles If the return value is False, these handles will contain the path to invalid data
    \param [in] numInvalidHandles The number of handles that can be written to.
    \returns true if all values satisfy constraints
    */
    virtual bool areParamsOK(Handle *invalidHandles = NULL, uint32_t numInvalidHandles = 0) = 0;

    /**
    \brief Copies an NvParameterized object
    \param [in] src the src NvParameterized object will be copied to this object.  It must be of the same type (class name).
    */
    virtual ErrorType copy(const ::NvParameterized::Interface &src) = 0;

    /**
    \brief Clones an NvParameterized object
    \param [out] nullDestObject cloned object; note this is a *reference* to a pointer; the destination cloned object will be created and stored in this pointer; should be NULL on entry!
    */
    virtual ErrorType clone(Interface *&nullDestObject) const = 0;

	/**
	\brief Check that alignments of internal elements match the schema
	\warning Only for internal use
	*/
	virtual bool checkAlignments() const = 0;

protected:
	/**
	\brief Initialize a Reference parameter

	\note By default previous value of parameter isn't destroyed (bool doDestroyOld = false)
	*/
    virtual ErrorType initParamRef(const Handle &handle, const char *chosenRefStr = 0, bool doDestroyOld = false) = 0;

    // These functions wrap the raw(Get|Set)XXXXX() methods.  They deal with
    // error handling and casting.

	/**
	\brief Get param
	*/
    virtual ErrorType getParamBool(const Handle &handle, bool &val) const = 0;

	/**
	\brief Set param
	*/
    virtual ErrorType setParamBool(const Handle &handle, bool val) = 0;

	/**
	\brief Get param
	*/
    virtual ErrorType getParamBoolArray(const Handle &handle, bool *array, int32_t n, int32_t offset = 0) const = 0;

	/**
	\brief Set param
	*/
    virtual ErrorType setParamBoolArray(const Handle &handle, const bool *array, int32_t n, int32_t offset = 0) = 0;

	/**
	\brief Get param
	*/
    virtual ErrorType getParamString(const Handle &handle, const char *&val) const = 0;

	/**
	\brief Set param
	*/
    virtual ErrorType setParamString(const Handle &handle, const char *val) = 0;

	/**
	\brief Get param
	*/
    virtual ErrorType getParamStringArray(const Handle &handle, char **array, int32_t n, int32_t offset = 0) const = 0;

	/**
	\brief Set param
	*/
    virtual ErrorType setParamStringArray(const Handle &handle, const char **array, int32_t n, int32_t offset = 0) = 0;

	/**
	\brief Get param
	*/
    virtual ErrorType getParamEnum(const Handle &handle, const char *&val) const = 0;

	/**
	\brief Set param
	*/
    virtual ErrorType setParamEnum(const Handle &handle, const char *val) = 0;

	/**
	\brief Get param
	*/
    virtual ErrorType getParamEnumArray(const Handle &handle, char **array, int32_t n, int32_t offset = 0) const = 0;

	/**
	\brief Set param
	*/
    virtual ErrorType setParamEnumArray(const Handle &handle, const char **array, int32_t n, int32_t offset = 0) = 0;

	/**
	\brief Get param
	*/
    virtual ErrorType getParamRef(const Handle &handle, ::NvParameterized::Interface *&val) const = 0;

	/**
	\brief Get param
	*/
    virtual ErrorType getParamRefArray(const Handle &handle, ::NvParameterized::Interface **array, int32_t n, int32_t offset = 0) const = 0;

	/**
	\note By default previous value of parameter is not destroyed (bool doDestroyOld = false)
	*/
    virtual ErrorType setParamRef(const Handle &handle, ::NvParameterized::Interface * val, bool doDestroyOld = false) = 0;

	/**
	\note By default previous values of parameter are not destroyed (bool doDestroyOld = false)
	*/
    virtual ErrorType setParamRefArray(const Handle &handle, /*const*/ ::NvParameterized::Interface **array, int32_t n, int32_t offset = 0, bool doDestroyOld = false) = 0;

	/**
	\brief Get param
	*/
    virtual ErrorType getParamI8(const Handle &handle, int8_t &val) const = 0;

	/**
	\brief Set param
	*/
    virtual ErrorType setParamI8(const Handle &handle, int8_t val) = 0;

	/**
	\brief Get param
	*/
    virtual ErrorType getParamI8Array(const Handle &handle, int8_t *array, int32_t n, int32_t offset = 0) const = 0;

	/**
	\brief Set param
	*/
    virtual ErrorType setParamI8Array(const Handle &handle, const int8_t *val, int32_t n, int32_t offset = 0) = 0;

	/**
	\brief Get param
	*/
    virtual ErrorType getParamI16(const Handle &handle, int16_t &val) const = 0;

	/**
	\brief Set param
	*/
    virtual ErrorType setParamI16(const Handle &handle, int16_t val) = 0;

	/**
	\brief Get param
	*/
    virtual ErrorType getParamI16Array(const Handle &handle, int16_t *array, int32_t n, int32_t offset = 0) const = 0;

	/**
	\brief Set param
	*/
    virtual ErrorType setParamI16Array(const Handle &handle, const int16_t *val, int32_t n, int32_t offset = 0) = 0;

	/**
	\brief Get param
	*/
    virtual ErrorType getParamI32(const Handle &handle, int32_t &val) const = 0;

	/**
	\brief Set param
	*/
    virtual ErrorType setParamI32(const Handle &handle, int32_t val) = 0;

	/**
	\brief Get param
	*/
    virtual ErrorType getParamI32Array(const Handle &handle, int32_t *array, int32_t n, int32_t offset = 0) const = 0;

	/**
	\brief Set param
	*/
    virtual ErrorType setParamI32Array(const Handle &handle, const int32_t *val, int32_t n, int32_t offset = 0) = 0;

	/**
	\brief Get param
	*/
    virtual ErrorType getParamI64(const Handle &handle, int64_t &val) const = 0;

	/**
	\brief Set param
	*/
    virtual ErrorType setParamI64(const Handle &handle, int64_t val) = 0;

	/**
	\brief Get param
	*/
    virtual ErrorType getParamI64Array(const Handle &handle, int64_t *array, int32_t n, int32_t offset = 0) const = 0;

	/**
	\brief Set param
	*/
    virtual ErrorType setParamI64Array(const Handle &handle, const int64_t *val, int32_t n, int32_t offset = 0) = 0;

	/**
	\brief Get param
	*/
    virtual ErrorType getParamU8(const Handle &handle, uint8_t &val) const = 0;

	/**
	\brief Set param
	*/
    virtual ErrorType setParamU8(const Handle &handle, uint8_t val) = 0;

	/**
	\brief Get param
	*/
    virtual ErrorType getParamU8Array(const Handle &handle, uint8_t *array, int32_t n, int32_t offset = 0) const = 0;

	/**
	\brief Set param
	*/
    virtual ErrorType setParamU8Array(const Handle &handle, const uint8_t *val, int32_t n, int32_t offset = 0) = 0;

	/**
	\brief Get param
	*/
    virtual ErrorType getParamU16(const Handle &handle, uint16_t &val) const = 0;

	/**
	\brief Set param
	*/
    virtual ErrorType setParamU16(const Handle &handle, uint16_t val) = 0;

	/**
	\brief Get param
	*/
    virtual ErrorType getParamU16Array(const Handle &handle, uint16_t *array, int32_t n, int32_t offset = 0) const = 0;

	/**
	\brief Set param
	*/
    virtual ErrorType setParamU16Array(const Handle &handle, const uint16_t *array, int32_t n, int32_t offset = 0) = 0;

	/**
	\brief Get param
	*/
    virtual ErrorType getParamU32(const Handle &handle, uint32_t &val) const = 0;

	/**
	\brief Set param
	*/
    virtual ErrorType setParamU32(const Handle &handle, uint32_t val) = 0;

	/**
	\brief Get param
	*/
    virtual ErrorType getParamU32Array(const Handle &handle, uint32_t *array, int32_t n, int32_t offset = 0) const = 0;

	/**
	\brief Set param
	*/
    virtual ErrorType setParamU32Array(const Handle &handle, const uint32_t *array, int32_t n, int32_t offset = 0) = 0;

	/**
	\brief Get param
	*/
    virtual ErrorType getParamU64(const Handle &handle, uint64_t &val) const = 0;

	/**
	\brief Set param
	*/
    virtual ErrorType setParamU64(const Handle &handle, uint64_t val) = 0;

	/**
	\brief Get param
	*/
    virtual ErrorType getParamU64Array(const Handle &handle, uint64_t *array, int32_t n, int32_t offset = 0) const = 0;

	/**
	\brief Set param
	*/
    virtual ErrorType setParamU64Array(const Handle &handle, const uint64_t *array, int32_t n, int32_t offset = 0) = 0;

	/**
	\brief Get param
	*/
    virtual ErrorType getParamF32(const Handle &handle, float &val) const = 0;

	/**
	\brief Set param
	*/
    virtual ErrorType setParamF32(const Handle &handle, float val) = 0;

	/**
	\brief Get param
	*/
    virtual ErrorType getParamF32Array(const Handle &handle, float *array, int32_t n, int32_t offset = 0) const = 0;

	/**
	\brief Set param
	*/
    virtual ErrorType setParamF32Array(const Handle &handle, const float *array, int32_t n, int32_t offset = 0) = 0;

	/**
	\brief Get param
	*/
    virtual ErrorType getParamF64(const Handle &handle, double &val) const = 0;

	/**
	\brief Set param
	*/
    virtual ErrorType setParamF64(const Handle &handle, double val) = 0;

	/**
	\brief Get param
	*/
    virtual ErrorType getParamF64Array(const Handle &handle, double *array, int32_t n, int32_t offset = 0) const = 0;

	/**
	\brief Set param
	*/
    virtual ErrorType setParamF64Array(const Handle &handle, const double *array, int32_t n, int32_t offset = 0) = 0;

	/**
	\brief Set param
	*/
    virtual ErrorType setParamVec2(const Handle &handle, const physx::PxVec2 &val) = 0;

	/**
	\brief Get param
	*/
    virtual ErrorType getParamVec2(const Handle &handle, physx::PxVec2 &val) const = 0;

	/**
	\brief Get param
	*/
    virtual ErrorType getParamVec2Array(const Handle &handle, physx::PxVec2 *array, int32_t n, int32_t offset = 0) const = 0;

	/**
	\brief Set param
	*/
    virtual ErrorType setParamVec2Array(const Handle &handle, const physx::PxVec2 *array, int32_t n, int32_t offset = 0) = 0;

	/**
	\brief Set param
	*/
	virtual ErrorType setParamVec3(const Handle &handle, const physx::PxVec3 &val) = 0;

	/**
	\brief Get param
	*/
    virtual ErrorType getParamVec3(const Handle &handle, physx::PxVec3 &val) const = 0;

	/**
	\brief Get param
	*/
    virtual ErrorType getParamVec3Array(const Handle &handle, physx::PxVec3 *array, int32_t n, int32_t offset = 0) const = 0;

	/**
	\brief Set param
	*/
    virtual ErrorType setParamVec3Array(const Handle &handle, const physx::PxVec3 *array, int32_t n, int32_t offset = 0) = 0;

	/**
	\brief Set param
	*/
    virtual ErrorType setParamVec4(const Handle &handle, const physx::PxVec4 &val) = 0;

	/**
	\brief Get param
	*/
    virtual ErrorType getParamVec4(const Handle &handle, physx::PxVec4 &val) const = 0;

	/**
	\brief Get param
	*/
    virtual ErrorType getParamVec4Array(const Handle &handle, physx::PxVec4 *array, int32_t n, int32_t offset = 0) const = 0;

	/**
	\brief Set param
	*/
    virtual ErrorType setParamVec4Array(const Handle &handle, const physx::PxVec4 *array, int32_t n, int32_t offset = 0) = 0;

	/**
	\brief Set param
	*/
	virtual ErrorType setParamQuat(const Handle &handle, const physx::PxQuat &val) = 0;

	/**
	\brief Get param
	*/
    virtual ErrorType getParamQuat(const Handle &handle, physx::PxQuat &val) const = 0;

	/**
	\brief Get param
	*/
    virtual ErrorType getParamQuatArray(const Handle &handle, physx::PxQuat *array, int32_t n, int32_t offset = 0) const = 0;

	/**
	\brief Set param
	*/
    virtual ErrorType setParamQuatArray(const Handle &handle, const physx::PxQuat *array, int32_t n, int32_t offset = 0) = 0;

	/**
	\brief Set param
	*/
	virtual ErrorType setParamMat33(const Handle &handle, const physx::PxMat33 &val) = 0;

	/**
	\brief Get param
	*/
	virtual ErrorType getParamMat33(const Handle &handle, physx::PxMat33 &val) const = 0;

	/**
	\brief Get param
	*/
	virtual ErrorType getParamMat33Array(const Handle &handle, physx::PxMat33 *array, int32_t n, int32_t offset = 0) const = 0;

	/**
	\brief Set param
	*/
	virtual ErrorType setParamMat33Array(const Handle &handle, const physx::PxMat33 *array, int32_t n, int32_t offset = 0) = 0;

	/**
	\brief Set param
	*/
	virtual ErrorType setParamMat44(const Handle &handle, const physx::PxMat44 &val) = 0;
    
	/**
	\brief Get param
	*/
	virtual ErrorType getParamMat44(const Handle &handle, physx::PxMat44 &val) const = 0;

	/**
	\brief Get param
	*/
    virtual ErrorType getParamMat44Array(const Handle &handle, physx::PxMat44 *array, int32_t n, int32_t offset = 0) const = 0;

	/**
	\brief Set param
	*/
    virtual ErrorType setParamMat44Array(const Handle &handle, const physx::PxMat44 *array, int32_t n, int32_t offset = 0) = 0;

	/**
	\brief Set param
	*/
	virtual ErrorType setParamMat34Legacy(const Handle &handle, const float (&val)[12]) = 0;
    
	/**
	\brief Get param
	*/
	virtual ErrorType getParamMat34Legacy(const Handle &handle, float (&val)[12]) const = 0;

	/**
	\brief Get param
	*/
    virtual ErrorType getParamMat34LegacyArray(const Handle &handle, float *array, int32_t n, int32_t offset = 0) const = 0;

	/**
	\brief Set param
	*/
    virtual ErrorType setParamMat34LegacyArray(const Handle &handle, const float *array, int32_t n, int32_t offset = 0) = 0;

	/**
	\brief Set param
	*/
    virtual ErrorType setParamBounds3(const Handle &handle, const physx::PxBounds3 &val) = 0;

	/**
	\brief Get param
	*/
    virtual ErrorType getParamBounds3(const Handle &handle, physx::PxBounds3 &val) const = 0;

	/**
	\brief Get param
	*/
    virtual ErrorType getParamBounds3Array(const Handle &handle, physx::PxBounds3 *array, int32_t n, int32_t offset = 0) const = 0;

		/**
	\brief Set param
	*/
	virtual ErrorType setParamTransform(const Handle &handle, const physx::PxTransform &val) = 0;
    
	/**
	\brief Get param
	*/
	virtual ErrorType getParamTransform(const Handle &handle, physx::PxTransform &val) const = 0;

	/**
	\brief Get param
	*/
    virtual ErrorType getParamTransformArray(const Handle &handle, physx::PxTransform *array, int32_t n, int32_t offset = 0) const = 0;

	/**
	\brief Set param
	*/
    virtual ErrorType setParamTransformArray(const Handle &handle, const physx::PxTransform *array, int32_t n, int32_t offset = 0) = 0;

	/**
	\brief Set param
	*/
    virtual ErrorType setParamBounds3Array(const Handle &handle, const physx::PxBounds3 *array, int32_t n, int32_t offset = 0) = 0;

	/**
	\brief Store value of parameter into a string
	\see Handle::valueToStr
	*/
    virtual ErrorType valueToStr(const Handle &handle, char *buf, uint32_t bufSize, const char *&ret) = 0;

	/**
	\brief Read value of parameter from string
	\see Handle::strToValue
	*/
    virtual ErrorType strToValue(Handle &handle,const char *str, const char **endptr) = 0; // assigns this string to the value

    /**
    \brief Resize array parameter
	\see Handle::resizeArray
    */
    virtual ErrorType resizeArray(const Handle &array_handle, int32_t new_size) = 0;

    /**
    \brief Get size of array parameter
	\see Handle::getArraySize
    */
	virtual ErrorType getArraySize(const Handle &array_handle, int32_t &size, int32_t dimension = 0) const = 0;

    /**
    \brief Swap two elements of an array
	\see Handle::swapArrayElements
    */
    virtual ErrorType swapArrayElements(const Handle &array_handle, uint32_t firstElement, uint32_t secondElement) = 0;
};

} // end of namespace

#include "NvParameterized.inl" // inline the NvParamterHandle methods.

PX_POP_PACK

#endif // NV_PARAMETERIZED_H

Commits for Divide-Dependencies/physx/APEX_1.4/include/nvparameterized/NvParameterized.h

Diff revisions: vs.
Revision Author Commited Message
105 IonutCava picture IonutCava Tue 16 Apr, 2019 19:55:41 +0000

Forgot to actually add physx