Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

xtl_quote_sym.h

Go to the documentation of this file.
00001 
00002 // Common Text Transformation Library
00003 // Copyright (C) 1997-2006 by Igor Kholodov. 
00004 //
00005 // This library is free software; you can redistribute it and/or
00006 // modify it under the terms of the GNU Lesser General Public
00007 // License as published by the Free Software Foundation; either
00008 // version 2.1 of the License, or (at your option) any later version.
00009 //
00010 // This library is distributed in the hope that it will be useful,
00011 // but WITHOUT ANY WARRANTY; without even the implied warranty of
00012 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00013 // Lesser General Public License for more details.
00014 //
00015 // You should have received a copy of the GNU Lesser General Public
00016 // License along with this library; if not, write to the
00017 // Free Software Foundation, Inc.,
00018 // 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
00019 //
00020 // mailto:cttl@users.sourceforge.net
00021 // http://sourceforge.net/projects/cttl/
00023 
00035 // xtl_quote_sym.h
00036 
00037 #ifndef _CTTL_XTL_QUOTE_SYM_H_INCLUDED_
00038 #define _CTTL_XTL_QUOTE_SYM_H_INCLUDED_
00039 
00040 namespace cttl {
00041 
00042 using namespace cttl_impl;
00043 
00084 template< typename LeftT, typename MiddleT, typename RightT >
00085 inline
00086 xtl_wrap<
00087     xtl_quote_generic<
00088         xtl_wrap< LeftT >,
00089         xtl_wrap< MiddleT >,
00090         xtl_wrap< RightT >
00091     >
00092 >
00093 quote( xtl_wrap< LeftT > const& left_, xtl_wrap< MiddleT > const& middle_, xtl_wrap< RightT > const& right_ )
00094 {
00095     typedef
00096         xtl_quote_generic<
00097             xtl_wrap< LeftT >,
00098             xtl_wrap< MiddleT >,
00099             xtl_wrap< RightT >
00100         >
00101         xtl_quote_T;
00102 
00103     return xtl_wrap< xtl_quote_T >( xtl_quote_T( left_, middle_, right_ ) );
00104 }
00105 
00106 
00137 template< typename MiddleT, typename RightT >
00138 inline
00139 xtl_wrap<
00140     xtl_quote_bool<
00141         xtl_wrap< MiddleT >,
00142         xtl_wrap< RightT >
00143     >
00144 >
00145 quote( bool, xtl_wrap< MiddleT > const& middle_, xtl_wrap< RightT > const& right_ )
00146 {
00147     typedef
00148         xtl_quote_bool<
00149             xtl_wrap< MiddleT >,
00150             xtl_wrap< RightT >
00151         >
00152         xtl_quote_T;
00153 
00154     return xtl_wrap< xtl_quote_T >( xtl_quote_T( middle_, right_ ) );
00155 }
00156 
00157 
00184 template< typename MiddleT >
00185 inline
00186 xtl_wrap<
00187     xtl_quote_generic<
00188         xtl_wrap< xtl_char< CTTL_STD_CHAR > >,
00189         xtl_wrap< MiddleT >,
00190         xtl_wrap< xtl_char< CTTL_STD_CHAR > >
00191     >
00192 >
00193 quote( CTTL_STD_CHAR left_, xtl_wrap< MiddleT > const& middle_, CTTL_STD_CHAR right_ )
00194 {
00195     typedef
00196         xtl_quote_generic<
00197             xtl_wrap< xtl_char< CTTL_STD_CHAR > >,
00198             xtl_wrap< MiddleT >,
00199             xtl_wrap< xtl_char< CTTL_STD_CHAR > >
00200         >
00201         xtl_quote_T;
00202 
00203     return xtl_wrap< xtl_quote_T >( xtl_quote_T( xtl_char< CTTL_STD_CHAR >( left_ ), middle_, xtl_char< CTTL_STD_CHAR >( right_ ) ) );
00204 }
00205 
00206 
00233 template< typename MiddleT >
00234 inline
00235 xtl_wrap<
00236     xtl_quote_generic<
00237         xtl_wrap< xtl_char< CTTL_STD_WCHAR > >,
00238         xtl_wrap< MiddleT >,
00239         xtl_wrap< xtl_char< CTTL_STD_WCHAR > >
00240     >
00241 >
00242 wchar_quote( CTTL_STD_WCHAR left_, xtl_wrap< MiddleT > const& middle_, CTTL_STD_WCHAR right_ )
00243 {
00244     typedef
00245         xtl_quote_generic<
00246             xtl_wrap< xtl_char< CTTL_STD_WCHAR > >,
00247             xtl_wrap< MiddleT >,
00248             xtl_wrap< xtl_char< CTTL_STD_WCHAR > >
00249         >
00250         xtl_quote_T;
00251 
00252     return xtl_wrap< xtl_quote_T >( xtl_quote_T( xtl_char< CTTL_STD_WCHAR >( left_ ), middle_, xtl_char< CTTL_STD_WCHAR >( right_ ) ) );
00253 }
00254 
00255 
00276 template< typename MiddleT >
00277 inline
00278 xtl_wrap<
00279     xtl_quote_ansi_single_quote< xtl_wrap< MiddleT >, CTTL_STD_CHAR >
00280 >
00281 ansi_single_quote( xtl_wrap< MiddleT > const& middle_ )
00282 {
00283     return xtl_wrap< xtl_quote_ansi_single_quote< xtl_wrap< MiddleT >, CTTL_STD_CHAR > >( xtl_quote_ansi_single_quote< xtl_wrap< MiddleT >, CTTL_STD_CHAR >( middle_ ) );
00284 }
00285 
00300 inline ansi_single_quote_T
00301 ansi_single_quote()
00302 {
00303     return ansi_single_quote_T( xtl_quote_ansi_single_quote< relaxed_bool_T, CTTL_STD_CHAR >( true ) );
00304 }
00305 
00326 template< typename MiddleT >
00327 inline xtl_wrap< xtl_quote_ansi_double_quote< xtl_wrap< MiddleT >, CTTL_STD_CHAR > >
00328 ansi_double_quote( xtl_wrap< MiddleT > const& middle_ )
00329 {
00330     return xtl_wrap< xtl_quote_ansi_double_quote< xtl_wrap< MiddleT >, CTTL_STD_CHAR > >( xtl_quote_ansi_double_quote< xtl_wrap< MiddleT >, CTTL_STD_CHAR >( middle_ ) );
00331 }
00332 
00347 inline ansi_double_quote_T
00348 ansi_double_quote()
00349 {
00350     return ansi_double_quote_T( xtl_quote_ansi_double_quote< relaxed_bool_T, CTTL_STD_CHAR >( true ) );
00351 }
00352 
00373 template< typename MiddleT >
00374 inline
00375 xtl_wrap<
00376     xtl_quote_c_single_quote< xtl_wrap< MiddleT >, CTTL_STD_CHAR >
00377 >
00378 c_single_quote( xtl_wrap< MiddleT > const& middle_ )
00379 {
00380     return xtl_wrap< xtl_quote_c_single_quote< xtl_wrap< MiddleT >, CTTL_STD_CHAR > >( xtl_quote_c_single_quote< xtl_wrap< MiddleT >, CTTL_STD_CHAR >( middle_ ) );
00381 }
00382 
00397 inline c_single_quote_T
00398 c_single_quote()
00399 {
00400     return c_single_quote_T( xtl_quote_c_single_quote< relaxed_bool_T, CTTL_STD_CHAR >( true ) );
00401 }
00402 
00403 
00424 template< typename MiddleT >
00425 inline xtl_wrap< xtl_quote_c_double_quote< xtl_wrap< MiddleT >, CTTL_STD_CHAR > >
00426 c_double_quote( xtl_wrap< MiddleT > const& middle_ )
00427 {
00428     return xtl_wrap< xtl_quote_c_double_quote< xtl_wrap< MiddleT >, CTTL_STD_CHAR > >( xtl_quote_c_double_quote< xtl_wrap< MiddleT >, CTTL_STD_CHAR >( middle_ ) );
00429 }
00430 
00445 inline c_double_quote_T
00446 c_double_quote()
00447 {
00448     return c_double_quote_T( xtl_quote_c_double_quote< relaxed_bool_T, CTTL_STD_CHAR >( true ) );
00449 }
00450 
00451 
00472 template< typename MiddleT >
00473 inline
00474 xtl_wrap<
00475     xtl_quote_ansi_single_quote< xtl_wrap< MiddleT >, CTTL_STD_WCHAR >
00476 >
00477 wchar_ansi_single_quote( xtl_wrap< MiddleT > const& middle_ )
00478 {
00479     return xtl_wrap< xtl_quote_ansi_single_quote< xtl_wrap< MiddleT >, CTTL_STD_WCHAR > >( xtl_quote_ansi_single_quote< xtl_wrap< MiddleT >, CTTL_STD_WCHAR >( middle_ ) );
00480 }
00481 
00496 inline wchar_ansi_single_quote_T
00497 wchar_ansi_single_quote()
00498 {
00499     return wchar_ansi_single_quote_T( xtl_quote_ansi_single_quote< relaxed_bool_T, CTTL_STD_WCHAR >( true ) );
00500 }
00501 
00502 
00523 template< typename MiddleT >
00524 inline xtl_wrap< xtl_quote_ansi_double_quote< xtl_wrap< MiddleT >, CTTL_STD_WCHAR > >
00525 wchar_ansi_double_quote( xtl_wrap< MiddleT > const& middle_ )
00526 {
00527     return xtl_wrap< xtl_quote_ansi_double_quote< xtl_wrap< MiddleT >, CTTL_STD_WCHAR > >( xtl_quote_ansi_double_quote< xtl_wrap< MiddleT >, CTTL_STD_WCHAR >( middle_ ) );
00528 }
00529 
00530 
00545 inline wchar_ansi_double_quote_T
00546 wchar_ansi_double_quote()
00547 {
00548     return wchar_ansi_double_quote_T( xtl_quote_ansi_double_quote< relaxed_bool_T, CTTL_STD_WCHAR >( true ) );
00549 }
00550 
00551 
00572 template< typename MiddleT >
00573 inline
00574 xtl_wrap<
00575     xtl_quote_c_single_quote< xtl_wrap< MiddleT >, CTTL_STD_WCHAR >
00576 >
00577 wchar_c_single_quote( xtl_wrap< MiddleT > const& middle_ )
00578 {
00579     return xtl_wrap< xtl_quote_c_single_quote< xtl_wrap< MiddleT >, CTTL_STD_WCHAR > >( xtl_quote_c_single_quote< xtl_wrap< MiddleT >, CTTL_STD_WCHAR >( middle_ ) );
00580 }
00581 
00582 
00597 inline wchar_c_single_quote_T
00598 wchar_c_single_quote()
00599 {
00600     return wchar_c_single_quote_T( xtl_quote_c_single_quote< relaxed_bool_T, CTTL_STD_WCHAR >( true ) );
00601 }
00602 
00603 
00624 template< typename MiddleT >
00625 inline xtl_wrap< xtl_quote_c_double_quote< xtl_wrap< MiddleT >, CTTL_STD_WCHAR > >
00626 wchar_c_double_quote( xtl_wrap< MiddleT > const& middle_ )
00627 {
00628     return xtl_wrap< xtl_quote_c_double_quote< xtl_wrap< MiddleT >, CTTL_STD_WCHAR > >( xtl_quote_c_double_quote< xtl_wrap< MiddleT >, CTTL_STD_WCHAR >( middle_ ) );
00629 }
00630 
00631 
00646 inline wchar_c_double_quote_T
00647 wchar_c_double_quote()
00648 {
00649     return wchar_c_double_quote_T( xtl_quote_c_double_quote< relaxed_bool_T, CTTL_STD_WCHAR >( true ) );
00650 }
00651 
00652 
00653 }   // namespace cttl
00654 
00655 
00656 #endif // _CTTL_XTL_QUOTE_SYM_H_INCLUDED_

Generated on Thu Nov 2 17:44:08 2006 for Common Text Transformation Library by  doxygen 1.3.9.1