00001 /*========================================================================= 00002 00003 Program: Visualization Toolkit 00004 Module: $RCSfile: vtkStdString.h,v $ 00005 00006 Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen 00007 All rights reserved. 00008 See Copyright.txt or http://www.kitware.com/Copyright.htm for details. 00009 00010 This software is distributed WITHOUT ANY WARRANTY; without even 00011 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 00012 PURPOSE. See the above copyright notice for more information. 00013 00014 =========================================================================*/ 00026 #ifndef __vtkStdString_h 00027 #define __vtkStdString_h 00028 00029 #include "vtkSystemIncludes.h" // For VTK_COMMON_EXPORT. 00030 #include <vtkstd/string> // For the superclass. 00031 00032 class vtkStdString; 00033 VTK_COMMON_EXPORT ostream& operator<<(ostream&, const vtkStdString&); 00034 00035 class vtkStdString : public vtkstd::string 00036 { 00037 public: 00038 typedef vtkstd::string StdString; 00039 typedef StdString::value_type value_type; 00040 typedef StdString::pointer pointer; 00041 typedef StdString::reference reference; 00042 typedef StdString::const_reference const_reference; 00043 typedef StdString::size_type size_type; 00044 typedef StdString::difference_type difference_type; 00045 typedef StdString::iterator iterator; 00046 typedef StdString::const_iterator const_iterator; 00047 typedef StdString::reverse_iterator reverse_iterator; 00048 typedef StdString::const_reverse_iterator const_reverse_iterator; 00049 00050 vtkStdString(): StdString() {} 00051 vtkStdString(const value_type* s): StdString(s) {} 00052 vtkStdString(const value_type* s, size_type n): StdString(s, n) {} 00053 vtkStdString(const StdString& s, size_type pos=0, size_type n=npos): 00054 StdString(s, pos, n) {} 00055 00056 operator const char *() { return this->c_str(); } 00057 }; 00058 00059 #endif