| 129 | } |
| 130 | |
| 131 | FrameListPtr ExclusionFrameList::parse( const std::string &frameList ) |
| 132 | { |
| 133 | boost::tokenizer<boost::char_separator<char> > t( frameList, boost::char_separator<char>( "!" ) ); |
| 134 | std::vector<std::string> tokens; |
| 135 | std::copy( t.begin(), t.end(), std::back_inserter( tokens ) ); |
| 136 | |
| 137 | if ( tokens.size() == 2 ) |
| 138 | { |
| 139 | try |
| 140 | { |
| 141 | FrameListPtr f1 = FrameList::parse( tokens[0] ); |
| 142 | FrameListPtr f2 = FrameList::parse( tokens[1] ); |
| 143 | |
| 144 | if ( f1 && f2 ) |
| 145 | { |
| 146 | return new ExclusionFrameList( f1, f2 ); |
| 147 | } |
| 148 | } |
| 149 | catch ( Exception & ) |
| 150 | { |
| 151 | return nullptr; |
| 152 | } |
| 153 | } |
| 154 | return nullptr; |
| 155 | } |