Auxiliary class for specifying selection of database data.  
 More...
#include <JSelector.hh>
 | 
|   | JSelector () | 
|   | Default constructor.  More...
  | 
|   | 
| template<class T >  | 
|   | JSelector (const std::string &key, const T value, const Selector::RelOp &operand=Selector::RelOp::Equal) | 
|   | Constructor.  More...
  | 
|   | 
| template<class JClass_t , class JType_t >  | 
|   | JSelector (JType_t JClass_t::*data_member, const JType_t value, const Selector::RelOp &operand=Selector::RelOp::Equal) | 
|   | Constructor.  More...
  | 
|   | 
| template<class JClass_t >  | 
|   | JSelector (std::string JClass_t::*data_member, const std::string value, const Selector::RelOp &operand=Selector::RelOp::Equal) | 
|   | Constructor.  More...
  | 
|   | 
| JSelector &  | add (const JSelector &selection) | 
|   | Add selection.  More...
  | 
|   | 
| template<class T >  | 
| JSelector &  | add (const std::string &key, const T value, const Selector::RelOp &operand=Selector::RelOp::Equal) | 
|   | Add selection.  More...
  | 
|   | 
| template<class JClass_t , class JType_t >  | 
| JSelector &  | add (JType_t JClass_t::*data_member, const JType_t value, const Selector::RelOp &operand=Selector::RelOp::Equal) | 
|   | Add selection.  More...
  | 
|   | 
| template<class JClass_t >  | 
| JSelector &  | add (std::string JClass_t::*data_member, const std::string &value, const Selector::RelOp &operand=Selector::RelOp::Equal) | 
|   | Add selection.  More...
  | 
|   | 
| JFirst_t &  | mul (const JSecond_t &object) | 
|   | Multiply with object.  More...
  | 
|   | 
Auxiliary class for specifying selection of database data. 
Definition at line 68 of file JDB/JSelector.hh.
 
  
  
      
        
          | JDATABASE::JSelector::JSelector  | 
          ( | 
           | ) | 
           | 
         
       
   | 
  
inline   | 
  
 
 
template<class T > 
  
  
      
        
          | JDATABASE::JSelector::JSelector  | 
          ( | 
          const std::string &  | 
          key,  | 
         
        
           | 
           | 
          const T  | 
          value,  | 
         
        
           | 
           | 
          const Selector::RelOp &  | 
          operand = Selector::RelOp::Equal  | 
         
        
           | 
          ) | 
           |  | 
         
       
   | 
  
inline   | 
  
 
Constructor. 
- Parameters
 - 
  
    | key | key  | 
    | value | value  | 
    | operand | operand  | 
  
   
Definition at line 94 of file JDB/JSelector.hh.
   96       add(key, value, operand);
 
JSelector & add(const JSelector &selection)
Add selection. 
 
 
 
 
template<class JClass_t , class JType_t > 
  
  
      
        
          | JDATABASE::JSelector::JSelector  | 
          ( | 
          JType_t JClass_t::*  | 
          data_member,  | 
         
        
           | 
           | 
          const JType_t  | 
          value,  | 
         
        
           | 
           | 
          const Selector::RelOp &  | 
          operand = Selector::RelOp::Equal  | 
         
        
           | 
          ) | 
           |  | 
         
       
   | 
  
inline   | 
  
 
Constructor. 
- Parameters
 - 
  
    | data_member | data member  | 
    | value | value  | 
    | operand | operand  | 
  
   
Definition at line 108 of file JDB/JSelector.hh.
  110       add(data_member, value, operand);
 
JSelector & add(const JSelector &selection)
Add selection. 
 
 
 
 
template<class JClass_t > 
  
  
      
        
          | JDATABASE::JSelector::JSelector  | 
          ( | 
          std::string JClass_t::*  | 
          data_member,  | 
         
        
           | 
           | 
          const std::string  | 
          value,  | 
         
        
           | 
           | 
          const Selector::RelOp &  | 
          operand = Selector::RelOp::Equal  | 
         
        
           | 
          ) | 
           |  | 
         
       
   | 
  
inline   | 
  
 
Constructor. 
- Parameters
 - 
  
    | data_member | data member  | 
    | value | value  | 
    | operand | operand  | 
  
   
Definition at line 122 of file JDB/JSelector.hh.
  124       add(data_member, value, operand);
 
JSelector & add(const JSelector &selection)
Add selection. 
 
 
 
 
Add selection. 
- Parameters
 - 
  
  
 
- Returns
 - this selection 
 
Definition at line 134 of file JDB/JSelector.hh.
  138       copy(selection.begin(), selection.end(), back_inserter(*
this));
 
void copy(const Head &from, JHead &to)
Copy header from from to to. 
 
 
 
 
template<class T > 
  
  
      
        
          | JSelector& JDATABASE::JSelector::add  | 
          ( | 
          const std::string &  | 
          key,  | 
         
        
           | 
           | 
          const T  | 
          value,  | 
         
        
           | 
           | 
          const Selector::RelOp &  | 
          operand = Selector::RelOp::Equal  | 
         
        
           | 
          ) | 
           |  | 
         
       
   | 
  
inline   | 
  
 
Add selection. 
- Parameters
 - 
  
    | key | key  | 
    | value | value  | 
    | operand | operand  | 
  
   
- Returns
 - this selection 
 
Definition at line 153 of file JDB/JSelector.hh.
  161       push_back(Selector(key.c_str(), os.str().c_str(), operand));
 
 
 
 
