TKeyListIterator CCategory::VariableList( TKeyList& aKeys )const { TKeyListIterator ret( aKeys.end() ); TVariableSeq::const_iterator I_variables( _variables.begin() ); if( aKeys.size() ) { I_variables = _variables.find( aKeys.back() ); if( I_variables != _variables.end() ) { ++I_variables; } } for( ; I_variables != _variables.end(); ++I_variables ) { if( ret == aKeys.end() ) { ret = aKeys.insert( ret, I_variables->first ); } else { aKeys.push_back( I_variables->first ); } } return ret; }
TKeyListIterator CCategory::VariableList( CCategoryKeyParser& aKey, TKeyList& aKeys )const { TKeyListIterator ret( aKeys.end() ); std::string categoryName; if( !aKey.NextCategory( categoryName ) ) { aKey.Variable( categoryName ); } if( categoryName.size() ) { TCategorySeq::const_iterator i( _categories.find( categoryName ) ); if( i != _categories.end() ) { if( aKey.IsCategoryValid() ) { ret = i->second.second->VariableList( aKey, aKeys ); } else { ret = i->second.second->VariableList( aKeys ); } } } else { ret = VariableList( aKeys ); } return ret; }
TKeyListIterator CAbstractRegistryDriver::VariableList( const std::string& aKey, TKeyList& aList )const { CMutexLocker locker( synchronization().mutex() ); TKeyListIterator ret( aList.end() ); do { CCategoryKeyParser keyParser( aKey ); ret = category()->VariableList( keyParser, aList ); synchronization().continueRead(); } while( ret == aList.end() && isRun() ); return ret; }