user_guide:extend:clients

Differences

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

Link to this comparison view

Both sides previous revision Previous revision
Last revisionBoth sides next revision
user_guide:extend:clients [2019/03/12 10:47] – [Building and Debugging] gawrilowuser_guide:extend:clients [2021/01/12 15:38] – external edit 127.0.0.1
Line 296: Line 296:
   }   }
  
-Using a cached pointer allows to call function templates without injecting their definition body in the caller source code, so that they can be defined in a different application or bundled extension.  The function may also have several labeled alternative implementations selectable by preference lists.  The cached pointer is automatically following the changes introduced by user commands [[:general#preferences|prefer, prefer_now, and reset_preference]]. +Using a cached pointer allows to call function templates without injecting their definition body in the caller source code, so that they can be defined in a different application or bundled extension.  The function may also have several labeled alternative implementations selectable by preference lists.  The cached pointer is automatically following the changes introduced by user commands [[:user_guide:howto:shell_custom#preferences|prefer, prefer_now, and reset_preference]]. 
  
 There is, however, a restriction posed on the eligible functions: they must not have keyword arguments (perl::OptionSet), arguments with default values or explicit type parameters.  The reason for this restriction is that all this is processed in the perl layer which is bypassed when calling over a pointer. There is, however, a restriction posed on the eligible functions: they must not have keyword arguments (perl::OptionSet), arguments with default values or explicit type parameters.  The reason for this restriction is that all this is processed in the perl layer which is bypassed when calling over a pointer.
Line 303: Line 303:
 ==== Miscellaneous functions ==== ==== Miscellaneous functions ====
   ? ''%%var = perl::get_custom("name")%%''   ? ''%%var = perl::get_custom("name")%%''
-  :: Retrieve the value of a custom variable.  The name argument must start with the perl type designator ''$'', ''@'', or ''%'', matching the type of the custom variable.  The name must be fully qualified (exactly how it appears in the user's file ''customize.pl'').  If the custom variable is of an array or hash map type, the C++ local variable being assigned to must be of type ''perl::ListResult'' resp. ''perl::OptionSet''.+  :: Retrieve the value of a custom variable.  The name must be fully qualified with the package name unless it's defined in the package of the same application as this code belongs to.  If the custom variable is of an array or hash map type, the C++ local variable being assigned to must be of type ''perl::ListResult'' resp. ''perl::OptionSet''.
   ? ''%%var = perl::get_custom("name", "key")%%''   ? ''%%var = perl::get_custom("name", "key")%%''
   :: Retrieve the value of an element of a custom hash map variable.   :: Retrieve the value of an element of a custom hash map variable.
Line 419: Line 419:
   (gdb) call M.dump()   (gdb) call M.dump()
 The output goes to ''stderr'', thus be sure not to redirect it (polymake never does it on its own). The output goes to ''stderr'', thus be sure not to redirect it (polymake never does it on its own).
 +
  • user_guide/extend/clients.txt
  • Last modified: 2021/06/17 06:43
  • by oberlaender