From 849302913f0e2da9e20f93d9daa6f4aa00f007b7 Mon Sep 17 00:00:00 2001 From: Simon Marchetto Date: Fri, 21 Mar 2014 16:54:19 +0100 Subject: [PATCH] scilab: fix doc on structs & classes --- Doc/Manual/Scilab.html | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/Doc/Manual/Scilab.html b/Doc/Manual/Scilab.html index e46e5a461..165f44667 100644 --- a/Doc/Manual/Scilab.html +++ b/Doc/Manual/Scilab.html @@ -600,8 +600,12 @@ we only need a real value instead.

-A C structure is wrapped through a pointer and getter and setter functions for access to the member variables. -For example of a struct with two members: +A C structure is wrapped through low-level accessor functions, i.e. functions that give access to the member variables of this structure. +In Scilab, a structure is manipulated through a pointer which is passed as argument of the accessor functions. +

+ +

+Let's see it on an example of a struct with two members:

@@ -620,7 +624,7 @@ typedef struct {
 

Several functions are generated:

    -
  • a creation function new_Foo() which returns a pointer to a new created struct Foo.
  • +
  • the creation function new_Foo() which returns a pointer to a new created struct Foo.
  • the two getter functions Foo_x_get(), Foo_arr_get(), to get the values of x and y for the struct pointer given in parameter
  • the two setter functions Foo_x_set(), Foo_arr_set(), to set the values of x and y for the struct pointer given in parameter.
  • a destruction function delete_Foo() to release the struct pointer.
  • @@ -689,10 +693,16 @@ ans =

    37.3.8 C++ Classes

    -The classes are wrapped the way as structs, through functions. For example, the following class: +The classes are wrapped the same way as structs. +Low-level accessor functions are generated for class members. +Also, constructor and destructor functions are generated to create and destroy an instance of the class.

    -
    +

    +For example, the following class: +

    + +
     %module example
     
     %inline %{