Jpp  18.4.0
the software that should make you happy
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
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 111 of file JDatalogString.hh.

Constructor & Destructor Documentation

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

Constructor.

Parameters
bufferlist of valid source names

Definition at line 119 of file JDatalogString.hh.

119  :
121  {}

Member Function Documentation

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 131 of file JDatalogString.hh.

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

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