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 154 of file oks_validate_repository.cxx.

Constructor & Destructor Documentation

◆ TestCircularDependency()

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

Definition at line 156 of file oks_validate_repository.cxx.

157 {
158 p_set_includes.insert(file);
159 p_vector_includes.push_back(file);
160 }
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 193 of file oks_validate_repository.cxx.

194 {
195 p_set_includes.erase(p_vector_includes.back());
196 p_vector_includes.pop_back();
197 }

◆ push()

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

Definition at line 163 of file oks_validate_repository.cxx.

164 {
165 auto it = p_set_includes.insert(file);
166 if (it.second == false)
167 {
168 std::ostringstream s;
169
170 bool report = false;
171
172 for (const auto& x : p_vector_includes)
173 {
174 if (x == *it.first)
175 {
176 s_circular_dependency_message.m_text << "\nCircular dependency [" << ++s_circular_dependency_message.m_count << "]:";
177 report = true;
178 }
179
180 if (report)
181 s_circular_dependency_message.m_text << '\n' << " - \"" << *x << "\"";
182 }
183
184 return false;
185 }
186
187 p_vector_includes.push_back(file);
188
189 return true;
190 }
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 200 of file oks_validate_repository.cxx.

◆ p_vector_includes

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

Definition at line 199 of file oks_validate_repository.cxx.


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