-
Notifications
You must be signed in to change notification settings - Fork 526
/
Copy pathCSharp.h
1618 lines (1361 loc) · 39.1 KB
/
CSharp.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
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
#pragma once
#include "../Tests.h"
#include <atomic>
#include <cstdint>
#include <vector>
#include <limits>
#include <string>
#include <mutex>
#include "AnotherUnit.h"
#include "ExcludedUnit.hpp"
#include "CSharpTemplates.h"
struct SmallPOD
{
int a;
int b;
};
class DLL_API Foo
{
public:
Foo(const QString& name);
Foo(const char* name = 0);
Foo(int a, int p = 0);
Foo(char16_t ch);
Foo(wchar_t ch);
Foo(const Foo& other);
int method();
int operator[](int i) const;
int operator[](unsigned int i);
int& operator[](int i);
int A;
int* (*functionPtrReturnsPtrParam)();
int (STDCALL *attributedFunctionPtr)();
bool isNoParams();
void setNoParams();
void foo(int i);
void takesStdVector(const std::vector<int>& vector);
int width();
void set_width(int value);
const int& returnConstRef();
AbstractTemplate<int>* getAbstractTemplate();
static const int rename = 5;
static int makeFunctionCall();
static int propertyCall();
static int getGetPropertyCall();
SmallPOD CDECL getSmallPod_cdecl();
SmallPOD STDCALL getSmallPod_stdcall();
SmallPOD THISCALL getSmallPod_thiscall();
int operator ++();
int operator --();
operator const char*() const;
bool btest[5];
QFlags<TestFlag> publicFieldMappedToEnum;
protected:
int P;
TemplateInAnotherUnit<int> templateInAnotherUnit;
std::string _name;
};
class DLL_API Quux
{
public:
Quux();
Quux(int i);
Quux(char c);
Quux(Foo f);
~Quux();
int getPriv() const;
Foo* setterWithDefaultOverload();
void setSetterWithDefaultOverload(Foo* value = new Foo());
private:
int priv;
Foo* _setterWithDefaultOverload;
};
class Bar;
class DLL_API Qux
{
public:
Qux();
Qux(const Qux& other);
Qux(Foo foo);
Qux(Bar bar);
int farAwayFunc() const;
int array[3];
void obsolete();
Qux* getInterface();
void setInterface(Qux* qux);
virtual void makeClassDynamic();
virtual int takeReferenceToPointer(Foo*& ret);
virtual int type() const;
};
class DLL_API Bar : public Qux
{
public:
enum Items
{
Item1,
Item2
};
Bar();
Bar(Qux qux);
Bar(Items item);
int method();
const Foo& operator[](int i) const;
Foo& operator[](int i);
Bar operator*();
const Bar& operator*(int m);
const Bar& operator++();
Bar operator++(int i);
void* arrayOfPrimitivePointers[1];
Foo foos[4];
int getIndex();
void setIndex(int value);
union
{
int publicInt;
double publicDouble;
};
static const int Type = 4;
int type() const override;
protected:
enum class ProtectedNestedEnum
{
Item1,
Item2
};
private:
int index;
Foo m_foo;
};
class DLL_API ForceCreationOfInterface : public Foo, public Bar
{
};
class DLL_API Baz : public Foo, public Bar
{
public:
class NestedBase1 {
int f1;
double f2;
void* f3;
};
class NestedBase2 {};
class NestedDerived : public NestedBase1, public NestedBase2 {};
Baz();
Baz(Bar::Items item);
int P;
int takesQux(const Qux& qux);
Qux returnQux();
void setMethod(ProtectedNestedEnum value);
int type() const override;
typedef bool (*FunctionTypedef)(const void *);
FunctionTypedef functionTypedef;
};
struct QArrayData
{
};
typedef QArrayData QByteArrayData;
struct QByteArrayDataPtr
{
QByteArrayData* ptr;
};
class DLL_API AbstractProprietor
{
public:
virtual ~AbstractProprietor();
virtual int getValue();
virtual void setValue(int newValue) = 0;
virtual long prop() = 0;
virtual void setProp(long prop);
virtual int parent();
virtual int parent() const;
virtual const Foo& covariant() = 0;
protected:
AbstractProprietor();
AbstractProprietor(int i);
int m_value;
long m_property;
std::mutex m_mutex;
};
class DLL_API Proprietor : public AbstractProprietor
{
public:
Proprietor();
Proprietor(int i);
virtual void setValue(int value);
virtual long prop();
virtual const Baz& covariant();
Bar::Items items() const;
void setItems(const Bar::Items& value);
Bar::Items itemsByValue() const;
void setItemsByValue(Bar::Items value);
private:
Bar::Items _items;
Bar::Items _itemsByValue;
std::atomic<int> atomicPrimitive;
std::atomic<SmallPOD> atomicCustom;
};
class DLL_API ComplexType
{
public:
ComplexType();
ComplexType(const QFlags<TestFlag> f);
ComplexType(const HasCtorWithMappedToEnum<TestFlag> f);
int check();
QFlags<TestFlag> returnsQFlags();
void takesQFlags(const QFlags<int> f);
private:
QFlags<TestFlag> qFlags;
};
class DLL_API P : Proprietor
{
public:
P(const Qux& qux);
P(Qux* qux);
virtual void setValue(int value);
virtual long prop();
ComplexType complexType();
void setComplexType(const ComplexType& value);
virtual void parent(int i);
bool isTest();
void setTest(bool value);
void test();
bool isBool();
void setIsBool(bool value);
private:
ComplexType m_complexType;
};
// Tests destructors
struct DLL_API TestDestructors
{
static void InitMarker();
static int Marker;
TestDestructors();
~TestDestructors();
};
class DLL_API TestCopyConstructorVal
{
public:
TestCopyConstructorVal();
TestCopyConstructorVal(const TestCopyConstructorVal& other);
int A;
float B;
};
class DLL_API TestRenaming
{
public:
void name();
void Name();
int property();
protected:
int _property;
};
enum class Flags
{
Flag1 = 1,
Flag2 = 2,
Flag3 = 4
};
class DLL_API UsesPointerToEnum
{
public:
Flags* _flags;
void hasPointerToEnumInParam(Flags* flag);
};
class DLL_API UsesPointerToEnumInParamOfVirtual
{
public:
virtual ~UsesPointerToEnumInParamOfVirtual();
virtual QFlags<Flags> hasPointerToEnumInParam(const QFlags<Flags>& pointerToEnum) const;
static QFlags<Flags> callOverrideOfHasPointerToEnumInParam(
const UsesPointerToEnumInParamOfVirtual* object, const QFlags<Flags>& pointerToEnum);
};
DLL_API Flags operator|(Flags lhs, Flags rhs);
enum UntypedFlags
{
Flag1 = 1,
Flag2 = 2,
Flag3 = 4
};
UntypedFlags operator|(UntypedFlags lhs, UntypedFlags rhs);
struct DLL_API QGenericArgument
{
public:
QGenericArgument(const char* name = 0, const void *data = 0);
void* fixedArrayInValueType[1];
private:
const char* _name;
};
class TestObjectMapWithClassDerivedFromStruct : public QGenericArgument
{
};
#define DEFAULT_INT (2 * 1000UL + 500UL)
namespace Qt
{
enum GlobalColor {
black,
white,
};
}
class DLL_API QColor
{
public:
QColor(Qt::GlobalColor color);
};
template <typename T>
class QList
{
};
class DLL_API QPoint
{
public:
QPoint(int x, int y);
};
class DLL_API QSize
{
public:
QSize(int w, int h);
};
class DLL_API QRect
{
public:
QRect(QPoint p, QSize s);
};
namespace lowerCaseNameSpace
{
enum class Enum
{
Item1,
Item2
};
}
class DLL_API DefaultZeroMappedToEnum
{
public:
DefaultZeroMappedToEnum(int* = 0);
};
enum class Empty : unsigned long long int
{
};
class _ClassWithLeadingUnderscore {
};
const int ConstFlag1 = 1;
const int ConstFlag2 = 2;
const int ConstFlag3 = 4;
extern DLL_API struct SmallPOD DefaultSmallPODInstance;
class DLL_API MethodsWithDefaultValues : public Quux
{
public:
class DLL_API QMargins
{
public:
QMargins(int left, int top, int right, int bottom);
};
static const char* stringConstant;
static int intConstant;
typedef int* Zero;
MethodsWithDefaultValues(Foo foo = Foo());
MethodsWithDefaultValues(int a);
MethodsWithDefaultValues(float a, Zero b = 0);
MethodsWithDefaultValues(double d, QList<QColor> list = QList<QColor>());
MethodsWithDefaultValues(QRect* pointer, float f = 1, int i = std::numeric_limits<double>::infinity());
~MethodsWithDefaultValues();
void defaultPointer(Foo* ptr1 = 0, Foo* ptr2 = nullptr);
void defaultVoidStar(void* ptr = 0);
void defaultFunctionPointer(void(*functionPtr)(int p) = nullptr);
void defaultValueType(QGenericArgument valueType = QGenericArgument());
void defaultChar(char c = 'a', char uc = u'u', char Uc = U'U', char Lc = L'L', unsigned char b = 'z');
void defaultString(const wchar_t* wideString = L"Str");
void defaultEmptyChar(char c = 0);
void defaultEmptyEnum(Empty e = Empty(-1));
void defaultRefTypeBeforeOthers(Foo foo = Foo(), int i = 5, Bar::Items item = Bar::Item2);
void defaultRefTypeAfterOthers(int i = 5, Bar::Items item = Bar::Item2, Foo foo = Foo());
void defaultRefTypeBeforeAndAfterOthers(int i = 5, Foo foo = Foo(), Bar::Items item = Bar::Item2, Baz baz = Baz());
void defaultIntAssignedAnEnum(int i = Bar::Item1);
void defaultRefAssignedValue(const Foo& fooRef = Foo());
void DefaultRefAssignedValue(const Foo& fooRef = Foo());
void defaultEnumAssignedBitwiseOr(Flags flags = Flags::Flag1 | Flags::Flag2);
void defaultEnumAssignedBitwiseOrShort(UntypedFlags flags = Flag1 | Flag2);
void defaultNonEmptyCtor(QGenericArgument arg = QGenericArgument(0));
void defaultNonEmptyCtorWithNullPtr(QGenericArgument arg = QGenericArgument(nullptr));
QFlags<Flags> defaultMappedToEnum(const QFlags<Flags>& qFlags = Flags::Flag3);
void defaultMappedToZeroEnum(QFlags<Flags> qFlags = 0);
void defaultMappedToEnumAssignedWithCtor(QFlags<Flags> qFlags = QFlags<Flags>());
typedef QFlags<Flags> TypedefedFlags;
void defaultTypedefMappedToEnumRefAssignedWithCtor(const TypedefedFlags& qFlags = TypedefedFlags());
void defaultZeroMappedToEnumAssignedWithCtor(DefaultZeroMappedToEnum defaultZeroMappedToEnum = DefaultZeroMappedToEnum());
Quux defaultImplicitCtorInt(Quux arg = 0);
void defaultImplicitCtorChar(Quux arg = 'a');
void defaultImplicitCtorFoo(Quux arg = Foo());
// this looks the same test as 'defaultRefTypeEnumImplicitCtor' two lines below
// however, Clang considers them different
// in this case the arg is a MaterializeTemporaryExpr, in the other not
// I cannot see the difference but it's there so we need both tests
void defaultImplicitCtorEnum(Baz arg = Bar::Item1);
void defaultImplicitCtorEnumTwo(Bar arg = Bar::Items::Item1);
void defaultIntWithLongExpression(unsigned int i = DEFAULT_INT);
void defaultRefTypeEnumImplicitCtor(const QColor &fillColor = Qt::white);
void rotate4x4Matrix(float angle, float x, float y, float z = 0.0f);
void defaultPointerToValueType(QGenericArgument* pointer = 0);
void defaultDoubleWithoutF(double d1 = 1.0, double d2 = 1.);
void defaultIntExpressionWithEnum(int i = Qt::GlobalColor::black + 1);
void defaultCtorWithMoreThanOneArg(QMargins m = QMargins(0, 0, 0, 0));
void defaultEmptyBraces(Foo foo = {});
void defaultWithComplexArgs(const QRect& rectangle = QRect(QPoint(0, 0), QSize(-1, -1)));
void defaultWithRefManagedLong(long long* i = 0);
void defaultWithFunctionCall(int f = Foo::makeFunctionCall());
void defaultWithPropertyCall(int f = Foo::propertyCall());
void defaultWithGetPropertyCall(int f = Foo::getGetPropertyCall());
void defaultWithIndirectStringConstant(const Foo& arg = Foo(stringConstant));
void defaultWithDirectIntConstant(int arg = intConstant);
void defaultWithEnumInLowerCasedNameSpace(lowerCaseNameSpace::Enum e = lowerCaseNameSpace::Enum::Item2);
void defaultWithCharFromInt(char c = 32);
void defaultWithFreeConstantInNameSpace(int c = HasFreeConstant::FREE_CONSTANT_IN_NAMESPACE);
void defaultWithStdNumericLimits(double d = 1.0, int i = std::numeric_limits<double>::infinity());
void defaultWithParamRequiringRename(_ClassWithLeadingUnderscore* ptr = nullptr);
void defaultWithSpecialization(IndependentFields<int> specialization = IndependentFields<int>());
void defaultOverloadedImplicitCtor(P p);
void defaultOverloadedImplicitCtor(Qux q = Qux());
int defaultIntAssignedAnEnumWithBinaryOperatorAndFlags(int f = Bar::Item1 | Bar::Item2);
int defaultWithConstantFlags(int f = ConstFlag1 | ConstFlag2 | ConstFlag3);
bool defaultWithPointerToEnum(UntypedFlags* f1 = NULL, int* f2 = NULL);
SmallPOD* defaultWithNonPrimitiveType(SmallPOD& pod = DefaultSmallPODInstance);
int DefaultWithParamNamedSameAsMethod(int DefaultWithParamNamedSameAsMethod, const Foo& defaultArg = Foo());
int getA();
private:
Foo m_foo;
};
// don't export this one or the bug doesn't reproduce on windows
class HasPureVirtualWithDefaultArg
{
public:
virtual ~HasPureVirtualWithDefaultArg() {}
virtual void pureVirtualWithDefaultArg(Foo* foo = nullptr) = 0;
protected:
HasPureVirtualWithDefaultArg() {}
};
class DLL_API HasOverridesWithChangedAccessBase
{
public:
virtual void privateOverride(int i = 5);
protected:
virtual void publicOverride();
private:
virtual void differentIncreasedAccessOverride();
};
class DLL_API HasOverridesWithChangedAccess : public HasOverridesWithChangedAccessBase
{
public:
void publicOverride();
private:
virtual void privateOverride(int i);
};
class DLL_API HasOverridesWithIncreasedProtectedAccess : public HasOverridesWithChangedAccess
{
protected:
virtual void differentIncreasedAccessOverride();
};
class DLL_API HasOverridesWithIncreasedAccess : public HasOverridesWithChangedAccess
{
public:
virtual void privateOverride(int i);
virtual void differentIncreasedAccessOverride();
};
class DLL_API AbstractWithProperty
{
public:
virtual ~AbstractWithProperty();
virtual int property() = 0;
};
class DLL_API IgnoredType
{
};
class DLL_API IgnoredTypeInheritingNonIgnoredWithNoEmptyCtor : public P
{
};
class DLL_API HasOverriddenInManaged
{
public:
void setOverriddenInManaged(Baz *value);
int callOverriddenInManaged();
private:
Baz* overriddenInManaged = 0;
};
class DLL_API PropertyWithIgnoredType
{
public:
IgnoredType ignoredType();
void setIgnoredType(const IgnoredType& value);
private:
IgnoredType _ignoredType;
};
// --- Multiple inheritance
struct DLL_API MI_A0
{
MI_A0();
int get();
int F;
};
struct DLL_API MI_A
{
MI_A();
virtual void v(int i = 5);
};
struct DLL_API MI_B : public MI_A
{
MI_B();
};
struct DLL_API MI_C : public MI_A0, public MI_B
{
MI_C();
};
struct DLL_API MI_A1
{
MI_A1();
};
struct DLL_API MI_D : public MI_A1, public MI_C
{
MI_D();
};
class DLL_API StructWithPrivateFields
{
public:
StructWithPrivateFields(int simplePrivateField, Foo complexPrivateField);
int getSimplePrivateField();
Foo getComplexPrivateField();
protected:
int protectedField;
private:
int simplePrivateField;
Foo complexPrivateField;
};
template <class Key, class T>
class QMap
{
struct Node
{
Key key;
T value;
};
public:
QMap(const QMap<Key, T> &other);
class const_iterator;
class iterator
{
public:
int test() {
return 1;
}
friend class const_iterator;
friend class QMap<Key, T>;
};
friend class iterator;
class const_iterator
{
friend class iterator;
friend class QMap<Key, T>;
};
friend class const_iterator;
};
#define Q_PROCESSOR_WORDSIZE 8
template <int> struct QIntegerForSize;
template <> struct QIntegerForSize<1> { typedef uint8_t Unsigned; typedef int8_t Signed; };
template <> struct QIntegerForSize<2> { typedef uint16_t Unsigned; typedef int16_t Signed; };
template <> struct QIntegerForSize<4> { typedef uint32_t Unsigned; typedef int32_t Signed; };
template <> struct QIntegerForSize<8> { typedef uint64_t Unsigned; typedef int64_t Signed; };
typedef QIntegerForSize<Q_PROCESSOR_WORDSIZE>::Signed qregisterint;
typedef QIntegerForSize<Q_PROCESSOR_WORDSIZE>::Unsigned qregisteruint;
struct DLL_API TestPointers
{
void TestDoubleCharPointers(const char** names);
void TestTripleCharPointers(const char*** names);
const char** Names;
};
class DLL_API HasVirtualDtor1
{
public:
HasVirtualDtor1();
virtual ~HasVirtualDtor1();
int testField;
};
class DLL_API HasVirtualDtor2
{
public:
HasVirtualDtor2();
virtual ~HasVirtualDtor2();
HasVirtualDtor1* getHasVirtualDtor1();
virtual void virtualFunction(const HasVirtualDtor1& param1, const HasVirtualDtor1& param2);
private:
HasVirtualDtor1* hasVirtualDtor1;
};
class DLL_API TestNativeToManagedMap
{
public:
TestNativeToManagedMap();
virtual ~TestNativeToManagedMap();
HasVirtualDtor2* getHasVirtualDtor2();
Bar* propertyWithNoVirtualDtor() const;
void setPropertyWithNoVirtualDtor(Bar* bar);
private:
HasVirtualDtor2* hasVirtualDtor2;
Bar* bar;
};
class DLL_API CallDtorVirtually : public HasVirtualDtor1
{
public:
~CallDtorVirtually();
static bool Destroyed;
static HasVirtualDtor1* getHasVirtualDtor1(HasVirtualDtor1* returned);
static CallDtorVirtually* getNonOwnedInstance();
};
class HasProtectedNestedAnonymousType
{
protected:
union
{
int i;
double d;
} u;
};
class DLL_API TestOverrideFromSecondaryBase : public Foo, public SecondaryBase
{
public:
void VirtualMember();
void setProperty(int value);
};
class DLL_API TestParamToInterfacePassBaseOne
{
};
class DLL_API TestParamToInterfacePassBaseTwo
{
int m;
public:
int getM();
void setM(int n);
const TestParamToInterfacePassBaseTwo& operator++();
TestParamToInterfacePassBaseTwo();
TestParamToInterfacePassBaseTwo(int n);
};
class DLL_API TestParamToInterfacePass : public TestParamToInterfacePassBaseOne, public TestParamToInterfacePassBaseTwo
{
public:
TestParamToInterfacePassBaseTwo addM(TestParamToInterfacePassBaseTwo b);
TestParamToInterfacePassBaseTwo operator+(TestParamToInterfacePassBaseTwo b);
TestParamToInterfacePass(TestParamToInterfacePassBaseTwo b);
TestParamToInterfacePass();
};
class DLL_API HasProtectedVirtual
{
protected:
virtual void protectedVirtual();
};
class DLL_API InheritanceBuffer : public Foo, public HasProtectedVirtual
{
};
class DLL_API InheritsProtectedVirtualFromSecondaryBase : public InheritanceBuffer
{
protected:
void protectedVirtual();
};
void DLL_API freeFunctionWithUnsupportedDefaultArg(Foo foo = Foo());
class DLL_API TypeMappedWithOperator
{
public:
int operator |(int i);
};
class HasOverrideOfHasPropertyWithDerivedType;
class DLL_API HasPropertyWithDerivedType
{
public:
HasOverrideOfHasPropertyWithDerivedType* hasPropertyWithDerivedTypeSubclass;
virtual void causeRenamingError();
};
class DLL_API HasOverrideOfHasPropertyWithDerivedType : public HasPropertyWithDerivedType
{
public:
virtual void causeRenamingError();
};
class DLL_API MultiOverloadPtrToRef
{
int * arr;
public:
MultiOverloadPtrToRef(int* param);
void funcPrimitivePtrToRef(int *pOne, char* pTwo, float* pThree, bool* pFour = 0);
void funcPrimitivePtrToRefWithDefVal(int* pOne, char* pTwo, Foo* pThree, int* pFour = 0);
virtual void funcPrimitivePtrToRefWithMultiOverload(int* pOne, char* pTwo, Foo* pThree, int* pFour = 0, long* pFive = 0);
int* ReturnPrimTypePtr();
void TakePrimTypePtr(int* ptr);
};
class DLL_API OverrideFromIndirectSecondaryBaseBase
{
public:
virtual int property();
};
class DLL_API OverrideFromDirectSecondaryBase : public Foo, public OverrideFromIndirectSecondaryBaseBase
{
};
class DLL_API OverrideFromIndirectSecondaryBase : public OverrideFromDirectSecondaryBase
{
public:
int property();
};
class DLL_API TestVariableWithFixedArrayType
{
public:
static Foo variableWithFixedArrayType[2];
};
class DLL_API TestOutTypeInterfaces
{
public:
void funcTryInterfaceTypePtrOut(CS_OUT TestParamToInterfacePassBaseTwo* classTry);
void funcTryInterfaceTypeOut(CS_OUT TestParamToInterfacePassBaseTwo classTry);
};
template <typename T>
class DLL_API TemplateWithDependentField
{
public:
TemplateWithDependentField();
T t;
};
template <typename T>
TemplateWithDependentField<T>::TemplateWithDependentField()
{
}
class DLL_API DerivesFromTemplateInstantiation : public TemplateWithDependentField<int>
{
};
DLL_API int PassConstantArrayRef(int(&arr)[2]);
class DLL_API TestComparison
{
public:
int A;
float B;
bool operator ==(const TestComparison& other) const;
};
class DLL_API OverridePropertyFromIndirectPrimaryBaseBase
{
public:
virtual ~OverridePropertyFromIndirectPrimaryBaseBase();
virtual int property() = 0;
virtual void setProperty(int value) = 0;
};
class DLL_API OverridePropertyFromDirectPrimaryBase : public OverridePropertyFromIndirectPrimaryBaseBase
{
public:
void setProperty(int value);
};
class DLL_API OverridePropertyFromIndirectPrimaryBase : public OverridePropertyFromDirectPrimaryBase
{
public:
int property();
};
class DLL_API AbstractOverrideFromSecondaryBase : public Foo, public OverridePropertyFromIndirectPrimaryBaseBase
{
public:
virtual ~AbstractOverrideFromSecondaryBase();
virtual void setProperty(int value) = 0;
};
class DLL_API QObject
{
public:
virtual ~QObject();
virtual void event();
};
class DLL_API QPaintDevice
{
public:
QPaintDevice();
int test;
virtual void changeVTableLayout();
};
class DLL_API QWidget : public QObject, QPaintDevice
{
public:
QWidget();
virtual void event();
private:
QObject child;
};
class DLL_API QPainter
{
public:
QPainter(QPaintDevice& paintDevice);
};
class DLL_API QApplication : public QObject
{
public:
QApplication();
static QApplication* instance;
virtual void notify(QObject* receiver);
};
class DLL_API HasSamePropertyInDerivedAbstractType
{
public:
HasSamePropertyInDerivedAbstractType();
char* property();
};
class DLL_API InheritsFromHasSamePropertyInDerivedAbstractType : public HasSamePropertyInDerivedAbstractType
{
public:
virtual ~InheritsFromHasSamePropertyInDerivedAbstractType();
virtual int property() = 0;
};
class DLL_API MultipleInheritanceFieldOffsetsSecondaryBase
{
public:
MultipleInheritanceFieldOffsetsSecondaryBase();
int secondary;
};
class DLL_API MultipleInheritanceFieldOffsetsPrimaryBase
{
public:
MultipleInheritanceFieldOffsetsPrimaryBase();
int primary;
};
class DLL_API MultipleInheritanceFieldOffsets : public MultipleInheritanceFieldOffsetsPrimaryBase, public MultipleInheritanceFieldOffsetsSecondaryBase
{
public:
MultipleInheritanceFieldOffsets();
int own;
};
class DLL_API VirtualDtorAddedInDerived : public Foo
{
public:
virtual ~VirtualDtorAddedInDerived();
static bool dtorCalled;
};
class DLL_API ClassWithVirtualBase : public virtual Foo
{
};
namespace NamespaceA
{
CS_VALUE_TYPE class DLL_API A
{
};
}
namespace NamespaceB
{
class DLL_API B
{
public:
void Function(CS_OUT NamespaceA::A &a);
};
}
class DLL_API HasPrivateVirtualProperty
{
public:
virtual ~HasPrivateVirtualProperty();
private:
virtual int property();
virtual void protectedAbstractMethod() = 0;
virtual void protectedMethod();
virtual int protectedProperty() = 0;
};