2002 2003 2004 <2005> 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 2021 2022 2023 2024 | Index | 2002 2003 2004 <2005> 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 2021 2022 2023 2024 |
<== Date ==> | <== Thread ==> |
---|
Subject: | Re: data access structures, strings |
From: | Andrew Johnson <[email protected]> |
To: | Kay-Uwe Kasemir <[email protected]> |
Cc: | [email protected] |
Date: | Tue, 27 Sep 2005 12:04:12 -0500 |
Kay-Uwe Kasemir wrote:
Use 'assign' instead of 'operator =', 'isEqual' instead of 'operator ==', 'getElement' instead of 'operator []', ... After replacing all operators, I think your suggestion is great.
I already implement assign() and equals(). The operator= operator== and operator+= methods are non-virtual inline wrappers that call those virtual functions, and are provided for user convenience only. I care more about the usability of the class to C++ programmers than that someone would have to tell SWIG to ignore them.
operator[] is not currently implemented in that fashion, but I am willing to do that too (although I don't like your name so I will probably change it).
This conversation reminds me that I was also thinking about creating an implementation that wraps a std::string.
- Andrew -- English probably arose from Normans trying to pick up Saxon girls.