Skip to content

Commit 1710202

Browse files
committed
Add Method.IsVolatile property.
Fixes #1761
1 parent 99a5ed3 commit 1710202

File tree

15 files changed

+124
-3
lines changed

15 files changed

+124
-3
lines changed

src/AST/Method.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,10 +94,12 @@ public Method(Method method)
9494
{
9595
Access = method.Access;
9696
IsVirtual = method.IsVirtual;
97+
IsStatic = method.IsStatic;
9798
IsConst = method.IsConst;
99+
IsExplicit = method.IsExplicit;
100+
IsVolatile = method.IsVolatile;
98101
IsFinal = method.IsFinal;
99102
IsProxy = method.IsProxy;
100-
IsStatic = method.IsStatic;
101103
Kind = method.Kind;
102104
IsDefaultConstructor = method.IsDefaultConstructor;
103105
IsCopyConstructor = method.IsCopyConstructor;
@@ -119,6 +121,7 @@ public Method(Function function)
119121
public bool IsStatic { get; set; }
120122
public bool IsConst { get; set; }
121123
public bool IsExplicit { get; set; }
124+
public bool IsVolatile { get; set; }
122125

123126
public bool IsOverride
124127
{

src/CppParser/AST.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -674,6 +674,7 @@ Method::Method()
674674
, isStatic(false)
675675
, isConst(false)
676676
, isExplicit(false)
677+
, isVolatile(false)
677678
, isDefaultConstructor(false)
678679
, isCopyConstructor(false)
679680
, isMoveConstructor(false)

src/CppParser/Bindings/CLI/Decl.cpp

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2028,6 +2028,16 @@ void CppSharp::Parser::AST::Method::IsExplicit::set(bool value)
20282028
((class ::CppSharp::CppParser::AST::Method*)NativePtr)->isExplicit = value;
20292029
}
20302030

2031+
bool CppSharp::Parser::AST::Method::IsVolatile::get()
2032+
{
2033+
return ((class ::CppSharp::CppParser::AST::Method*)NativePtr)->isVolatile;
2034+
}
2035+
2036+
void CppSharp::Parser::AST::Method::IsVolatile::set(bool value)
2037+
{
2038+
((class ::CppSharp::CppParser::AST::Method*)NativePtr)->isVolatile = value;
2039+
}
2040+
20312041
CppSharp::Parser::AST::CXXMethodKind CppSharp::Parser::AST::Method::MethodKind::get()
20322042
{
20332043
return (CppSharp::Parser::AST::CXXMethodKind)((class ::CppSharp::CppParser::AST::Method*)NativePtr)->methodKind;

src/CppParser/Bindings/CLI/Decl.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1120,6 +1120,12 @@ namespace CppSharp
11201120
void set(bool);
11211121
}
11221122

1123+
property bool IsVolatile
1124+
{
1125+
bool get();
1126+
void set(bool);
1127+
}
1128+
11231129
property CppSharp::Parser::AST::CXXMethodKind MethodKind
11241130
{
11251131
CppSharp::Parser::AST::CXXMethodKind get();

src/CppParser/Bindings/CSharp/i686-apple-darwin12.4.0/CppSharp.CppParser.cs

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9350,7 +9350,7 @@ public uint ParametersCount
93509350

93519351
public unsafe partial class Method : global::CppSharp.Parser.AST.Function, IDisposable
93529352
{
9353-
[StructLayout(LayoutKind.Sequential, Size = 372)]
9353+
[StructLayout(LayoutKind.Sequential, Size = 376)]
93549354
public new partial struct __Internal
93559355
{
93569356
internal global::CppSharp.Parser.AST.DeclarationKind kind;
@@ -9410,6 +9410,7 @@ public unsafe partial class Method : global::CppSharp.Parser.AST.Function, IDisp
94109410
internal byte isStatic;
94119411
internal byte isConst;
94129412
internal byte isExplicit;
9413+
internal byte isVolatile;
94139414
internal global::CppSharp.Parser.AST.CXXMethodKind methodKind;
94149415
internal byte isDefaultConstructor;
94159416
internal byte isCopyConstructor;
@@ -9592,6 +9593,19 @@ public bool IsExplicit
95929593
}
95939594
}
95949595

9596+
public bool IsVolatile
9597+
{
9598+
get
9599+
{
9600+
return ((__Internal*)__Instance)->isVolatile != 0;
9601+
}
9602+
9603+
set
9604+
{
9605+
((__Internal*)__Instance)->isVolatile = (byte) (value ? 1 : 0);
9606+
}
9607+
}
9608+
95959609
public global::CppSharp.Parser.AST.CXXMethodKind MethodKind
95969610
{
95979611
get

src/CppParser/Bindings/CSharp/i686-pc-win32-msvc/CppSharp.CppParser.cs

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9350,7 +9350,7 @@ public uint ParametersCount
93509350

93519351
public unsafe partial class Method : global::CppSharp.Parser.AST.Function, IDisposable
93529352
{
9353-
[StructLayout(LayoutKind.Sequential, Size = 440)]
9353+
[StructLayout(LayoutKind.Sequential, Size = 444)]
93549354
public new partial struct __Internal
93559355
{
93569356
internal global::CppSharp.Parser.AST.DeclarationKind kind;
@@ -9410,6 +9410,7 @@ public unsafe partial class Method : global::CppSharp.Parser.AST.Function, IDisp
94109410
internal byte isStatic;
94119411
internal byte isConst;
94129412
internal byte isExplicit;
9413+
internal byte isVolatile;
94139414
internal global::CppSharp.Parser.AST.CXXMethodKind methodKind;
94149415
internal byte isDefaultConstructor;
94159416
internal byte isCopyConstructor;
@@ -9592,6 +9593,19 @@ public bool IsExplicit
95929593
}
95939594
}
95949595

9596+
public bool IsVolatile
9597+
{
9598+
get
9599+
{
9600+
return ((__Internal*)__Instance)->isVolatile != 0;
9601+
}
9602+
9603+
set
9604+
{
9605+
((__Internal*)__Instance)->isVolatile = (byte) (value ? 1 : 0);
9606+
}
9607+
}
9608+
95959609
public global::CppSharp.Parser.AST.CXXMethodKind MethodKind
95969610
{
95979611
get

src/CppParser/Bindings/CSharp/x86_64-apple-darwin12.4.0/CppSharp.CppParser.cs

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9410,6 +9410,7 @@ public unsafe partial class Method : global::CppSharp.Parser.AST.Function, IDisp
94109410
internal byte isStatic;
94119411
internal byte isConst;
94129412
internal byte isExplicit;
9413+
internal byte isVolatile;
94139414
internal global::CppSharp.Parser.AST.CXXMethodKind methodKind;
94149415
internal byte isDefaultConstructor;
94159416
internal byte isCopyConstructor;
@@ -9592,6 +9593,19 @@ public bool IsExplicit
95929593
}
95939594
}
95949595

9596+
public bool IsVolatile
9597+
{
9598+
get
9599+
{
9600+
return ((__Internal*)__Instance)->isVolatile != 0;
9601+
}
9602+
9603+
set
9604+
{
9605+
((__Internal*)__Instance)->isVolatile = (byte) (value ? 1 : 0);
9606+
}
9607+
}
9608+
95959609
public global::CppSharp.Parser.AST.CXXMethodKind MethodKind
95969610
{
95979611
get

src/CppParser/Bindings/CSharp/x86_64-linux-gnu-cxx11abi/CppSharp.CppParser.cs

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9410,6 +9410,7 @@ public unsafe partial class Method : global::CppSharp.Parser.AST.Function, IDisp
94109410
internal byte isStatic;
94119411
internal byte isConst;
94129412
internal byte isExplicit;
9413+
internal byte isVolatile;
94139414
internal global::CppSharp.Parser.AST.CXXMethodKind methodKind;
94149415
internal byte isDefaultConstructor;
94159416
internal byte isCopyConstructor;
@@ -9592,6 +9593,19 @@ public bool IsExplicit
95929593
}
95939594
}
95949595

9596+
public bool IsVolatile
9597+
{
9598+
get
9599+
{
9600+
return ((__Internal*)__Instance)->isVolatile != 0;
9601+
}
9602+
9603+
set
9604+
{
9605+
((__Internal*)__Instance)->isVolatile = (byte) (value ? 1 : 0);
9606+
}
9607+
}
9608+
95959609
public global::CppSharp.Parser.AST.CXXMethodKind MethodKind
95969610
{
95979611
get

src/CppParser/Bindings/CSharp/x86_64-linux-gnu/CppSharp.CppParser.cs

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9410,6 +9410,7 @@ public unsafe partial class Method : global::CppSharp.Parser.AST.Function, IDisp
94109410
internal byte isStatic;
94119411
internal byte isConst;
94129412
internal byte isExplicit;
9413+
internal byte isVolatile;
94139414
internal global::CppSharp.Parser.AST.CXXMethodKind methodKind;
94149415
internal byte isDefaultConstructor;
94159416
internal byte isCopyConstructor;
@@ -9592,6 +9593,19 @@ public bool IsExplicit
95929593
}
95939594
}
95949595

