Back to index

cell-binutils  2.17cvs20070401
Public Member Functions | Static Public Member Functions | Private Attributes | Static Private Attributes
Foo Class Reference

#include <cdtest-foo.h>

List of all members.

Public Member Functions

 Foo ()
 Foo (const char *message)
 Foo (const Foo &)
Foooperator= (const Foo &)
 ~Foo ()
 Foo ()
 Foo (const char *message)
 Foo (const Foo &)
Foooperator= (const Foo &)
 ~Foo ()

Static Public Member Functions

static void init_foo ()
static int nb_foos ()
static void init_foo ()
static int nb_foos ()

Private Attributes

int i
char message [len]

Static Private Attributes

static int foos = 0
static const int len = FOO_MSG_LEN

Detailed Description

Definition at line 11 of file cdtest-foo.h.


Constructor & Destructor Documentation

Foo::Foo ( )

Definition at line 30 of file cdtest-foo.cc.

{
    i = ++foos;
    strncpy (message, "default-foo", len);
#ifdef WITH_ADDR
    printf ("Constructing Foo(%d) \"default-foo\" at %08x\n", i, this);
#else
    printf ("Constructing Foo(%d) \"default-foo\"\n", i);
#endif
}

Here is the call graph for this function:

Foo::Foo ( const char *  message)

Definition at line 41 of file cdtest-foo.cc.

{
    i = ++foos;
    strncpy( message, msg, len);
#ifdef WITH_ADDR
    printf ( "Constructing Foo(%d) \"%s\" at %08x\n", i, message, this);
#else
    printf ( "Constructing Foo(%d) \"%s\"\n", i, message);
#endif
}

Here is the call graph for this function:

Foo::Foo ( const Foo foo)

Definition at line 53 of file cdtest-foo.cc.

{
    i = ++foos;
#ifdef WITH_ADDR
    printf ("Initializing Foo(%d) \"%s\" at %08x with Foo(%d) %08x\n", 
           i, foo.message, this, foo.i, &foo);
#else
   printf ("Initializing Foo(%d) \"%s\" with Foo(%d)\n",i, foo.message, foo.i);
#endif
    for ( int k = 0; k < FOO_MSG_LEN; k++) message[k] = foo.message[k];
}

Here is the call graph for this function:

Foo::~Foo ( )

Definition at line 79 of file cdtest-foo.cc.

{
    foos--;
#ifdef WITH_ADDR
    printf ("Destructing Foo(%d) \"%s\" at %08x (remaining foos: %d)\n",
           i, message, this, foos);
#else
    printf ("Destructing Foo(%d) \"%s\" (remaining foos: %d)\n",
           i, message, foos);
#endif
}

Here is the call graph for this function:

Foo::Foo ( )
Foo::Foo ( const char *  message)
Foo::Foo ( const Foo )
Foo::~Foo ( )

Member Function Documentation

static void Foo::init_foo ( ) [static]
void Foo::init_foo ( ) [static]

Definition at line 23 of file cdtest-foo.cc.

{
    printf ("BROKENLY calling Foo::init_foo from __init_start; size_of(Foo) = %ld\n", (long) sizeof(Foo));
    foos = FOOLISH_NUMBER;
}

Here is the call graph for this function:

Here is the caller graph for this function:

static int Foo::nb_foos ( ) [inline, static]

Definition at line 12 of file sr3.cc.

{ return foos; }
static int Foo::nb_foos ( ) [inline, static]

Definition at line 18 of file cdtest-foo.h.

{ return foos; }

Here is the caller graph for this function:

Foo & Foo::operator= ( const Foo foo)

Definition at line 66 of file cdtest-foo.cc.

{
#ifdef WITH_ADDR
    printf ("Copying Foo(%d) \"%s\" at %08x to Foo(%d) %08x\n", 
           foo.i, foo.message, &foo, i, this);
#else
   printf ("Copying Foo(%d) \"%s\" to Foo(%d)\n", foo.i, foo.message, i);
#endif
    for ( int k = 0; k < FOO_MSG_LEN; k++) message[k] = foo.message[k];
    return *this;
}

Here is the call graph for this function:


Member Data Documentation

int Foo::foos = 0 [static, private]

Definition at line 12 of file cdtest-foo.h.

int Foo::i [private]

Definition at line 13 of file cdtest-foo.h.

static const int Foo::len = FOO_MSG_LEN [static, private]

Definition at line 14 of file cdtest-foo.h.

char Foo::message [private]

Definition at line 15 of file cdtest-foo.h.


The documentation for this class was generated from the following files: