x
Yes
No
Do you want to visit DriveHQ English website?
Inicio
Características
Precios
Prueba gratuita
Software cliente
Acerca de nosotros
Servidor de archivos
|
Solución de copias de seguridad
|
Servidor FTP
|
Servidor de correo electrónico
|
Alojamiento web
|
Software cliente
Servidor de archivos
Solución de copia de seguridad
Servidor FTP
Servidor de correo electrónico
Alojamiento web
Software cliente
attr_matcher.hpp - Hosted on DriveHQ Cloud IT Platform
Arriba
Subir
Descargar
Compartir
Publicar
Nueva carpeta
Nuevo archivo
Copiar
Cortar
Eliminar
Pegar
Clasificación
Actualizar
Ruta de la carpeta: \\game3dprogramming\materials\GameFactory\GameFactoryDemo\references\boost_1_35_0\boost\xpressive\detail\core\matcher\attr_matcher.hpp
Girar
Efecto
Propiedad
Historial
/////////////////////////////////////////////////////////////////////////////// // attr_matcher.hpp // // Copyright 2007 Eric Niebler. // Copyright 2007 David Jenkins. // // Distributed under the Boost Software License, Version 1.0. (See // accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_XPRESSIVE_DETAIL_CORE_MATCHER_ATTR_MATCHER_HPP_EAN_06_09_2007 #define BOOST_XPRESSIVE_DETAIL_CORE_MATCHER_ATTR_MATCHER_HPP_EAN_06_09_2007 // MS compatible compilers support #pragma once #if defined(_MSC_VER) && (_MSC_VER >= 1020) # pragma once #endif #include
#include
#include
#include
namespace boost { namespace xpressive { namespace detail { /////////////////////////////////////////////////////////////////////////////// // char_translate // template
struct char_translate { typedef typename Traits::char_type char_type; Traits const &traits_; explicit char_translate(Traits const &traits) : traits_(traits) {} char_type operator ()(char_type ch1) const { return this->traits_.translate(ch1); } }; /////////////////////////////////////////////////////////////////////////////// // char_translate // template
struct char_translate
{ typedef typename Traits::char_type char_type; Traits const &traits_; explicit char_translate(Traits const &traits) : traits_(traits) {} char_type operator ()(char_type ch1) const { return this->traits_.translate_nocase(ch1); } }; /////////////////////////////////////////////////////////////////////////////// // attr_matcher // Note: the Matcher is a std::map template
struct attr_matcher : quant_style
{ typedef typename Matcher::value_type::second_type const* result_type; attr_matcher(int slot, Matcher const &matcher, Traits const& traits) : slot_(slot-1) { char_translate
trans(traits); this->sym_.load(matcher, trans); } template
bool match(match_state
&state, Next const &next) const { BidiIter tmp = state.cur_; char_translate
trans(traits_cast
(state)); result_type const &result = this->sym_(state.cur_, state.end_, trans); if(result) { void const *old_slot = state.attr_context_.attr_slots_[this->slot_]; state.attr_context_.attr_slots_[this->slot_] = &*result; if(next.match(state)) { return true; } state.attr_context_.attr_slots_[this->slot_] = old_slot; } state.cur_ = tmp; return false; } int slot_; boost::xpressive::detail::symbols
sym_; }; }}} #endif
attr_matcher.hpp
Dirección de la página
Dirección del archivo
Anterior
13/36
Siguiente
Descargar
( 3 KB )
Comments
Total ratings:
0
Average rating:
No clasificado
of 10
Would you like to comment?
Join now
, or
Logon
if you are already a member.