Client-Side Slice-to-MATLAB Mapping
The client-side Slice-to-MATLAB mapping defines how Slice data types are translated to MATLAB types, and how clients invoke operations, pass parameters, and handle errors. Much of the MATLAB mapping is intuitive. For example, Slice sequences map to MATLAB arrays, so there is essentially nothing new you have to learn in order to use Slice sequences in MATLAB.
Much of what appears in this chapter is reference material. We suggest that you skim the material on the initial reading and refer back to specific sections as needed. However, we recommend that you read at least the mappings for exceptions, interfaces, and operations in detail because these sections cover how to call operations from a client, pass parameters, and handle exceptions.
The Ice
Module
All of the APIs for the Ice run time are nested in the Ice
package, to avoid clashes with definitions for other libraries or applications. Some of the contents of the Ice
package are generated from Slice definitions; other parts of the Ice
package provide special-purpose definitions that do not have a corresponding Slice definition. We will incrementally cover the contents of the Ice
package throughout the remainder of the chapter.
A MATLAB application can load the Ice run time using the loadlibrary
function:
loadlibrary('ice', @iceproto);
or
loadlibrary('ice'); % requires a C/C++ compiler to build the generated "thunk" library
If the function executes without error, the Ice run time is loaded and available for use. You can determine the version of the Ice run time you have just loaded by calling the stringVersion
function:
icever = Ice.stringVersion();
Topics
- MATLAB Mapping for Identifiers
- MATLAB Mapping for Modules
- MATLAB Mapping for Basic Types
- MATLAB Mapping for Enumerations
- MATLAB Mapping for Constants
- MATLAB Mapping for Structures
- MATLAB Mapping for Classes
- MATLAB Mapping for Sequences
- MATLAB Mapping for Dictionaries
- MATLAB Mapping for Exceptions
- MATLAB Mapping for Interfaces
- MATLAB Mapping for Operations
- Asynchronous Method Invocation (AMI) in MATLAB
- slice2matlab Command-Line Options
- Example of a File System Client in MATLAB