template<class JClass_t , class JType_t > 
  
  
      
        
          | JSelector& JDATABASE::JSelector::add  | 
          ( | 
          JType_t JClass_t::*  | 
          data_member,  | 
         
        
           | 
           | 
          const JType_t  | 
          value,  | 
         
        
           | 
           | 
          const Selector::RelOp &  | 
          operand = Selector::RelOp::Equal  | 
         
        
           | 
          ) | 
           |  | 
         
       
   | 
  
inline   | 
  
 
Add selection. 
- Parameters
 - 
  
    | data_member | data member  | 
    | value | value  | 
    | operand | operand  | 
  
   
- Returns
 - this selection 
 
Definition at line 176 of file JDB/JSelector.hh.
const char * getColumn(JType_t JTable_t::*data_member)
Get column name. 
 
JSelector & add(const JSelector &selection)
Add selection. 
 
 
 
 
template<class JClass_t > 
  
  
      
        
          | JSelector& JDATABASE::JSelector::add  | 
          ( | 
          std::string JClass_t::*  | 
          data_member,  | 
         
        
           | 
           | 
          const std::string &  | 
          value,  | 
         
        
           | 
           | 
          const Selector::RelOp &  | 
          operand = Selector::RelOp::Equal  | 
         
        
           | 
          ) | 
           |  | 
         
       
   | 
  
inline   | 
  
 
Add selection. 
- Parameters
 - 
  
    | data_member | data member  | 
    | value | value  | 
    | operand | operand  | 
  
   
- Returns
 - this selection 
 
Definition at line 191 of file JDB/JSelector.hh.
const char * getColumn(JType_t JTable_t::*data_member)
Get column name. 
 
JSelector & add(const JSelector &selection)
Add selection. 
 
 
 
 
template<class JFirst_t, class JSecond_t = JNullType> 
  
  
      
        
          | JFirst_t& JMATH::JMath< JFirst_t, JSecond_t >::mul  | 
          ( | 
          const JSecond_t &  | 
          object | ) | 
           | 
         
       
   | 
  
inlineinherited   | 
  
 
Multiply with object. 
- Parameters
 - 
  
  
 
- Returns
 - result object 
 
Definition at line 354 of file JMath.hh.
  356       return static_cast<JFirst_t&
>(*this) = JFirst_t().mul(static_cast<const JFirst_t&>(*
this), 
object);
 
 
 
 
  
  
      
        
          | std::istream& operator>>  | 
          ( | 
          std::istream &  | 
          in,  | 
         
        
           | 
           | 
          JSelector &  | 
          selector  | 
         
        
           | 
          ) | 
           |  | 
         
       
   | 
  
friend   | 
  
 
Read selector from input stream. 
- Parameters
 - 
  
    | in | input stream  | 
    | selector | selector  | 
  
   
- Returns
 - input stream 
 
Definition at line 204 of file JDB/JSelector.hh.
  215           const string::size_type pos = buffer.find(
getOperand(
i).Render());
 
  217           if (pos != string::npos && (operand == -1 || 
getOperand(
i).Render().length() > 
getOperand(operand).Render().length())) {
 
  224           const string::size_type pos = buffer.find(
getOperand(operand).Render());
 
  226           const string key   = 
JPP::trim(buffer.substr(0, pos));
 
  227           const string value = 
JPP::trim(buffer.substr(pos + 
getOperand(operand).Render().length()));
 
  229           if (key  .find_first_of(
"=!<>") == string::npos &&
 
  230               value.find_first_of(
"=!<>") == string::npos) {
 
  232             selector.push_back(Selector(key.c_str(), value.c_str(), 
getOperand(operand)));
 
  236             in.setstate(ios::badbit);
 
  241           in.setstate(ios::badbit);
 
std::string trim(const std::string &buffer)
Trim string. 
 
static const int NUMBER_OF_OPERANDS
Number of available operands. 
 
std::istream & getline(std::istream &in, JString &object)
Read string from input stream until end of line. 
 
static const char EOL
End-of-line. 
 
const Selector::RelOp & getOperand(const int index)
Get operand. 
 
then fatal Wrong number of arguments fi set_variable DETECTOR $argv[1] set_variable INPUT_FILE $argv[2] eval JPrintDetector a $DETECTOR O IDENTIFIER eval JPrintDetector a $DETECTOR O SUMMARY JAcoustics sh $DETECTOR_ID source JAcousticsToolkit sh CHECK_EXIT_CODE typeset A EMITTERS get_tripods $WORKDIR tripod txt EMITTERS get_transmitters $WORKDIR transmitter txt EMITTERS for EMITTER in
 
 
 
 
  
  
      
        
          | std::ostream& operator<<  | 
          ( | 
          std::ostream &  | 
          out,  | 
         
        
           | 
           | 
          const JSelector &  | 
          selector  | 
         
        
           | 
          ) | 
           |  | 
         
       
   | 
  
friend   | 
  
 
Write selector to output stream. 
- Parameters
 - 
  
    | out | output stream  | 
    | selector | selector  | 
  
   
- Returns
 - output stream 
 
Definition at line 256 of file JDB/JSelector.hh.
  258       for (const_iterator 
i = selector.begin(); 
i != selector.end(); ++
i) {
 
  259         out << 
i->Name << 
i->RelationalOperator.Render()  << 
i->Value << 
JSelector::EOL << std::endl;
 
static const char EOL
End-of-line. 
 
 
 
 
  
  
      
        
          | const char JDATABASE::JSelector::EOL = ';' | 
         
       
   | 
  
static   | 
  
 
 
The documentation for this class was generated from the following file: