Main Page   Modules   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members   Related Pages  

utils_string.h

Go to the documentation of this file.
      00001 //----------------------------------------------------------------------------------------
      00011 // RCS-ID:      $Id: utils_string.h,v 1.11 2003/02/06 21:47:30 robertoconnor Exp $
      00012 //----------------------------------------------------------------------------------------
      00013 
      00014 //----------------------------------------------------------------------------------------
      00015 // Begin single inclusion of this .h file condition
      00016 //----------------------------------------------------------------------------------------
      00017 
      00018 #ifndef _UTILS_STRING_H_
      00019 #define _UTILS_STRING_H_
      00020 
      00021 //----------------------------------------------------------------------------------------
      00022 // GCC interface
      00023 //----------------------------------------------------------------------------------------
      00024 
      00025 #if defined(__GNUG__) && ! defined(__APPLE__)
      00026     #pragma interface "utils_string.h"
      00027 #endif
      00028 
      00029 //----------------------------------------------------------------------------------------
      00030 // Shared defines
      00031 //----------------------------------------------------------------------------------------
      00032 
      00033 #include "plucker_defines.h"
      00034 
      00035 //----------------------------------------------------------------------------------------
      00036 // Headers
      00037 //----------------------------------------------------------------------------------------
      00038 
      00039 #include "wx/datetime.h"
      00040 
      00041 //----------------------------------------------------------------------------------------
      00042 // Class definition: utils_string
      00043 //----------------------------------------------------------------------------------------
      00044 
      00046 class utils_string 
      00047 {
      00048 
      00049 public:
      00050     
      00052 
      00060     static void string_to_arrayint( wxString input_string, 
      00061                                     wxChar delimiter,
      00062                                     wxArrayInt* output_arrayint,
      00063                                     bool ignore_trailing_delimiter 
      00064                                   );
      00065                                  
      00067 
      00072     static wxString arrayint_to_string( wxArrayInt& input_arrayint,
      00073                                         wxChar delimiter
      00074                                       );
      00075 
      00077 
      00085     static void string_to_arraystring( wxString input_string,
      00086                                        wxChar delimiter,
      00087                                        wxArrayString *output_arraystring,
      00088                                        bool ignore_trailing_delimiter 
      00089                                      );
      00090     
      00092 
      00097     static wxString arraystring_to_string( wxArrayString& input_arraystring,
      00098                                            wxChar delimiter
      00099                                          );
      00100 
      00102 
      00107     static void string_array_to_arraystring( int array_size,
      00108                                              const wxString input_string_array[],
      00109                                              wxArrayString *output_arraystring
      00110                                            );
      00111     
      00113     static void arraystring_to_string_array( const wxArrayString& input_arraystring,
      00114                                              wxString output_string_array[] 
      00115                                            );
      00116 
      00118 
      00122     static wxString color_to_hex_string( wxColor input_color );
      00123     
      00125 
      00129     static wxColor hex_string_to_color( wxString input_string );
      00130     
      00132 
      00137     static bool is_valid_hex_color_string ( wxString input_string );
      00138     
      00140 
      00146     static wxString remove_illegal_characters( const wxString& input_string,
      00147                                                const wxString& legal_characters
      00148                                              );
      00149 
      00151 
      00157     static wxString remove_trailing_dir_separator( const wxString& input_directory );
      00158 
      00160     static void helper_arraystring_to_string_array( const wxArrayString& input_arraystring,
      00161                                                     wxString **choices );
      00162 
      00163 };
      00164 
      00165 //----------------------------------------------------------------------------------------
      00166 // End single inclusion of this .h file condition
      00167 //----------------------------------------------------------------------------------------
      00168 
      00169 #endif  //_UTILS_STRING_H_
      00170