The Gaudi Framework  v29r0 (ff2e7097)
IncludedFiles.cpp
Go to the documentation of this file.
1 // ============================================================================
2 // STD:
3 // ============================================================================
4 #include <assert.h>
5 // ============================================================================
6 #include "IncludedFiles.h"
7 #include "Position.h"
8 // ============================================================================
9 namespace gp = Gaudi::Parsers;
10 // ============================================================================
11 bool gp::IncludedFiles::IsIncluded( const std::string& filename ) const
12 {
13  return container_.find( filename ) != container_.end();
14 }
15 // ============================================================================
16 bool gp::IncludedFiles::AddFile( std::string filename, Position from )
17 {
18  return container_.emplace( std::move( filename ), std::move( from ) ).second;
19 }
20 // ============================================================================
21 bool gp::IncludedFiles::GetPosition( const std::string& filename, const Position** pos ) const
22 {
23  auto iter = container_.find( filename );
24  if ( iter == container_.end() ) return false;
25  *pos = &iter->second;
26  assert( pos );
27  return true;
28 }
29 // ============================================================================
STL class.
T move(T...args)