Logo Search packages:      
Sourcecode: camlidl version File versions  Download package

structs.idl

/* Structs, unions and typedefs */

00003 struct s1 {
  int x;
  double d;
  float f;
  long l[3];
};

int foo0([in] struct s1 s);

int foo1([in] struct s1 * s);

void foo2([out] struct s1 * s);

00016 typedef struct {
  int x;
  struct { int y; int z; } t;
  double d;
} t;

int foo3([in] t * s);

00024 struct s2 {
  int n;
  [size_is(n)] long l[];
};

int foo4([in] struct s2 * s);

void foo5([out] struct s2 * s);

00033 struct s4 {
  float x, y, z;
};

int foo6([in] struct s4 * s);
void foo7([out] struct s4 * s);

// Forward declarations

struct s5;

00044 struct s6 {
  int info;
  [unique] struct s5 * next;
};

00049 struct s5 {
  int count;
  [unique] struct s6 * data;
};

// Unions

enum switchtype { FLOAT_ARRAY  = 1, DOUBLE_ARRAY = 2, OTHER = 3 };

00058 struct su1
{
    int len;
    enum switchtype type;
    [switch_is(type)] union
    {         
      case FLOAT_ARRAY: [size_is(len)] float* fl;
      case DOUBLE_ARRAY: [size_is(len)] double* db;
        case OTHER: struct { int len2; [size_is(len2)] int* c; } i;
    } data;
};


Generated by  Doxygen 1.6.0   Back to index