porting code, removing classes & methods

  • Follow


I'm in the process of porting some C++ code from Sun
Solaris to MS Visual C++ and have questions.  The
original main developer had lot's of classes, some of
which never seem to be used (example a bit field
class).  There are also methods in classes that never
seem to be used - there could very well be an STL
class for that, but didn't use the STL for anything,
he even had his own string class<shakes head>.

I don't see a reason to put a lot of effort to port
them.  After talking to some of the other developers
and coming to no real consensus at work, I thought
(while driving home) would leaving the original
method signature in place and putting some dummy code
in that said:
  cerr << " method: int SomeClass::thatMethod(int x, float y) needed"

and return the appropriate data type that wouldn't
be valid (a null pointer).

I don't really like the plan of returning bad data
intentionally (the null pointer), but I also don't
like the plan of porting code that will never get
used (errors can lurk there as well).

-- 
Take care      |   This clown speaks for himself, his job doesn't
Wayne D.       |   pay for this, etc. (directly anyway)

      [ See http://www.gotw.ca/resources/clcm.htm for info about ]
      [ comp.lang.c++.moderated.    First time posters: Do this! ]
0
Reply Wayne 11/15/2003 10:16:16 AM

In article <bp3n33$lpt$1@reader2.panix.com>, Wayne Dernoncourt 
<wayned@panix.com> writes
>I don't see a reason to put a lot of effort to port
>them.  After talking to some of the other developers
>and coming to no real consensus at work, I thought
>(while driving home) would leaving the original
>method signature in place and putting some dummy code
>in that said:
>  cerr << " method: int SomeClass::thatMethod(int x, float y) needed"
>
>and return the appropriate data type that wouldn't
>be valid (a null pointer).

Just provide the declarations and class definitions initially (in 
suitable header files) The linker will quickly tell you which need 
implementing.


-- 
Francis Glassborow      ACCU
If you are not using up-to-date virus protection you should not be reading
this. Viruses do not just hurt the infected but the whole community.


      [ See http://www.gotw.ca/resources/clcm.htm for info about ]
      [ comp.lang.c++.moderated.    First time posters: Do this! ]
0
Reply Francis 11/15/2003 5:22:24 PM


1 Replies
117 Views

(page loaded in 0.309 seconds)

Similiar Articles:













7/26/2012 5:04:51 AM


Reply: