FOSSology  4.4.0
Open Source License Compliance by Open Source Software
ojomatch.hpp
1 /*
2  SPDX-FileCopyrightText: © 2019 Siemens AG
3 
4  SPDX-License-Identifier: GPL-2.0-only
5 */
6 
7 #ifndef SRC_OJO_AGENT_OJOMATCH_HPP_
8 #define SRC_OJO_AGENT_OJOMATCH_HPP_
9 
10 #include <string>
11 
16 struct ojomatch
17 {
28  long int start, end, len, license_fk;
29 
34  std::string content;
42  ojomatch(const long int s, const long int e, const long int l,
43  const std::string c) :
44  start(s), end(e), len(l), content(c)
45  {
46  license_fk = -1;
47  }
52  start(-1), end(-1), len(-1), license_fk(-1), content("")
53  {
54  }
55 
56  bool operator==(const std::string& matchcontent) const
57  {
58  if(this->content.compare(matchcontent) == 0)
59  {
60  return true;
61  }
62  else
63  {
64  return false;
65  }
66  }
67 
68  bool operator==(const ojomatch& matchcontent) const
69  {
70  if(this->content.compare(matchcontent.content) == 0)
71  {
72  return true;
73  }
74  else
75  {
76  return false;
77  }
78  }
79 };
80 
81 #endif /* SRC_OJO_AGENT_OJOMATCH_HPP_ */
int s
The socket that the CLI will use to communicate.
Definition: fo_cli.c:37
Store the results of a regex match.
Definition: ojomatch.hpp:17
ojomatch(const long int s, const long int e, const long int l, const std::string c)
Definition: ojomatch.hpp:42
long int license_fk
Definition: ojomatch.hpp:28
long int end
Definition: ojomatch.hpp:28
long int start
Definition: ojomatch.hpp:28
ojomatch()
Definition: ojomatch.hpp:51
long int len
Definition: ojomatch.hpp:28