[vtk-developers] Another SQL database issue
    Shead, Timothy 
    tshead at sandia.gov
       
    Tue Apr  1 11:15:13 EDT 2008
    
    
  
On 3/31/08 2:30 PM, "David C Thompson" <dcthomp at sandia.gov> wrote:
> 1. A method on vtkSQLQuery to escape strings is really necessary, but
> it's not clear what the signature should be. For C++, it would be useful
> to have
>   class vtkSQLQuery {
>   public:
>     vtkStdString EscapeString( vtkStdString& src );
>   };
> but this cannot be wrapped. Unfortunately, a signature like this:
>   class vtkSQLQuery {
>   public:
>     char* EscapeString( const char* src );
>   };
> would either require the called to delete the returned string (tedious)
> or to copy the results before calling EscapeString a second time (since
> storage for the output would be owned by the class and overwritten with
> each call). Should both methods be included?
I think you want both methods; an approach that (I think) I've seen
elsewhere in VTK is for the wrappable version to have its own internal
storage (so the caller doesn't have to free anything) and mark it as
thread-unsafe.
Cheers,
Tim
--
Timothy M. Shead
Sandia National Laboratories
Scalable Analytics & Visualization
505-284-0139
    
    
More information about the vtk-developers
mailing list