|
|
porting code, removing classes & methods
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: Problem in porting from 32 bit to 64 bit application - comp.os.ms ...... loss of data 2) Without removing the ... stream class video capture minidriver porting to windows 7 X64 ... ... Porting 32-Bit Code to 64-Bit Code - Microsoft ... Numeric Integration Methods - comp.sys.hp48... written such a set of programs to use in class ... If someone had some working source > code, I'd be happy to try porting it ... comp.soft-sys.matlab Numeric Integration Methods ... NetBeans jList Add/Clear Items - comp.lang.java.guiCODE: public void RefreshQuestionList ... your question: namely, there's no methods clear() or addElement() in the JList class. ... Removing an item from a Jlist - comp.lang ... Misuses of RTTI - comp.lang.c++.moderated... language, You could also argue that it is the worst way to port spaghetti-code ... pretty much has to torture information about a class's methods from a class ... code speed moving from fortran 77 compiler to f2003 compiler ...There is a class of program bugs which tend not to draw enough attention to ... > I have tried to port the code to IVF in the past but have run > into trouble with the ... Help with JList and JComboBox - comp.lang.java.gui... import javax.swing.*; class ... fahdshariff.cjb.net > "Let the code do the talking... " I tried all focus and listener methods ... Removing an item from a Jlist - comp ... tuple and brace initializer - why not - comp.lang.c++.moderated ...Hi, compiling the following code with gcc ... connection -- i.e., (from, to, port)-tuple. ... Tuple Class (System) Provides static methods for creating tuple objects. ... Swing uses bad features - comp.lang.java.guiNormally a class's methods are written > assuming ... each one > sees a complete parent class instance, and no code is ... top uses for ... de, PGP: BB465582 How to remove ... Tcl code encryption best practice -- Please help - comp.lang.tcl ...Porting Mathlab code to C++ - accuracy problem - comp.soft-sys ... ... debug interface - comp.arch.embedded Methods of ... How to remove all subdirectory/file under current ... NTLM Authorization issue - comp.lang.java.programmer... info, could you by chance point me to a code snippet>that uses this class ... an option for us?I discus two different methods ... is not working. Proxy is 172.16.0.1 with port C#: Coding With Anonymous Methods, Iterators, And Partial ClassesC# 1.0 requires you to put all the code for a class in a single file. C# 2.0 ... Delegates provide operators and methods for adding and removing target methods, and are ... Using Static Classes and Methods - Microsoft Corporation: Software ...Removing Objects from the Pipeline (Where-Object) ... Add code samples and tips to enhance this topic. ... Classes and methods such as these are called static classes ... 7/26/2012 5:04:51 AM
|
|
|
|
|
|
|
|
|