Jpp  master_rocky
the software that should make you happy
Public Member Functions | List of all members
JDB::JKeywords Struct Reference

Auxiliary data structure for selecting data. More...

#include <JDatalogString.hh>

Inheritance diagram for JDB::JKeywords:
std::vector< std::string >

Public Member Functions

 JKeywords (const std::initializer_list< std::string > &buffer)
 Constructor. More...
 
bool operator() (const std::string &target) const
 Test validity of target. More...
 

Detailed Description

Auxiliary data structure for selecting data.

Definition at line 112 of file JDatalogString.hh.

Constructor & Destructor Documentation

◆ JKeywords()

JDB::JKeywords::JKeywords ( const std::initializer_list< std::string > &  buffer)
inline

Constructor.

Parameters
bufferlist of valid source names

Definition at line 120 of file JDatalogString.hh.

120  :
122  {}

Member Function Documentation

◆ operator()()

bool JDB::JKeywords::operator() ( const std::string &  target) const
inline

Test validity of target.

A target is valid if it contains one of the keywords.

Parameters
targettarget
Returns
true if valid; else false

Definition at line 132 of file JDatalogString.hh.

133  {
134  for (const_iterator i = this->begin(); i != this->end(); ++i) {
135  if (target.find(*i) != std::string::npos) {
136  return true;
137  }
138  }
139 
140  return false;
141  }
Target.
Definition: JHead.hh:300

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