| 
					 | 
				
					
						
  |  	
						| 
									 |  
			  		
									
										| 
													 
  Home / Open source / Terimber 2.0 
base_string< T > Class Template Referencesupports base string functionality  
 More...
#include <string.h>
 
 
List of all members. 
 |  
 Public Member Functions |  
|   | base_string (byte_allocator *allocator_=0) |  
|   | default constructor  
  |  
|   | ~base_string () |  
|   | destructor  
  |  
|   | base_string (const T *x, byte_allocator *allocator_=0) |  
|   | constructor from another string  
  |  
|   | base_string (const base_string< T > &x) |  
|   | copy constructor  
  |  
|   | operator const T * () const  |  
|   | gets string pointer makes it inline, Microsoft can't compile this operator outside header file  
  |  
| base_string< T > &  | operator= (const base_string< T > &x) |  
|   | assign operator  
  |  
| base_string< T > &  | operator= (const T *x) |  
|   | assign operator from string  
  |  
| bool  | operator== (const base_string< T > &x) const  |  
|   | operator==  
  |  
| bool  | operator!= (const base_string< T > &x) const  |  
|   | operator!=  
  |  
| bool  | operator< (const base_string< T > &x) const  |  
|   | operator<  
  |  
| bool  | operator<= (const base_string< T > &x) const  |  
|   | operator<=  
  |  
| bool  | operator> (const base_string< T > &x) const  |  
|   | operator>  
  |  
| bool  | operator>= (const base_string< T > &x) const  |  
|   | operator>=  
  |  
| base_string< T > &  | operator+= (const base_string< T > &x) |  
|   | operator+=  
  |  
| bool  | operator== (const T *x) const  |  
|   | operator==  
  |  
| bool  | operator!= (const T *x) const  |  
|   | operator!=  
  |  
| bool  | operator< (const T *x) const  |  
|   | operator<  
  |  
| bool  | operator<= (const T *x) const  |  
|   | operator<=  
  |  
| bool  | operator> (const T *x) const  |  
|   | operator>  
  |  
| bool  | operator>= (const T *x) const  |  
|   | operator>=  
  |  
| int  | compare (const T *x, size_t size=os_minus_one) const  |  
|   | compare function  
  |  
| base_string< T > &  | operator+= (const T *x) |  
|   | operator+= for another string  
  |  
| base_string< T > &  | append (const T *x, size_t size=os_minus_one) |  
|   | appends string  
  |  
| base_string< T > &  | assign (const T *x, size_t size=os_minus_one) |  
|   | assign string  
  |  
| size_t  | length () const  |  
|   | returns string length  
  |  
| T *  | reserve (size_t size) |  
|   | reserves memory, be very careful and write no more than allocated chars  
  |  
| byte_allocator *  | get_allocator () |  
|   | gets external allocator specified in constructor, if any  
  |  
 Private Types |  
| enum   | en_base_string_size { S =  sizeof(T)
 } |  
|   | calculates char size  More...
  |  
 Private Member Functions |  
| int  | _compare (const T *x, size_t len=os_minus_one) const  |  
|   | compare function  
  |  
| void  | _assign (const T *x, size_t len=os_minus_one) |  
|   | allocates string if need & assign  
  |  
| void  | _add (const T *x, size_t len=os_minus_one) |  
|   | appends new string to assigned one previously  
  |  
| void  | _create () |  
|   | allocates string  
  |  
| void  | _destroy () |  
|   | destroys string  
  |  
 Private Attributes |  
| byte_allocator *  | _allocator |  
|   | external allocator  
  |  
| T *  | _handle |  
|   | string buffer  
  |  
| size_t  | _length |  
|   | string length  
  |  
 
 Detailed Description
template<class T> 
 class base_string< T >
supports base string functionality 
 Definition at line 39 of file string.h. 
 Member Enumeration Documentation
calculates char size 
 
 - Enumerator: 
 - 
  
Definition at line 43 of file string.h. 
 
 
 
 Constructor & Destructor Documentation
default constructor 
 
 - Parameters: 
 - 
| allocator_  | 
optional external allocator  |  
 
  
Definition at line 43 of file string.hpp. 
 
 
 
 
constructor from another string 
 
 - Parameters: 
 - 
| x  | 
input string  |  
| allocator_  | 
optional external allocator  |  
 
  
Definition at line 60 of file string.hpp. 
 
 
 
 
 Member Function Documentation