9596+
public bool IsVolatile
9597+
{
9598+
get
9599+
{
9600+
return ((__Internal*)__Instance)->isVolatile != 0;
9601+
}
9602+
9603+
set
9604+
{
9605+
((__Internal*)__Instance)->isVolatile = (byte) (value ? 1 : 0);
9606+
}
9607+
}
9608+
95959609
public global::CppSharp.Parser.AST.CXXMethodKind MethodKind
95969610
{
95979611
get

src/CppParser/Bindings/CSharp/x86_64-pc-win32-msvc/CppSharp.CppParser.cs

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9410,6 +9410,7 @@ public unsafe partial class Method : global::CppSharp.Parser.AST.Function, IDisp
94109410
internal byte isStatic;
94119411
internal byte isConst;
94129412
internal byte isExplicit;
9413+
internal byte isVolatile;
94139414
internal global::CppSharp.Parser.AST.CXXMethodKind methodKind;
94149415
internal byte isDefaultConstructor;
94159416
internal byte isCopyConstructor;
@@ -9592,6 +9593,19 @@ public bool IsExplicit
95929593
}
95939594
}
95949595

9596+
public bool IsVolatile
9597+
{
9598+
get
9599+
{
9600+
return ((__Internal*)__Instance)->isVolatile != 0;
9601+
}
9602+
9603+
set
9604+
{
9605+
((__Internal*)__Instance)->isVolatile = (byte) (value ? 1 : 0);
9606+
}
9607+
}
9608+
95959609
public global::CppSharp.Parser.AST.CXXMethodKind MethodKind
95969610
{
95979611
get

0 commit comments

Comments
 (0)