Method signature in C++

Discussion in 'C++' started by Ganesh, Oct 6, 2006.

  1. Ganesh

    Ganesh Guest

    Hi

    I am new to C++. I have found a method written like as below.

    FdoMySqlSchemaManager::FdoMySqlSchemaManager(GdbiConnection*
    connection, FdoStringP mqlSchemaName) :
    FdoGrdSchemaManager( connection ),
    mMySqlSchemaName(mqlSchemaName)
    {
    }

    What does this ":" mean here and what does this method's signature mean
    ??

    can anyone help me..

    thanks in advance

    Ganesh
     
    Ganesh, Oct 6, 2006
    #1
    1. Advertisements

  2. Ganesh

    Phlip Guest

    Google for [c++ constructor].

    Then read your tutorial, for a while. C++ is complex, and leaping into the
    code won't work.
     
    Phlip, Oct 6, 2006
    #2
    1. Advertisements


  3. Hi Ganesh,

    FdoMySqlSchemaManager::FdoMySqlSchemaManager(GdbiConnection*
    connection, FdoStringP mqlSchemaName) :
    FdoGrdSchemaManager( connection ),
    mMySqlSchemaName(mqlSchemaName)

    is a constructor of the class FdoMySqlSchemaManager and is passing the
    parameter conection to its parent class FdoGrdSchemaManager and is
    setting the value of the member variable mMySqlSchemaName to that of
    the parameter mqlSchemaName.
    mMySqlSchemaName could also have been a parent class but I'm assuming
    it is a member variable as it has 'm' prefixed.

    Regards,
    Abhishek Srivastava
     
    Abhishek Srivastava, Oct 6, 2006
    #3
  4. Ganesh

    Jim Langston Guest

    Google or read up on "Initialization list". FdoGrdSchemaManager and
    mMySqlSchemaName are being initalized by the values in parenthesis, which
    are passed to the constructor.

    As for the signature, the constructor takes a GdbiConnection pointer and an
    FdoStringP and returns nothing (constructors don't return values)
     
    Jim Langston, Oct 7, 2006
    #4
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.