[jira] Closed: (TUSCANY-1376) C++ SDO spec portability: RefCountingPointer
[ https://issues.apache.org/jira/browse/TUSCANY-1376?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Michael Yoder closed TUSCANY-1376. -- Resolution: Fixed Resolved with applied patches. > C++ SDO spec portability: RefCountingPointer > > > Key: TUSCANY-1376 > URL: https://issues.apache.org/jira/browse/TUSCANY-1376 > Project: Tuscany > Issue Type: Bug > Components: C++ SDO, C++ Specification >Affects Versions: Cpp-M3 > Environment: all platforms >Reporter: Michael Yoder > Fix For: Cpp-Next > > Attachments: TUSCANY-1376.txt, TUSCANY-1376v2.txt > > > Tuscany C++ SDO class RefCounting pointer has the member function: > operator T*() {return pointee;} > which expose the raw dumb pointer for SDO classes (for the common use of > smart pointers). This member function is used by SCA, and raises undesirable > object lifetime and allowed operation issues. The member function should be > replaced with a safe (referenced in the below -email thread) conversion to > bool member function. > -Original Message- > From: Pete Robbins [mailto:[EMAIL PROTECTED] > Sent: Friday, June 22, 2007 6:16 AM > To: tuscany-dev@ws.apache.org > Subject: Re: C++ SDO spec portability: RefCountingPointer > Michael, I strongly suspect that the operator T*() ws put in for a good > reason. It may be a good idea to remove this but it may be non-trivial. > The ostream operator << is very useful and there is a default implementation > in RefCountingObject so that objects inheriting from RefCounting object do > not need to implement anything... but they can if appropriate. > You are raising a lot if issues which is great and it would be excellent to > get Tuscany SDO up to 2.1 spec level. I suspect there will be hundreds of > issues some of which may require large re-writes/refactoring of the Tuscany > SDO Code!! Raising these as Jiras is the best thing to do so we can track > them. Helping fix them by submitting patches would be even better ;-) > Cheers, > On 22/06/07, Michael Yoder <[EMAIL PROTECTED]> wrote: > > > > Hi, > > > > In looking at C++ SDO portabilty, we found the the Tuscany C++ SDO > > class RefCountingPointer has functions used externally by SCA: > > > >operator T*() {return pointee;} > >friend std::ostream& operator<< (std::ostream &os, const > > RefCountingPointer& ptr) > > > > It looks like the conversion to T* function may have been put in > > originally as a porting alternative to a member function template, but > > may not be needed any more since the member template is now included > > outside the #ifdef. > > > > Exposing the dumb pointer is undesirable since it raises object > > lifetime issues and allows other unwanted operations. Having a > > conversion to bool is convenient however, and can be implemented > > safely using a member function pointer trick (see: > > http://www.artima.com/cppsource/safebool.html). > > > > The shift operator also seems undesireable since it places a burden on > > all classes which use smart pointers to implement toString > > functionality. > > > > How does it sound to raise a Jira to have these member functions > > removed? > > > > Thanks, > > Michael Yoder > > Rogue Wave Software - [EMAIL PROTECTED] Software Developer - > > HydraSDO > > > > - > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > -- > Pete -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: FW: [jira] Updated: (TUSCANY-1376) C++ SDO spec portability: RefCountingPointer
Patch applied. Thanks for that... and for taking care of the affected SCA source. Cheers, On 08/08/2007, Michael Yoder <[EMAIL PROTECTED]> wrote: > Hi Pete, > > I uploaded an updated patch for TUSCANY-1376 to address the windows > compilation issue. > > Michael > Rogue Wave Software, Inc. - [EMAIL PROTECTED] Software Developer - > HydraSDO > > -Original Message- > From: Michael Yoder (JIRA) [mailto:[EMAIL PROTECTED] > Sent: Wednesday, August 08, 2007 9:43 AM > To: tuscany-dev@ws.apache.org > Subject: [jira] Updated: (TUSCANY-1376) C++ SDO spec portability: > RefCountingPointer > > > [ > https://issues.apache.org/jira/browse/TUSCANY-1376?page=com.atlassian.ji > ra.plugin.system.issuetabpanels:all-tabpanel ] > > Michael Yoder updated TUSCANY-1376: > --- > >Attachment: TUSCANY-1376v2.txt > > Updated patch to address windows compilation issue. > > > C++ SDO spec portability: RefCountingPointer > > > > > > Key: TUSCANY-1376 > > URL: > https://issues.apache.org/jira/browse/TUSCANY-1376 > > Project: Tuscany > > Issue Type: Bug > > Components: C++ SDO, C++ Specification > >Affects Versions: Cpp-M3 > > Environment: all platforms > >Reporter: Michael Yoder > > Fix For: Cpp-Next > > > > Attachments: TUSCANY-1376.txt, TUSCANY-1376v2.txt > > > > > > Tuscany C++ SDO class RefCounting pointer has the member function: > > operator T*() {return pointee;} > > which expose the raw dumb pointer for SDO classes (for the common use > of smart pointers). This member function is used by SCA, and raises > undesirable object lifetime and allowed operation issues. The member > function should be replaced with a safe (referenced in the below -email > thread) conversion to bool member function. > > -Original Message- > > From: Pete Robbins [mailto:[EMAIL PROTECTED] > > Sent: Friday, June 22, 2007 6:16 AM > > To: tuscany-dev@ws.apache.org > > Subject: Re: C++ SDO spec portability: RefCountingPointer Michael, I > > strongly suspect that the operator T*() ws put in for a good reason. > It may be a good idea to remove this but it may be non-trivial. > > The ostream operator << is very useful and there is a default > implementation in RefCountingObject so that objects inheriting from > RefCounting object do not need to implement anything... but they can if > appropriate. > > You are raising a lot if issues which is great and it would be > > excellent to get Tuscany SDO up to 2.1 spec level. I suspect there > > will be hundreds of issues some of which may require large > re-writes/refactoring of the Tuscany SDO Code!! Raising these as Jiras > is the best thing to do so we can track them. Helping fix them by > submitting patches would be even better ;-) Cheers, On 22/06/07, Michael > Yoder <[EMAIL PROTECTED]> wrote: > > > > > > Hi, > > > > > > In looking at C++ SDO portabilty, we found the the Tuscany C++ SDO > > > class RefCountingPointer has functions used externally by SCA: > > > > > >operator T*() {return pointee;} > > >friend std::ostream& operator<< (std::ostream &os, const > > > RefCountingPointer& ptr) > > > > > > It looks like the conversion to T* function may have been put in > > > originally as a porting alternative to a member function template, > > > but may not be needed any more since the member template is now > > > included outside the #ifdef. > > > > > > Exposing the dumb pointer is undesirable since it raises object > > > lifetime issues and allows other unwanted operations. Having a > > > conversion to bool is convenient however, and can be implemented > > > safely using a member function pointer trick (see: > > > http://www.artima.com/cppsource/safebool.html). > > > > > > The shift operator also seems undesireable since it places a burden > > > on all classes which use smart pointers to implement toString > > > functionality. > > > > > > How does it sound to raise a Jira to have these member functions > > > removed? > > > > > > Thanks, > > > Michael Yoder > > > Rogue Wave Software - [EMAIL PROTECTED] Software Developer - > > > HydraSDO > > > > > > ---
FW: [jira] Updated: (TUSCANY-1376) C++ SDO spec portability: RefCountingPointer
Hi Pete, I uploaded an updated patch for TUSCANY-1376 to address the windows compilation issue. Michael Rogue Wave Software, Inc. - [EMAIL PROTECTED] Software Developer - HydraSDO -Original Message- From: Michael Yoder (JIRA) [mailto:[EMAIL PROTECTED] Sent: Wednesday, August 08, 2007 9:43 AM To: tuscany-dev@ws.apache.org Subject: [jira] Updated: (TUSCANY-1376) C++ SDO spec portability: RefCountingPointer [ https://issues.apache.org/jira/browse/TUSCANY-1376?page=com.atlassian.ji ra.plugin.system.issuetabpanels:all-tabpanel ] Michael Yoder updated TUSCANY-1376: --- Attachment: TUSCANY-1376v2.txt Updated patch to address windows compilation issue. > C++ SDO spec portability: RefCountingPointer > > > Key: TUSCANY-1376 > URL: https://issues.apache.org/jira/browse/TUSCANY-1376 > Project: Tuscany > Issue Type: Bug > Components: C++ SDO, C++ Specification >Affects Versions: Cpp-M3 > Environment: all platforms >Reporter: Michael Yoder > Fix For: Cpp-Next > > Attachments: TUSCANY-1376.txt, TUSCANY-1376v2.txt > > > Tuscany C++ SDO class RefCounting pointer has the member function: > operator T*() {return pointee;} > which expose the raw dumb pointer for SDO classes (for the common use of smart pointers). This member function is used by SCA, and raises undesirable object lifetime and allowed operation issues. The member function should be replaced with a safe (referenced in the below -email thread) conversion to bool member function. > -Original Message- > From: Pete Robbins [mailto:[EMAIL PROTECTED] > Sent: Friday, June 22, 2007 6:16 AM > To: tuscany-dev@ws.apache.org > Subject: Re: C++ SDO spec portability: RefCountingPointer Michael, I > strongly suspect that the operator T*() ws put in for a good reason. It may be a good idea to remove this but it may be non-trivial. > The ostream operator << is very useful and there is a default implementation in RefCountingObject so that objects inheriting from RefCounting object do not need to implement anything... but they can if appropriate. > You are raising a lot if issues which is great and it would be > excellent to get Tuscany SDO up to 2.1 spec level. I suspect there > will be hundreds of issues some of which may require large re-writes/refactoring of the Tuscany SDO Code!! Raising these as Jiras is the best thing to do so we can track them. Helping fix them by submitting patches would be even better ;-) Cheers, On 22/06/07, Michael Yoder <[EMAIL PROTECTED]> wrote: > > > > Hi, > > > > In looking at C++ SDO portabilty, we found the the Tuscany C++ SDO > > class RefCountingPointer has functions used externally by SCA: > > > >operator T*() {return pointee;} > >friend std::ostream& operator<< (std::ostream &os, const > > RefCountingPointer& ptr) > > > > It looks like the conversion to T* function may have been put in > > originally as a porting alternative to a member function template, > > but may not be needed any more since the member template is now > > included outside the #ifdef. > > > > Exposing the dumb pointer is undesirable since it raises object > > lifetime issues and allows other unwanted operations. Having a > > conversion to bool is convenient however, and can be implemented > > safely using a member function pointer trick (see: > > http://www.artima.com/cppsource/safebool.html). > > > > The shift operator also seems undesireable since it places a burden > > on all classes which use smart pointers to implement toString > > functionality. > > > > How does it sound to raise a Jira to have these member functions > > removed? > > > > Thanks, > > Michael Yoder > > Rogue Wave Software - [EMAIL PROTECTED] Software Developer - > > HydraSDO > > > > > > - To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > -- > Pete -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[jira] Updated: (TUSCANY-1376) C++ SDO spec portability: RefCountingPointer
[ https://issues.apache.org/jira/browse/TUSCANY-1376?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Michael Yoder updated TUSCANY-1376: --- Attachment: TUSCANY-1376v2.txt Updated patch to address windows compilation issue. > C++ SDO spec portability: RefCountingPointer > > > Key: TUSCANY-1376 > URL: https://issues.apache.org/jira/browse/TUSCANY-1376 > Project: Tuscany > Issue Type: Bug > Components: C++ SDO, C++ Specification >Affects Versions: Cpp-M3 > Environment: all platforms >Reporter: Michael Yoder > Fix For: Cpp-Next > > Attachments: TUSCANY-1376.txt, TUSCANY-1376v2.txt > > > Tuscany C++ SDO class RefCounting pointer has the member function: > operator T*() {return pointee;} > which expose the raw dumb pointer for SDO classes (for the common use of > smart pointers). This member function is used by SCA, and raises undesirable > object lifetime and allowed operation issues. The member function should be > replaced with a safe (referenced in the below -email thread) conversion to > bool member function. > -Original Message- > From: Pete Robbins [mailto:[EMAIL PROTECTED] > Sent: Friday, June 22, 2007 6:16 AM > To: tuscany-dev@ws.apache.org > Subject: Re: C++ SDO spec portability: RefCountingPointer > Michael, I strongly suspect that the operator T*() ws put in for a good > reason. It may be a good idea to remove this but it may be non-trivial. > The ostream operator << is very useful and there is a default implementation > in RefCountingObject so that objects inheriting from RefCounting object do > not need to implement anything... but they can if appropriate. > You are raising a lot if issues which is great and it would be excellent to > get Tuscany SDO up to 2.1 spec level. I suspect there will be hundreds of > issues some of which may require large re-writes/refactoring of the Tuscany > SDO Code!! Raising these as Jiras is the best thing to do so we can track > them. Helping fix them by submitting patches would be even better ;-) > Cheers, > On 22/06/07, Michael Yoder <[EMAIL PROTECTED]> wrote: > > > > Hi, > > > > In looking at C++ SDO portabilty, we found the the Tuscany C++ SDO > > class RefCountingPointer has functions used externally by SCA: > > > >operator T*() {return pointee;} > >friend std::ostream& operator<< (std::ostream &os, const > > RefCountingPointer& ptr) > > > > It looks like the conversion to T* function may have been put in > > originally as a porting alternative to a member function template, but > > may not be needed any more since the member template is now included > > outside the #ifdef. > > > > Exposing the dumb pointer is undesirable since it raises object > > lifetime issues and allows other unwanted operations. Having a > > conversion to bool is convenient however, and can be implemented > > safely using a member function pointer trick (see: > > http://www.artima.com/cppsource/safebool.html). > > > > The shift operator also seems undesireable since it places a burden on > > all classes which use smart pointers to implement toString > > functionality. > > > > How does it sound to raise a Jira to have these member functions > > removed? > > > > Thanks, > > Michael Yoder > > Rogue Wave Software - [EMAIL PROTECTED] Software Developer - > > HydraSDO > > > > - > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > -- > Pete -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: FW: [jira] Updated: (TUSCANY-1376) C++ SDO spec portability: RefCountingPointer
Thanks Pete, I'll work on getting an updated patch uploaded tomorrow morning. Michael Rogue Wave Software, Inc. - [EMAIL PROTECTED] Software Developer - HydraSDO -Original Message- From: Pete Robbins [mailto:[EMAIL PROTECTED] Sent: Tuesday, August 07, 2007 3:29 PM To: tuscany-dev@ws.apache.org Subject: Re: FW: [jira] Updated: (TUSCANY-1376) C++ SDO spec portability: RefCountingPointer I get compile errors on Windows: warning C4346: 'commonj::sdo::RefCountingPointer::PointerType' : dependent name is not a type prefix with 'typename' to indicate a type d:\tuscanysvn\cpp\sdo\runtime\core\src\commonj\sdo\refcountingpointer.h( 124) : error C2061: syntax error : identifier 'PointerType' d:\tuscanysvn\cpp\sdo\runtime\core\src\commonj\sdo\refcountingpointer.h( 128) : error C2244: 'commonj::sdo::RefCountingPointer::{ctor}' : unable to match function definition to an existing declaration definition 'commonj::sdo::RefCountingPointer::RefCountingPointer(void)' existing declarations 'commonj::sdo::RefCountingPointer::RefCountingPointer(const commonj::sdo::RefCountingPointer &)' 'commonj::sdo::RefCountingPointer::RefCountingPointer(T *)' Any ideas? On 07/08/07, Pete Robbins <[EMAIL PROTECTED]> wrote: > I'll get on it. BIG patch ;-) > > Cheers, > > On 07/08/07, Michael Yoder <[EMAIL PROTECTED]> wrote: > > Hi, > > > > I uploaded a patch to address TUSCANY-1376. If someone could review > > and apply it that would be great. > > > > Thanks, > > > > Michael Yoder > > Rogue Wave Software, Inc. - [EMAIL PROTECTED] Software Developer - > > HydraSDO > > > > -Original Message----- > > From: Michael Yoder (JIRA) [mailto:[EMAIL PROTECTED] > > Sent: Tuesday, August 07, 2007 1:52 PM > > To: tuscany-dev@ws.apache.org > > Subject: [jira] Updated: (TUSCANY-1376) C++ SDO spec portability: > > RefCountingPointer > > > > > > [ > > https://issues.apache.org/jira/browse/TUSCANY-1376?page=com.atlassia > > n.ji ra.plugin.system.issuetabpanels:all-tabpanel ] > > > > Michael Yoder updated TUSCANY-1376: > > --- > > > >Attachment: TUSCANY-1376.txt > > > > This patch removes the implicit conversion to dumb pointer in > > RefCountingPointer (still available via the helper function > > getRawPointer()). It also adds some additional operators and helper > > functions, including a safe conversion to bool for use with if > > expressions. Some addition unit tests are added, and some smart > > pointer cleanup is included. > > > > > C++ SDO spec portability: RefCountingPointer > > > > > > > > > Key: TUSCANY-1376 > > > URL: > > https://issues.apache.org/jira/browse/TUSCANY-1376 > > > Project: Tuscany > > > Issue Type: Bug > > > Components: C++ SDO, C++ Specification > > >Affects Versions: Cpp-M3 > > > Environment: all platforms > > >Reporter: Michael Yoder > > > Fix For: Cpp-Next > > > > > > Attachments: TUSCANY-1376.txt > > > > > > > > > Tuscany C++ SDO class RefCounting pointer has the member function: > > > operator T*() {return pointee;} > > > which expose the raw dumb pointer for SDO classes (for the common > > > use > > of smart pointers). This member function is used by SCA, and raises > > undesirable object lifetime and allowed operation issues. The member > > function should be replaced with a safe (referenced in the below > > -email > > thread) conversion to bool member function. > > > -Original Message- > > > From: Pete Robbins [mailto:[EMAIL PROTECTED] > > > Sent: Friday, June 22, 2007 6:16 AM > > > To: tuscany-dev@ws.apache.org > > > Subject: Re: C++ SDO spec portability: RefCountingPointer Michael, > > > I strongly suspect that the operator T*() ws put in for a good reason. > > It may be a good idea to remove this but it may be non-trivial. > > > The ostream operator << is very useful and there is a default > > implementation in RefCountingObject so that objects inheriting from > > RefCounting object do not need to implement anything... but they can > > if appropriate. > > > You are raising a lot if issues which is great and it would be > > > excellent to get Tuscany SDO up to 2.1 spec level. I suspect there > > >
Re: FW: [jira] Updated: (TUSCANY-1376) C++ SDO spec portability: RefCountingPointer
I get compile errors on Windows: warning C4346: 'commonj::sdo::RefCountingPointer::PointerType' : dependent name is not a type prefix with 'typename' to indicate a type d:\tuscanysvn\cpp\sdo\runtime\core\src\commonj\sdo\refcountingpointer.h(124) : error C2061: syntax error : identifier 'PointerType' d:\tuscanysvn\cpp\sdo\runtime\core\src\commonj\sdo\refcountingpointer.h(128) : error C2244: 'commonj::sdo::RefCountingPointer::{ctor}' : unable to match function definition to an existing declaration definition 'commonj::sdo::RefCountingPointer::RefCountingPointer(void)' existing declarations 'commonj::sdo::RefCountingPointer::RefCountingPointer(const commonj::sdo::RefCountingPointer &)' 'commonj::sdo::RefCountingPointer::RefCountingPointer(T *)' Any ideas? On 07/08/07, Pete Robbins <[EMAIL PROTECTED]> wrote: > I'll get on it. BIG patch ;-) > > Cheers, > > On 07/08/07, Michael Yoder <[EMAIL PROTECTED]> wrote: > > Hi, > > > > I uploaded a patch to address TUSCANY-1376. If someone could review and > > apply it that would be great. > > > > Thanks, > > > > Michael Yoder > > Rogue Wave Software, Inc. - [EMAIL PROTECTED] Software Developer - > > HydraSDO > > > > -Original Message- > > From: Michael Yoder (JIRA) [mailto:[EMAIL PROTECTED] > > Sent: Tuesday, August 07, 2007 1:52 PM > > To: tuscany-dev@ws.apache.org > > Subject: [jira] Updated: (TUSCANY-1376) C++ SDO spec portability: > > RefCountingPointer > > > > > > [ > > https://issues.apache.org/jira/browse/TUSCANY-1376?page=com.atlassian.ji > > ra.plugin.system.issuetabpanels:all-tabpanel ] > > > > Michael Yoder updated TUSCANY-1376: > > --- > > > >Attachment: TUSCANY-1376.txt > > > > This patch removes the implicit conversion to dumb pointer in > > RefCountingPointer (still available via the helper function > > getRawPointer()). It also adds some additional operators and helper > > functions, including a safe conversion to bool for use with if > > expressions. Some addition unit tests are added, and some smart pointer > > cleanup is included. > > > > > C++ SDO spec portability: RefCountingPointer > > > > > > > > > Key: TUSCANY-1376 > > > URL: > > https://issues.apache.org/jira/browse/TUSCANY-1376 > > > Project: Tuscany > > > Issue Type: Bug > > > Components: C++ SDO, C++ Specification > > >Affects Versions: Cpp-M3 > > > Environment: all platforms > > >Reporter: Michael Yoder > > > Fix For: Cpp-Next > > > > > > Attachments: TUSCANY-1376.txt > > > > > > > > > Tuscany C++ SDO class RefCounting pointer has the member function: > > > operator T*() {return pointee;} > > > which expose the raw dumb pointer for SDO classes (for the common use > > of smart pointers). This member function is used by SCA, and raises > > undesirable object lifetime and allowed operation issues. The member > > function should be replaced with a safe (referenced in the below -email > > thread) conversion to bool member function. > > > -Original Message- > > > From: Pete Robbins [mailto:[EMAIL PROTECTED] > > > Sent: Friday, June 22, 2007 6:16 AM > > > To: tuscany-dev@ws.apache.org > > > Subject: Re: C++ SDO spec portability: RefCountingPointer Michael, I > > > strongly suspect that the operator T*() ws put in for a good reason. > > It may be a good idea to remove this but it may be non-trivial. > > > The ostream operator << is very useful and there is a default > > implementation in RefCountingObject so that objects inheriting from > > RefCounting object do not need to implement anything... but they can if > > appropriate. > > > You are raising a lot if issues which is great and it would be > > > excellent to get Tuscany SDO up to 2.1 spec level. I suspect there > > > will be hundreds of issues some of which may require large > > re-writes/refactoring of the Tuscany SDO Code!! Raising these as Jiras > > is the best thing to do so we can track them. Helping fix them by > > submitting patches would be even better ;-) Cheers, On 22/06/07, Michael > > Yoder <[EMAIL PROTECTED]> wrote: > > > > > > > > Hi, > > > > > > > > In looking at C++ SD
Re: FW: [jira] Updated: (TUSCANY-1376) C++ SDO spec portability: RefCountingPointer
I'll get on it. BIG patch ;-) Cheers, On 07/08/07, Michael Yoder <[EMAIL PROTECTED]> wrote: > Hi, > > I uploaded a patch to address TUSCANY-1376. If someone could review and > apply it that would be great. > > Thanks, > > Michael Yoder > Rogue Wave Software, Inc. - [EMAIL PROTECTED] Software Developer - > HydraSDO > > -Original Message- > From: Michael Yoder (JIRA) [mailto:[EMAIL PROTECTED] > Sent: Tuesday, August 07, 2007 1:52 PM > To: tuscany-dev@ws.apache.org > Subject: [jira] Updated: (TUSCANY-1376) C++ SDO spec portability: > RefCountingPointer > > > [ > https://issues.apache.org/jira/browse/TUSCANY-1376?page=com.atlassian.ji > ra.plugin.system.issuetabpanels:all-tabpanel ] > > Michael Yoder updated TUSCANY-1376: > --- > >Attachment: TUSCANY-1376.txt > > This patch removes the implicit conversion to dumb pointer in > RefCountingPointer (still available via the helper function > getRawPointer()). It also adds some additional operators and helper > functions, including a safe conversion to bool for use with if > expressions. Some addition unit tests are added, and some smart pointer > cleanup is included. > > > C++ SDO spec portability: RefCountingPointer > > > > > > Key: TUSCANY-1376 > > URL: > https://issues.apache.org/jira/browse/TUSCANY-1376 > > Project: Tuscany > > Issue Type: Bug > > Components: C++ SDO, C++ Specification > >Affects Versions: Cpp-M3 > > Environment: all platforms > >Reporter: Michael Yoder > > Fix For: Cpp-Next > > > > Attachments: TUSCANY-1376.txt > > > > > > Tuscany C++ SDO class RefCounting pointer has the member function: > > operator T*() {return pointee;} > > which expose the raw dumb pointer for SDO classes (for the common use > of smart pointers). This member function is used by SCA, and raises > undesirable object lifetime and allowed operation issues. The member > function should be replaced with a safe (referenced in the below -email > thread) conversion to bool member function. > > -Original Message- > > From: Pete Robbins [mailto:[EMAIL PROTECTED] > > Sent: Friday, June 22, 2007 6:16 AM > > To: tuscany-dev@ws.apache.org > > Subject: Re: C++ SDO spec portability: RefCountingPointer Michael, I > > strongly suspect that the operator T*() ws put in for a good reason. > It may be a good idea to remove this but it may be non-trivial. > > The ostream operator << is very useful and there is a default > implementation in RefCountingObject so that objects inheriting from > RefCounting object do not need to implement anything... but they can if > appropriate. > > You are raising a lot if issues which is great and it would be > > excellent to get Tuscany SDO up to 2.1 spec level. I suspect there > > will be hundreds of issues some of which may require large > re-writes/refactoring of the Tuscany SDO Code!! Raising these as Jiras > is the best thing to do so we can track them. Helping fix them by > submitting patches would be even better ;-) Cheers, On 22/06/07, Michael > Yoder <[EMAIL PROTECTED]> wrote: > > > > > > Hi, > > > > > > In looking at C++ SDO portabilty, we found the the Tuscany C++ SDO > > > class RefCountingPointer has functions used externally by SCA: > > > > > >operator T*() {return pointee;} > > >friend std::ostream& operator<< (std::ostream &os, const > > > RefCountingPointer& ptr) > > > > > > It looks like the conversion to T* function may have been put in > > > originally as a porting alternative to a member function template, > > > but may not be needed any more since the member template is now > > > included outside the #ifdef. > > > > > > Exposing the dumb pointer is undesirable since it raises object > > > lifetime issues and allows other unwanted operations. Having a > > > conversion to bool is convenient however, and can be implemented > > > safely using a member function pointer trick (see: > > > http://www.artima.com/cppsource/safebool.html). > > > > > > The shift operator also seems undesireable since it places a burden > > > on all classes which use smart pointers to implement toString > > > functionality. > > > > > > How does it sound to raise a Jira to have these member functions > > > removed? > > > > > > Thanks,
FW: [jira] Updated: (TUSCANY-1376) C++ SDO spec portability: RefCountingPointer
Hi, I uploaded a patch to address TUSCANY-1376. If someone could review and apply it that would be great. Thanks, Michael Yoder Rogue Wave Software, Inc. - [EMAIL PROTECTED] Software Developer - HydraSDO -Original Message- From: Michael Yoder (JIRA) [mailto:[EMAIL PROTECTED] Sent: Tuesday, August 07, 2007 1:52 PM To: tuscany-dev@ws.apache.org Subject: [jira] Updated: (TUSCANY-1376) C++ SDO spec portability: RefCountingPointer [ https://issues.apache.org/jira/browse/TUSCANY-1376?page=com.atlassian.ji ra.plugin.system.issuetabpanels:all-tabpanel ] Michael Yoder updated TUSCANY-1376: --- Attachment: TUSCANY-1376.txt This patch removes the implicit conversion to dumb pointer in RefCountingPointer (still available via the helper function getRawPointer()). It also adds some additional operators and helper functions, including a safe conversion to bool for use with if expressions. Some addition unit tests are added, and some smart pointer cleanup is included. > C++ SDO spec portability: RefCountingPointer > > > Key: TUSCANY-1376 > URL: https://issues.apache.org/jira/browse/TUSCANY-1376 > Project: Tuscany > Issue Type: Bug > Components: C++ SDO, C++ Specification >Affects Versions: Cpp-M3 > Environment: all platforms >Reporter: Michael Yoder > Fix For: Cpp-Next > > Attachments: TUSCANY-1376.txt > > > Tuscany C++ SDO class RefCounting pointer has the member function: > operator T*() {return pointee;} > which expose the raw dumb pointer for SDO classes (for the common use of smart pointers). This member function is used by SCA, and raises undesirable object lifetime and allowed operation issues. The member function should be replaced with a safe (referenced in the below -email thread) conversion to bool member function. > -Original Message- > From: Pete Robbins [mailto:[EMAIL PROTECTED] > Sent: Friday, June 22, 2007 6:16 AM > To: tuscany-dev@ws.apache.org > Subject: Re: C++ SDO spec portability: RefCountingPointer Michael, I > strongly suspect that the operator T*() ws put in for a good reason. It may be a good idea to remove this but it may be non-trivial. > The ostream operator << is very useful and there is a default implementation in RefCountingObject so that objects inheriting from RefCounting object do not need to implement anything... but they can if appropriate. > You are raising a lot if issues which is great and it would be > excellent to get Tuscany SDO up to 2.1 spec level. I suspect there > will be hundreds of issues some of which may require large re-writes/refactoring of the Tuscany SDO Code!! Raising these as Jiras is the best thing to do so we can track them. Helping fix them by submitting patches would be even better ;-) Cheers, On 22/06/07, Michael Yoder <[EMAIL PROTECTED]> wrote: > > > > Hi, > > > > In looking at C++ SDO portabilty, we found the the Tuscany C++ SDO > > class RefCountingPointer has functions used externally by SCA: > > > >operator T*() {return pointee;} > >friend std::ostream& operator<< (std::ostream &os, const > > RefCountingPointer& ptr) > > > > It looks like the conversion to T* function may have been put in > > originally as a porting alternative to a member function template, > > but may not be needed any more since the member template is now > > included outside the #ifdef. > > > > Exposing the dumb pointer is undesirable since it raises object > > lifetime issues and allows other unwanted operations. Having a > > conversion to bool is convenient however, and can be implemented > > safely using a member function pointer trick (see: > > http://www.artima.com/cppsource/safebool.html). > > > > The shift operator also seems undesireable since it places a burden > > on all classes which use smart pointers to implement toString > > functionality. > > > > How does it sound to raise a Jira to have these member functions > > removed? > > > > Thanks, > > Michael Yoder > > Rogue Wave Software - [EMAIL PROTECTED] Software Developer - > > HydraSDO > > > > > > - To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > -- > Pete -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[jira] Updated: (TUSCANY-1376) C++ SDO spec portability: RefCountingPointer
[ https://issues.apache.org/jira/browse/TUSCANY-1376?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Michael Yoder updated TUSCANY-1376: --- Attachment: TUSCANY-1376.txt This patch removes the implicit conversion to dumb pointer in RefCountingPointer (still available via the helper function getRawPointer()). It also adds some additional operators and helper functions, including a safe conversion to bool for use with if expressions. Some addition unit tests are added, and some smart pointer cleanup is included. > C++ SDO spec portability: RefCountingPointer > > > Key: TUSCANY-1376 > URL: https://issues.apache.org/jira/browse/TUSCANY-1376 > Project: Tuscany > Issue Type: Bug > Components: C++ SDO, C++ Specification >Affects Versions: Cpp-M3 > Environment: all platforms >Reporter: Michael Yoder > Fix For: Cpp-Next > > Attachments: TUSCANY-1376.txt > > > Tuscany C++ SDO class RefCounting pointer has the member function: > operator T*() {return pointee;} > which expose the raw dumb pointer for SDO classes (for the common use of > smart pointers). This member function is used by SCA, and raises undesirable > object lifetime and allowed operation issues. The member function should be > replaced with a safe (referenced in the below -email thread) conversion to > bool member function. > -Original Message- > From: Pete Robbins [mailto:[EMAIL PROTECTED] > Sent: Friday, June 22, 2007 6:16 AM > To: tuscany-dev@ws.apache.org > Subject: Re: C++ SDO spec portability: RefCountingPointer > Michael, I strongly suspect that the operator T*() ws put in for a good > reason. It may be a good idea to remove this but it may be non-trivial. > The ostream operator << is very useful and there is a default implementation > in RefCountingObject so that objects inheriting from RefCounting object do > not need to implement anything... but they can if appropriate. > You are raising a lot if issues which is great and it would be excellent to > get Tuscany SDO up to 2.1 spec level. I suspect there will be hundreds of > issues some of which may require large re-writes/refactoring of the Tuscany > SDO Code!! Raising these as Jiras is the best thing to do so we can track > them. Helping fix them by submitting patches would be even better ;-) > Cheers, > On 22/06/07, Michael Yoder <[EMAIL PROTECTED]> wrote: > > > > Hi, > > > > In looking at C++ SDO portabilty, we found the the Tuscany C++ SDO > > class RefCountingPointer has functions used externally by SCA: > > > >operator T*() {return pointee;} > >friend std::ostream& operator<< (std::ostream &os, const > > RefCountingPointer& ptr) > > > > It looks like the conversion to T* function may have been put in > > originally as a porting alternative to a member function template, but > > may not be needed any more since the member template is now included > > outside the #ifdef. > > > > Exposing the dumb pointer is undesirable since it raises object > > lifetime issues and allows other unwanted operations. Having a > > conversion to bool is convenient however, and can be implemented > > safely using a member function pointer trick (see: > > http://www.artima.com/cppsource/safebool.html). > > > > The shift operator also seems undesireable since it places a burden on > > all classes which use smart pointers to implement toString > > functionality. > > > > How does it sound to raise a Jira to have these member functions > > removed? > > > > Thanks, > > Michael Yoder > > Rogue Wave Software - [EMAIL PROTECTED] Software Developer - > > HydraSDO > > > > - > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > -- > Pete -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: C++ SDO spec portability: RefCountingPointer
Pete Robbins wrote: The ostream operator << is very useful and there is a default implementation in RefCountingObject so that objects inheriting from RefCounting object do not need to implement anything... but they can if appropriate. Yes, the << operator is very useful to consumers of the API, and at no cost to implementors because, as Pete says, a default implementation exists. Please don't remove it. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[jira] Updated: (TUSCANY-1376) C++ SDO spec portability: RefCountingPointer
[ https://issues.apache.org/jira/browse/TUSCANY-1376?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Pete Robbins updated TUSCANY-1376: -- Component/s: C++ Specification Affects Version/s: Cpp-M3 adding specification component > C++ SDO spec portability: RefCountingPointer > > > Key: TUSCANY-1376 > URL: https://issues.apache.org/jira/browse/TUSCANY-1376 > Project: Tuscany > Issue Type: Bug > Components: C++ SDO, C++ Specification >Affects Versions: Cpp-M3 > Environment: all platforms >Reporter: Michael Yoder > > Tuscany C++ SDO class RefCounting pointer has the member function: > operator T*() {return pointee;} > which expose the raw dumb pointer for SDO classes (for the common use of > smart pointers). This member function is used by SCA, and raises undesirable > object lifetime and allowed operation issues. The member function should be > replaced with a safe (referenced in the below -email thread) conversion to > bool member function. > -Original Message- > From: Pete Robbins [mailto:[EMAIL PROTECTED] > Sent: Friday, June 22, 2007 6:16 AM > To: tuscany-dev@ws.apache.org > Subject: Re: C++ SDO spec portability: RefCountingPointer > Michael, I strongly suspect that the operator T*() ws put in for a good > reason. It may be a good idea to remove this but it may be non-trivial. > The ostream operator << is very useful and there is a default implementation > in RefCountingObject so that objects inheriting from RefCounting object do > not need to implement anything... but they can if appropriate. > You are raising a lot if issues which is great and it would be excellent to > get Tuscany SDO up to 2.1 spec level. I suspect there will be hundreds of > issues some of which may require large re-writes/refactoring of the Tuscany > SDO Code!! Raising these as Jiras is the best thing to do so we can track > them. Helping fix them by submitting patches would be even better ;-) > Cheers, > On 22/06/07, Michael Yoder <[EMAIL PROTECTED]> wrote: > > > > Hi, > > > > In looking at C++ SDO portabilty, we found the the Tuscany C++ SDO > > class RefCountingPointer has functions used externally by SCA: > > > >operator T*() {return pointee;} > >friend std::ostream& operator<< (std::ostream &os, const > > RefCountingPointer& ptr) > > > > It looks like the conversion to T* function may have been put in > > originally as a porting alternative to a member function template, but > > may not be needed any more since the member template is now included > > outside the #ifdef. > > > > Exposing the dumb pointer is undesirable since it raises object > > lifetime issues and allows other unwanted operations. Having a > > conversion to bool is convenient however, and can be implemented > > safely using a member function pointer trick (see: > > http://www.artima.com/cppsource/safebool.html). > > > > The shift operator also seems undesireable since it places a burden on > > all classes which use smart pointers to implement toString > > functionality. > > > > How does it sound to raise a Jira to have these member functions > > removed? > > > > Thanks, > > Michael Yoder > > Rogue Wave Software - [EMAIL PROTECTED] Software Developer - > > HydraSDO > > > > - > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > -- > Pete -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: C++ SDO spec portability: RefCountingPointer
Hi Pete, I entered Jira's for the remaining issue I raised (listed below). I think we will be able to contribute some patches as well. Thanks, Michael TUSCANY-1370 - C++ SDO spec compliance/portability: DataObject TUSCANY-1371 - C++ SDO spec compliance/portability: DataObject::getInstanceProperty(const std::string& prop) TUSCANY-1372 - C++ SDO spec compliance/portability: DataFactory TUSCANY-1373 - C++ SDO spec compliance/portability: DataFactory::setDefault TUSCANY-1374 - C++ SDO spec portability: DataObjectInstance TUSCANY-1375 - C++ SDO spec portability: C++ type definition API TUSCANY-1376 - C++ SDO spec portability: RefCountingPointer -Original Message- From: Pete Robbins [mailto:[EMAIL PROTECTED] Sent: Friday, June 22, 2007 6:16 AM To: tuscany-dev@ws.apache.org Subject: Re: C++ SDO spec portability: RefCountingPointer Michael, I strongly suspect that the operator T*() ws put in for a good reason. It may be a good idea to remove this but it may be non-trivial. The ostream operator << is very useful and there is a default implementation in RefCountingObject so that objects inheriting from RefCounting object do not need to implement anything... but they can if appropriate. You are raising a lot if issues which is great and it would be excellent to get Tuscany SDO up to 2.1 spec level. I suspect there will be hundreds of issues some of which may require large re-writes/refactoring of the Tuscany SDO Code!! Raising these as Jiras is the best thing to do so we can track them. Helping fix them by submitting patches would be even better ;-) Cheers, On 22/06/07, Michael Yoder <[EMAIL PROTECTED]> wrote: > > Hi, > > In looking at C++ SDO portabilty, we found the the Tuscany C++ SDO > class RefCountingPointer has functions used externally by SCA: > >operator T*() {return pointee;} >friend std::ostream& operator<< (std::ostream &os, const > RefCountingPointer& ptr) > > It looks like the conversion to T* function may have been put in > originally as a porting alternative to a member function template, but > may not be needed any more since the member template is now included > outside the #ifdef. > > Exposing the dumb pointer is undesirable since it raises object > lifetime issues and allows other unwanted operations. Having a > conversion to bool is convenient however, and can be implemented > safely using a member function pointer trick (see: > http://www.artima.com/cppsource/safebool.html). > > The shift operator also seems undesireable since it places a burden on > all classes which use smart pointers to implement toString > functionality. > > How does it sound to raise a Jira to have these member functions > removed? > > Thanks, > Michael Yoder > Rogue Wave Software - [EMAIL PROTECTED] Software Developer - > HydraSDO > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > -- Pete - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[jira] Created: (TUSCANY-1376) C++ SDO spec portability: RefCountingPointer
C++ SDO spec portability: RefCountingPointer Key: TUSCANY-1376 URL: https://issues.apache.org/jira/browse/TUSCANY-1376 Project: Tuscany Issue Type: Bug Components: C++ SDO Environment: all platforms Reporter: Michael Yoder Tuscany C++ SDO class RefCounting pointer has the member function: operator T*() {return pointee;} which expose the raw dumb pointer for SDO classes (for the common use of smart pointers). This member function is used by SCA, and raises undesirable object lifetime and allowed operation issues. The member function should be replaced with a safe (referenced in the below -email thread) conversion to bool member function. -Original Message- From: Pete Robbins [mailto:[EMAIL PROTECTED] Sent: Friday, June 22, 2007 6:16 AM To: tuscany-dev@ws.apache.org Subject: Re: C++ SDO spec portability: RefCountingPointer Michael, I strongly suspect that the operator T*() ws put in for a good reason. It may be a good idea to remove this but it may be non-trivial. The ostream operator << is very useful and there is a default implementation in RefCountingObject so that objects inheriting from RefCounting object do not need to implement anything... but they can if appropriate. You are raising a lot if issues which is great and it would be excellent to get Tuscany SDO up to 2.1 spec level. I suspect there will be hundreds of issues some of which may require large re-writes/refactoring of the Tuscany SDO Code!! Raising these as Jiras is the best thing to do so we can track them. Helping fix them by submitting patches would be even better ;-) Cheers, On 22/06/07, Michael Yoder <[EMAIL PROTECTED]> wrote: > > Hi, > > In looking at C++ SDO portabilty, we found the the Tuscany C++ SDO > class RefCountingPointer has functions used externally by SCA: > >operator T*() {return pointee;} >friend std::ostream& operator<< (std::ostream &os, const > RefCountingPointer& ptr) > > It looks like the conversion to T* function may have been put in > originally as a porting alternative to a member function template, but > may not be needed any more since the member template is now included > outside the #ifdef. > > Exposing the dumb pointer is undesirable since it raises object > lifetime issues and allows other unwanted operations. Having a > conversion to bool is convenient however, and can be implemented > safely using a member function pointer trick (see: > http://www.artima.com/cppsource/safebool.html). > > The shift operator also seems undesireable since it places a burden on > all classes which use smart pointers to implement toString > functionality. > > How does it sound to raise a Jira to have these member functions > removed? > > Thanks, > Michael Yoder > Rogue Wave Software - [EMAIL PROTECTED] Software Developer - > HydraSDO > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > -- Pete -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: C++ SDO spec portability: RefCountingPointer
Michael, I strongly suspect that the operator T*() ws put in for a good reason. It may be a good idea to remove this but it may be non-trivial. The ostream operator << is very useful and there is a default implementation in RefCountingObject so that objects inheriting from RefCounting object do not need to implement anything... but they can if appropriate. You are raising a lot if issues which is great and it would be excellent to get Tuscany SDO up to 2.1 spec level. I suspect there will be hundreds of issues some of which may require large re-writes/refactoring of the Tuscany SDO Code!! Raising these as Jiras is the best thing to do so we can track them. Helping fix them by submitting patches would be even better ;-) Cheers, On 22/06/07, Michael Yoder <[EMAIL PROTECTED]> wrote: Hi, In looking at C++ SDO portabilty, we found the the Tuscany C++ SDO class RefCountingPointer has functions used externally by SCA: operator T*() {return pointee;} friend std::ostream& operator<< (std::ostream &os, const RefCountingPointer& ptr) It looks like the conversion to T* function may have been put in originally as a porting alternative to a member function template, but may not be needed any more since the member template is now included outside the #ifdef. Exposing the dumb pointer is undesirable since it raises object lifetime issues and allows other unwanted operations. Having a conversion to bool is convenient however, and can be implemented safely using a member function pointer trick (see: http://www.artima.com/cppsource/safebool.html). The shift operator also seems undesireable since it places a burden on all classes which use smart pointers to implement toString functionality. How does it sound to raise a Jira to have these member functions removed? Thanks, Michael Yoder Rogue Wave Software - [EMAIL PROTECTED] Software Developer - HydraSDO - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Pete
C++ SDO spec portability: RefCountingPointer
Hi, In looking at C++ SDO portabilty, we found the the Tuscany C++ SDO class RefCountingPointer has functions used externally by SCA: operator T*() {return pointee;} friend std::ostream& operator<< (std::ostream &os, const RefCountingPointer& ptr) It looks like the conversion to T* function may have been put in originally as a porting alternative to a member function template, but may not be needed any more since the member template is now included outside the #ifdef. Exposing the dumb pointer is undesirable since it raises object lifetime issues and allows other unwanted operations. Having a conversion to bool is convenient however, and can be implemented safely using a member function pointer trick (see: http://www.artima.com/cppsource/safebool.html). The shift operator also seems undesireable since it places a burden on all classes which use smart pointers to implement toString functionality. How does it sound to raise a Jira to have these member functions removed? Thanks, Michael Yoder Rogue Wave Software - [EMAIL PROTECTED] Software Developer - HydraSDO - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]