maxon::String in classic API
C4DS last edited by C4DS
While converting a plugin to R20 I was replacing all
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.
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 ...
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::Stringwas the way to go.
SNHookClass(and thus derived classes) still seem to work with the legacy
Should I refrain from using
maxon::Stringhere and use the legacy
Ogers last edited by Ogers
You probably have declared the String as const String& instead of const maxon::String& in the parent class SNHookClass.
Hope it helped you.
C4DS last edited by
Well, that is what I mean.
The documentation says the classic API has been refactored, but the SNHookClass apparently isn't.
Ogers last edited by
Well I guess that is because the cinema.framework still contains the classic c4d API as mentioned on the Maxon documentation.
s_bach last edited by
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
Stringin your implementation.
As the documentation says,
maxon::Stringwas used wherever possible. Not everywhere.
C4DS last edited by
Thanks for the confirmation
SNHookClassstill using the legacy