| 71 | #if BOOST_VERSION > 105500 |
| 72 | |
| 73 | struct VariableProviderWrapper : StringAlgo::VariableProvider, wrapper<StringAlgo::VariableProvider> |
| 74 | { |
| 75 | |
| 76 | int frame() const override |
| 77 | { |
| 78 | return this->get_override( "frame" )(); |
| 79 | } |
| 80 | |
| 81 | const std::string &variable( const boost::string_view &name, bool &recurse ) const override |
| 82 | { |
| 83 | object result = this->get_override( "variable" )( std::string( name ) ); |
| 84 | extract<tuple> tupleExtractor( result ); |
| 85 | if( tupleExtractor.check() ) |
| 86 | { |
| 87 | tuple t = tupleExtractor(); |
| 88 | m_convertedString = extract<std::string>( t[0] ); |
| 89 | recurse = extract<bool>( t[1] ); |
| 90 | } |
| 91 | else |
| 92 | { |
| 93 | m_convertedString = extract<std::string>( result ); |
| 94 | } |
| 95 | return m_convertedString; |
| 96 | } |
| 97 | |
| 98 | private : |
| 99 | |
| 100 | mutable std::string m_convertedString; |
| 101 | |
| 102 | }; |
| 103 | |
| 104 | std::string substituteWrapper1( const std::string &input, ConstCompoundDataPtr variables, unsigned substitutions ) |
| 105 | { |