Jpp 19.3.0-rc.3
the software that should make you happy
Loading...
Searching...
No Matches
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.
 
bool operator() (const std::string &target) const
 Test validity of target.
 

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 }

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