template<class T>  
      
        
          | base_string< T >::operator const T *            | 
          ( | 
                     | 
           )  | 
           const [inline] | 
         
       
 
 
 
 
 
 
 
 
 
 
 
 
template<class T>  
      
        
          | bool base_string< T >::operator==            | 
          ( | 
          const T *  | 
           x           | 
           )  | 
           const [inline] | 
         
       
 
 
 
template<class T>  
      
        
          | bool base_string< T >::operator!=            | 
          ( | 
          const T *  | 
           x           | 
           )  | 
           const [inline] | 
         
       
 
 
 
template<class T>  
      
        
          | bool base_string< T >::operator<            | 
          ( | 
          const T *  | 
           x           | 
           )  | 
           const [inline] | 
         
       
 
 
 
template<class T>  
      
        
          | bool base_string< T >::operator<=            | 
          ( | 
          const T *  | 
           x           | 
           )  | 
           const [inline] | 
         
       
 
 
 
template<class T>  
      
        
          | bool base_string< T >::operator>            | 
          ( | 
          const T *  | 
           x           | 
           )  | 
           const [inline] | 
         
       
 
 
 
template<class T>  
      
        
          | bool base_string< T >::operator>=            | 
          ( | 
          const T *  | 
           x           | 
           )  | 
           const [inline] | 
         
       
 
 
 
 
 
 
 
returns string length 
 
 Definition at line 252 of file string.hpp. 
References base_string< T >::_length. 
Referenced by xml_document::add_def_attributes(), xml_document::assign_attribute_value(), xml_stream_attribute::combine_url(), dtd_processor::expandPEReference(), xmlconfig::get(), daemon::install(), daemon::is_installed(), stream_input_common::open(), mysql_dbserver::parse_connection_string(), dtd_processor::parseAttDef(), xml_processor::parseDocTypeDecl(), xml_persistor::persistAttributeDecl(), xml_persistor::persistDocType(), xml_persistor::persistEntityDecl(), xml_persistor::persistNotationDecl(), xml_stream_attribute::prepare_http_request(), xml_stream_attribute::prepare_socket_request(), var_object_repository::process_condition(), byte_manager::resolveEntity(), msg_user_connection::send(), xml_document::set_doc_name(), orcl_dbserver::v_before_execute(), mysql_dbserver::v_before_execute(), mysql_dbserver::v_bind_one_param(), mysql_dbserver::v_connect(), orcl_dbserver::v_replace_quote(), odbc_dbserver::v_replace_quote(), mysql_dbserver::v_replace_quote(), and xmlconfig::xmlconfig(). 
 
 
 
 
 
compare function 
 
 - Parameters: 
 - 
| x  | 
input string  |  
| len  | 
string length  |  
 
  
Definition at line 288 of file string.hpp. 
References base_string< T >::_handle, base_string< T >::_length, os_minus_one, str_template::strcmp(), and str_template::strlen(). 
Referenced by base_string< T >::compare(), base_string< T >::operator!=(), base_string< T >::operator<(), base_string< T >::operator<=(), base_string< T >::operator==(), base_string< T >::operator>(), and base_string< T >::operator>=(). 
 
 
 
 
 
 
 
 Member Data Documentation
 
string buffer 
 
 Definition at line 199 of file string.h. 
Referenced by base_string< T >::_add(), base_string< T >::_assign(), base_string< T >::_compare(), base_string< T >::_create(), base_string< T >::_destroy(), base_string< T >::operator const T *(), base_string< T >::operator!=(), base_string< T >::operator+=(), base_string< T >::operator<(), base_string< T >::operator<=(), base_string< T >::operator=(), base_string< T >::operator==(), base_string< T >::operator>(), base_string< T >::operator>=(), and base_string< T >::reserve(). 
 
 
 
string length 
 
 Definition at line 200 of file string.h. 
Referenced by base_string< T >::_add(), base_string< T >::_assign(), base_string< T >::_compare(), base_string< T >::_create(), base_string< T >::_destroy(), base_string< T >::length(), base_string< T >::operator!=(), base_string< T >::operator+=(), base_string< T >::operator<(), base_string< T >::operator<=(), base_string< T >::operator=(), base_string< T >::operator==(), base_string< T >::operator>(), base_string< T >::operator>=(), and base_string< T >::reserve(). 
 
 
 
 The documentation for this class was generated from the following files: 
 
												 | 
												
  | 
										 
									 
								 | 
						 
					  |