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. Advertising

  2. Ganesh

    Phlip Guest

    Ganesh wrote:

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


    Google for [c++ constructor].

    Then read your tutorial, for a while. C++ is complex, and leaping into the
    code won't work.

    --
    Phlip
    http://www.greencheese.us/ZeekLand <-- NOT a blog!!!
    Phlip, Oct 6, 2006
    #2
    1. Advertising

  3. Ganesh wrote:
    > 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



    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

    "Ganesh" <> wrote in message
    news:...
    > 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


    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. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. JJBW
    Replies:
    1
    Views:
    10,123
    Joerg Jooss
    Apr 24, 2004
  2. Replies:
    1
    Views:
    3,746
    =?Utf-8?B?Q293Ym95IChHcmVnb3J5IEEuIEJlYW1lcikgLSBN
    Sep 19, 2005
  3. curious user

    What is a method signature anyone?

    curious user, Sep 3, 2003, in forum: Java
    Replies:
    9
    Views:
    412
    Seebs
    Sep 7, 2003
  4. lyallex
    Replies:
    6
    Views:
    531
    lyallex
    Sep 29, 2007
  5. Gustavo Narea
    Replies:
    14
    Views:
    860
    Gustavo Narea
    Feb 16, 2009
Loading...

Share This Page