×

Discussion Board

Results 1 to 3 of 3
  1. #1
    Regular Contributor
    Join Date
    Jun 2003
    Posts
    318

    definition of class method outside class body?

    Hi ppl

    I guess i have to apologize to everyone for posting so many questions regarding the WritePermFS1 Example from the SDK.
    Hopefully this is my last one, in the attempt to understand how things work. As u can probably see from my prev questions my understanding of C++ isn't that great either. Okay here goes.

    In the header file Writepermfs1.h I see this section of code:

    class CClassA;
    LOCAL_C void doShow(const TDesC& aHeading,const CClassA& anA);

    class CClassB;
    LOCAL_C void doShow(const TDesC& aHeading,const CClassB& aB);

    class CClassC;
    LOCAL_C void doShow(const TDesC& aHeading,const CClassC& aC);

    class CClassP;
    LOCAL_C void doShow(const TDesC& aHeading,const CClassP& aP);

    class CClassR;
    LOCAL_C void doShow(const TDesC& aHeading,const CClassR& aR);

    class CClassA : public CBase
    {
    public :
    static CClassA* NewL();
    static CClassA* NewLC();
    public :
    ~CClassA();
    void ExternalizeL(RWriteStream& aStream) const;
    void InternalizeL(RReadStream& aStream);
    public :
    HBufC* iVarBuf;
    TInt iIntValue;
    TUint iUintValue;
    };

    My 1st question is whether my following assumptions are correct:

    1) doShow() is an overloaded function,
    2) Because doShow () is not declared within any class body, it is therefore a function of global scope.

    My 2nd and last question is.. how do i find the starting point of the program? i'm used to seeing a main() function, but i don't find anything like that here. The closest thing i can find is the E32Main() function. Is that it? What is E32 anyway?

    Please help me!!!

    -advo-

  2. #2
    Super Contributor
    Join Date
    Mar 2003
    Location
    Beijing
    Posts
    3,609
    1) "doShow()" is an overloaded function although it is not defined in a class.

    "doShow()" is declared as "LOCAL_C" (which is defined as "static" on Symbian OS), meaning that the function can only be used in this .cpp file.


    2) "E32" mean EPOC 32 bit. Symbian OS is a 32-bit operating system. You are right that "E32Main" is the entry point for the EPOC (Symbian OS) application.

    I think you can find a book called "Professional Symbian Programming" from Symbian very useful. The book will tell you more about Symbian OS.

    Liuxg
    Forum Nokia

  3. #3
    Regular Contributor
    Join Date
    Jun 2003
    Posts
    318
    Btw, I do realize that static is typdefed as LOCAL_C , or should i say that it the other way around? What is the purpose anyway? Can we just use static?

    Thanks alot liuxg.. I'll get the symbian book from my college library then.

    -advo-

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×