MCPcopy Create free account
hub / github.com/ImageEngine/cortex / VariableProviderWrapper

Class VariableProviderWrapper

src/IECorePython/StringAlgoBinding.cpp:73–102  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

71#if BOOST_VERSION > 105500
72
73struct 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
104std::string substituteWrapper1( const std::string &input, ConstCompoundDataPtr variables, unsigned substitutions )
105{

Callers

nothing calls this directly

Calls 1

checkMethod · 0.45

Tested by

no test coverage detected