1typedef struct foo_s /* Foo structure */ 2{ 3 float foo; /* Real number */ 4 int bar; /* Integer */ 5 6 foo_s(float f, int b); 7 ~foo_s(); 8 9 // 'get_bar()' - Get the value of bar. 10 int // O - Value of bar 11 get_bar() 12 { 13 return (bar); 14 } 15 16 // 'get_foo()' - Get the value of foo. 17 float // O - Value of foo 18 get_foo() 19 { 20 return (foo); 21 } 22 23 // 'set_bar()' - Set the value of bar. 24 void 25 set_bar(int b) // I - Value of bar 26 { 27 bar = b; 28 } 29 30 // 'set_foo()' - Set the value of foo. 31 void 32 set_foo(float f) // I - Value of foo 33 { 34 foo = f; 35 } 36} foo_t; 37 38// 'foo_s::foo_s()' - Create a foo_s structure. 39foo_s::foo_s(float f, // I - Value of foo 40 int b) // I - Value of bar 41{ 42 foo = f; 43 bar = b; 44} 45 46// 'foo_s::~foo_s()' - Destroy a foo_s structure. 47foo_s::~foo_s() 48{ 49} 50 51typedef struct foo_private_s /* @private@ */ 52{ 53 int a; /* Value of "a" */ 54 char b[255]; /* Value of "b" */ 55} foo_private_t; 56