/home/dko/projects/mobilec/trunk/src/mxml-2.2.2/test/class.cxx

Go to the documentation of this file.
00001 class foo_c : public bar_c              // Foo class derived from bar
00002 {
00003   float foo;                            /* Real number */
00004   int   bar;                            /* Integer */
00005 
00006   public:
00007 
00008   foo_c(float f, int b);
00009   ~foo_c();
00010 
00011   // 'get_bar()' - Get the value of bar.
00012   int // O - Value of bar
00013   get_bar()
00014   {
00015     return (bar);
00016   }
00017 
00018   // 'get_foo()' - Get the value of foo.
00019   float // O - Value of foo
00020   get_foo()
00021   {
00022     return (foo);
00023   }
00024 
00025   // 'set_bar()' - Set the value of bar.
00026   void
00027   set_bar(int b) // I - Value of bar
00028   {
00029     bar = b;
00030   }
00031 
00032   // 'set_foo()' - Set the value of foo.
00033   void
00034   set_foo(float f) // I - Value of foo
00035   {
00036     foo = f;
00037   }
00038 
00039   // 'set_foobar()' - Set foo and optionally bar (should show default args).
00040   void
00041   set_foobar(float f, // I - Value of foo
00042              int b = 0) // I - Value of bar
00043   {
00044     foo = f;
00045     bar = b;
00046   }
00047 
00048   protected:
00049 
00050   static int global;                    /* Global integer */
00051 
00052   // 'get_global()' - Get the global integer.
00053   int // O - Integer
00054   get_global()
00055   {
00056     return (global);
00057   }
00058 
00059   private:
00060 
00061   int barfoo; // Another private integer
00062 
00063   public: 
00064 
00065   // 'get_barfoo()' - Get the barfoo value.
00066   int // O - Barfoo value
00067   get_barfoo()
00068   {
00069     return (barfoo);
00070   }
00071 }
00072 
00073 // 'foo_c::foo_c()' - Create a foo_c class.
00074 foo_c::foo_c(float f, int b)
00075 {
00076   foo = f;
00077   bar = b;
00078 }
00079 
00080 // 'foo_c::~foo_c()' - Destroy a foo_c class.
00081 foo_c::~foo_c()
00082 {
00083 }

Generated on Fri May 16 14:49:55 2008 for Mobile-C by  doxygen 1.5.4