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::SortByName > p_set_includes

Detailed Description

Definition at line 143 of file oks_validate_repository.cxx.

Constructor & Destructor Documentation

◆ TestCircularDependency()

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

Definition at line 145 of file oks_validate_repository.cxx.

146 {
147 p_set_includes.insert(file);
148 p_vector_includes.push_back(file);
149 }
std::set< const std::string *, OksFile::SortByName > p_set_includes
std::vector< const std::string * > p_vector_includes

Member Function Documentation

◆ pop()

void TestCircularDependency::pop ( )
inline

Definition at line 178 of file oks_validate_repository.cxx.

179 {
180 p_set_includes.erase(p_vector_includes.back());
181 p_vector_includes.pop_back();
182 }

◆ push()

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

Definition at line 151 of file oks_validate_repository.cxx.

152 {
153 auto it = p_set_includes.insert(file);
154 if (it.second == false) {
155 std::ostringstream s;
156
157 bool report = false;
158
159 for (const auto& x : p_vector_includes) {
160 if (x == *it.first) {
162 << "]:";
163 report = true;
164 }
165
166 if (report)
167 s_circular_dependency_message.m_text << '\n' << " - \"" << *x << "\"";
168 }
169
170 return false;
171 }
172
173 p_vector_includes.push_back(file);
174
175 return true;
176 }
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 185 of file oks_validate_repository.cxx.

◆ p_vector_includes

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

Definition at line 184 of file oks_validate_repository.cxx.


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