Discussion Board

Results 1 to 4 of 4
  1. #1
    Super Contributor deepchand86's Avatar
    Join Date
    Jul 2008
    Location
    Chennai,India
    Posts
    889
    Hi...
    I am little bit confused over the usage of copy constructors in Symbian c++. It is not the same as in General C++.. Since we have a two-phase construction approach how to incorporate them in the copy constructor of a C-class..I think it needs some additional consideration... Am i right?? And also we need to derive the class from CBase..which doesn't provide a virtual copy constructor...

    Could anyone provide me an Insight into this pblm???
    Last edited by deepchand86; 2008-09-05 at 06:30.

  2. #2
    Nokia Developer Moderator skumar_rao's Avatar
    Join Date
    Mar 2004
    Location
    Singapore
    Posts
    9,968
    from Symbian Docs

    Copy constructors lose their "special status" in Symbian OS. Normally only classes with a destructor need copy constructors, and this means C-classes, but C-classes are only instantiated via NewL() and NewLC(). C-classes derive a private copy constructor from CBase, and since any you define are never public, they cannot be called implicitly.

  3. #3
    Super Contributor deepchand86's Avatar
    Join Date
    Jul 2008
    Location
    Chennai,India
    Posts
    889
    So rather than going for Copy constructors..

    I have to write my own piece of code which will suite my C-Class like CObject* Makecopy(CObject&) which returns the newly created object pointer...

  4. #4
    Nokia Developer Moderator skumar_rao's Avatar
    Join Date
    Mar 2004
    Location
    Singapore
    Posts
    9,968
    Yes you got it right.

Similar Threads

  1. make a copy of CFbsBitmap
    By freesui1984 in forum Symbian Media (Closed)
    Replies: 1
    Last Post: 2008-07-22, 09:52
  2. Difference between copy and CnvUtfConverter
    By romcab in forum Symbian C++
    Replies: 3
    Last Post: 2007-11-16, 08:46
  3. Anyone with a nokia 3330? Can anyone help me to copy phone memory to the sim?
    By pabmania in forum General Development Questions
    Replies: 1
    Last Post: 2006-10-29, 22:34
  4. question about copy constructors and operator = ...
    By adamhusar in forum Symbian C++
    Replies: 1
    Last Post: 2006-02-17, 20:00
  5. How to copy ini files from shareddata?
    By vemaka in forum Symbian C++
    Replies: 4
    Last Post: 2005-02-22, 06:50

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Nokia Developer aims to help you create apps and publish them so you can connect with users around the world.

京ICP备05048969号  © Copyright Nokia 2013 All rights reserved