Method signature in C++

G

Ganesh

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
 
P

Phlip

Ganesh said:
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.
 
A

Abhishek Srivastava

Ganesh said:
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
 
J

Jim Langston

Ganesh said:
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)
 

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. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,576
Members
45,054
Latest member
LucyCarper

Latest Threads

Top