user_guide:extend:cpp_type_binding

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
Next revisionBoth sides next revision
reference:cpp_type_binding [2012/03/30 16:25] – created gawrilowreference:cpp_type_binding [2012/03/31 09:27] – [Method generation] gawrilow
Line 13: Line 13:
   ? ''%%builtin => "type_name"%%''   ? ''%%builtin => "type_name"%%''
   :: Tells that the values of this property type are kept as plain perl entities (numbers, strings, anonymous references, ...) without C++ objects lurking in the magic storage, but when such a value is passed to a C++ function, the glue code must be generated as to accept the specified C++ type.  There is a very limited list of property types declared with this attribute, all of them residing in ''apps/common/rules/basic_types''.   :: Tells that the values of this property type are kept as plain perl entities (numbers, strings, anonymous references, ...) without C++ objects lurking in the magic storage, but when such a value is passed to a C++ function, the glue code must be generated as to accept the specified C++ type.  There is a very limited list of property types declared with this attribute, all of them residing in ''apps/common/rules/basic_types''.
-  ? ''%%builtin => enum {%%'' name, ... ''%%}%%''+  ? ''%%builtin => enum { name, ... }%%''
   :: Introduces an enumeration type and named constants.   :: Introduces an enumeration type and named constants.
   ? ''%%builtin => \&sub%%''   ? ''%%builtin => \&sub%%''
Line 30: Line 30:
     * structure constructor for composite types: ''%%new Type(%%''init1, init2, ...''%%)%%''     * structure constructor for composite types: ''%%new Type(%%''init1, init2, ...''%%)%%''
   .. If the C++ class bound to it does not support the corresponding operation, for example, it is lacking the default constructor or the input ''%%operator >>%%'', you should suppress the standard constructors and provide appropriate specializations of ''method construct'' in the [[rulefiles#property_type_scope_definitions|type definition scope]].   .. If the C++ class bound to it does not support the corresponding operation, for example, it is lacking the default constructor or the input ''%%operator >>%%'', you should suppress the standard constructors and provide appropriate specializations of ''method construct'' in the [[rulefiles#property_type_scope_definitions|type definition scope]].
-  ? ''%%fields => [ "%%''name''%%"%%'', ... ''%%]%%''+  ? ''%%fields => [ "name", ... ]%%''
   :: For a composite type, creates methods with given names accessing the members (aka fields of a structure).  The order of the names must correspond to the order of type declarations in the specialization of ''%%pm::spec_object_traits<Type>::elements%%'' .   :: For a composite type, creates methods with given names accessing the members (aka fields of a structure).  The order of the names must correspond to the order of type declarations in the specialization of ''%%pm::spec_object_traits<Type>::elements%%'' .
   ? ''%%operators => "%%''overloaded operators''%%"%%''   ? ''%%operators => "%%''overloaded operators''%%"%%''
  • user_guide/extend/cpp_type_binding.txt
  • Last modified: 2019/01/29 21:46
  • by 127.0.0.1