Class Builder does not handle the C++ qualifier volatile for (member) variables and member function specifications and parameter declarations.
It should be handled like const since in C++ volatile is a qualifier as is const.
While there is a hack for parameters, function results and variables including member variables via declaring a type volatile xy in the Other Types section, this does not work for volatile and const volatile member functions. A similar hack for volatile member functions via the calling convention of a member function is not possiblevolatile is a qualifier like const and not a modifier like calling conventions!
res_type volatile MyClas::dummy();
// this is produced by class builder when "call conv is volatile"
// it is not equivalent to
res_type MyClass::dummy()volatile;
// that is a declaration of a volatile meber function
Note: This posting is based on a mail from me to Jimmy Venema and his reply where he advised me to post it to the forum. (see below quoate of replay by Jimmy Venema):
QUOTE STARTS HERE
You can handle it by introducing additional types e.g. 'volatile int' as other type. This additional type can be used as argument member etc. The signature of the methods can be altered via the calling convention option.[...]
QUOTE ENDS HERE
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I added some minor extensions to your code:
volatile for member
volatile for member function
union (like your struct option for classes)
are you interested in the code?
I plan to add also the following extension:
member types:
that is:
* typedefs (possibly templatized)
* enums (possibly templatized)
* nested named class types (class, struct, union)
* anonymous union support (maybe)
The last (anon. unions) are likely to require a change of the existing class hierarchy by introducing a class CompositeType between Type and BaseClass in the Inheritance hierarchy. This class would get the member stuff of BaseClass, while BaseClass contains the MemberFunction stuff.
all names nested class types I simply plan to add as a forward declaration, while the nested class is handled as it could be handled now via a class with the fully qulifuied named (except the namespace)
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Class Builder does not handle the C++ qualifier volatile for (member) variables and member function specifications and parameter declarations.
It should be handled like const since in C++ volatile is a qualifier as is const.
While there is a hack for parameters, function results and variables including member variables via declaring a type volatile xy in the Other Types section, this does not work for volatile and const volatile member functions. A similar hack for volatile member functions via the calling convention of a member function is not possiblevolatile is a qualifier like const and not a modifier like calling conventions!
res_type volatile MyClas::dummy();
// this is produced by class builder when "call conv is volatile"
// it is not equivalent to
res_type MyClass::dummy()volatile;
// that is a declaration of a volatile meber function
Note: This posting is based on a mail from me to Jimmy Venema and his reply where he advised me to post it to the forum. (see below quoate of replay by Jimmy Venema):
QUOTE STARTS HERE
You can handle it by introducing additional types e.g. 'volatile int' as other type. This additional type can be used as argument member etc. The signature of the methods can be altered via the calling convention option.[...]
QUOTE ENDS HERE
I added some minor extensions to your code:
volatile for member
volatile for member function
union (like your struct option for classes)
are you interested in the code?
I plan to add also the following extension:
member types:
that is:
* typedefs (possibly templatized)
* enums (possibly templatized)
* nested named class types (class, struct, union)
* anonymous union support (maybe)
The last (anon. unions) are likely to require a change of the existing class hierarchy by introducing a class CompositeType between Type and BaseClass in the Inheritance hierarchy. This class would get the member stuff of BaseClass, while BaseClass contains the MemberFunction stuff.
all names nested class types I simply plan to add as a forward declaration, while the nested class is handled as it could be handled now via a class with the fully qulifuied named (except the namespace)