DUNE-DAQ
DUNE Trigger and Data Acquisition software
Loading...
Searching...
No Matches
TestCircularDependency Struct Reference

Public Member Functions

 TestCircularDependency (const std::string *file)
 
bool push (const std::string *file)
 
void pop ()
 

Public Attributes

std::vector< const std::string * > p_vector_includes
 
std::set< const std::string *, OksFile::SortByNamep_set_includes
 

Detailed Description

Definition at line 149 of file oks_validate_repository.cxx.

Constructor & Destructor Documentation

◆ TestCircularDependency()

TestCircularDependency::TestCircularDependency ( const std::string * file)
inline

Definition at line 151 of file oks_validate_repository.cxx.

152 {
153 p_set_includes.insert(file);
154 p_vector_includes.push_back(file);
155 }
std::vector< const std::string * > p_vector_includes
std::set< const std::string *, OksFile::SortByName > p_set_includes

Member Function Documentation

◆ pop()

void TestCircularDependency::pop ( )
inline

Definition at line 188 of file oks_validate_repository.cxx.

189 {
190 p_set_includes.erase(p_vector_includes.back());
191 p_vector_includes.pop_back();
192 }

◆ push()

bool TestCircularDependency::push ( const std::string * file)
inline

Definition at line 158 of file oks_validate_repository.cxx.

159 {
160 auto it = p_set_includes.insert(file);
161 if (it.second == false)
162 {
163 std::ostringstream s;
164
165 bool report = false;
166
167 for (const auto& x : p_vector_includes)
168 {
169 if (x == *it.first)
170 {
171 s_circular_dependency_message.m_text << "\nCircular dependency [" << ++s_circular_dependency_message.m_count << "]:";
172 report = true;
173 }
174
175 if (report)
176 s_circular_dependency_message.m_text << '\n' << " - \"" << *x << "\"";
177 }
178
179 return false;
180 }
181
182 p_vector_includes.push_back(file);
183
184 return true;
185 }
struct FoundCircularDependency s_circular_dependency_message

Member Data Documentation

◆ p_set_includes

std::set<const std::string *, OksFile::SortByName> TestCircularDependency::p_set_includes

Definition at line 195 of file oks_validate_repository.cxx.

◆ p_vector_includes

std::vector<const std::string *> TestCircularDependency::p_vector_includes

Definition at line 194 of file oks_validate_repository.cxx.


The documentation for this struct was generated from the following file: