Your browser does not seem to support JavaScript. As a result, your viewing experience will be diminished, and you have been placed in read-only mode.
Please download a browser that supports JavaScript, or enable it if it's disabled (i.e. NoScript).
While converting a plugin to R20 I was replacing all String occurrences with maxon::String. However, I encountered some issue when compiling. Maybe I am just not understanding the conversion process correctly? As such, I didn't add tags for "bug report", "issue", "API" ... feel free to add the required once.
String
maxon::String
As far as I am aware I am still using the classic API for most of the plugin structure, but am using the MAXON API for the new datastructures. maxon::BasseArray::Append, for instance, requires the use of the new error system, etc ...
maxon::BasseArray::Append
According to
Using new Data Types The MAXON API introduces new data types and replaces or extends classic data types: The new maxon::String class is the base class of the classic String class. To declare a string literal as a maxon::String one can use the "_s" qualifier. The classic API has been refactured to use maxon::String wherever possible. ...
From reading the last sentence, I was assuming converting to maxon::String was the way to go. However, the SNHookClass (and thus derived classes) still seem to work with the legacy String
SNHookClass
Should I refrain from using maxon::String here and use the legacy String instead?
You probably have declared the String as const String& instead of const maxon::String& in the parent class SNHookClass. Hope it helped you.
Well, that is what I mean. The documentation says the classic API has been refactored, but the SNHookClass apparently isn't.
Well I guess that is because the cinema.framework still contains the classic c4d API as mentioned on the Maxon documentation.
Hello,
if you implement a function of a sub-class, the function signature must match the function declaration in the base class. So if the base class is using String, you must use String in your implementation.
As the documentation says, maxon::String was used wherever possible. Not everywhere.
best wishes, Sebastian
Thanks for the confirmation SNHookClass still using the legacy String.