Auxiliary data structure for hostname and port number.  
 More...
#include <JHostname.hh>
 | 
| static const char  | SEPARATOR = ':' | 
|   | Separation character between hostname and port number.  More...
  | 
|   | 
Auxiliary data structure for hostname and port number. 
Definition at line 30 of file JHostname.hh.
 
  
  
      
        
          | JNET::JHostname::JHostname  | 
          ( | 
           | ) | 
           | 
         
       
   | 
  
inline   | 
  
 
 
  
  
      
        
          | JNET::JHostname::JHostname  | 
          ( | 
          const std::string &  | 
          buffer | ) | 
           | 
         
       
   | 
  
inline   | 
  
 
Constructor. 
The argument correponds to the hostname and an optional port number of the server. The syntax is hostname[:port]. The default port number is DISPATCH_PORT. If the complete buffer corresponds to an integer value, it is interpreted as the port number.
- Parameters
 - 
  
    | buffer | host name and optional port number  | 
  
   
Definition at line 57 of file JHostname.hh.
void set(const std::string &buffer)
Set hostname and port number. 
 
 
 
 
  
  
      
        
          | JNET::JHostname::JHostname  | 
          ( | 
          const std::string &  | 
          hostname,  | 
         
        
           | 
           | 
          const int  | 
          port  | 
         
        
           | 
          ) | 
           |  | 
         
       
   | 
  
inline   | 
  
 
Constructor. 
- Parameters
 - 
  
    | hostname | hostname  | 
    | port | port number  | 
  
   
Definition at line 69 of file JHostname.hh.
 
 
  
  
      
        
          | void JNET::JHostname::set  | 
          ( | 
          const std::string &  | 
          buffer | ) | 
           | 
         
       
   | 
  
inline   | 
  
 
Set hostname and port number. 
The argument correponds to the hostname and an optional port number of the server. The syntax is hostname[:port]. The default port number is DISPATCH_PORT. If the complete buffer corresponds to an integer value, it is interpreted as the port number.
- Parameters
 - 
  
    | buffer | host name and optional port number  | 
  
   
Definition at line 87 of file JHostname.hh.
   91       const string::size_type pos = buffer.find(
SEPARATOR);
 
   93       if (pos != string::npos) {
 
   95         this->
hostname = buffer.substr(0, pos);
 
   97         istringstream(buffer.substr(pos + 1)) >> this->
port;
 
  101         bool is_number = 
true;
 
  103         for (string::const_iterator i = buffer.begin(); is_number && i != buffer.end(); ++i) {
 
  104           is_number &= isdigit(*i);
 
  111           istringstream(buffer) >> this->
port;
 
static const int DISPATCH_PORT
Default ControlHost port. 
 
static const char SEPARATOR
Separation character between hostname and port number. 
 
 
 
 
  
  
      
        
          | std::istream& operator>>  | 
          ( | 
          std::istream &  | 
          in,  | 
         
        
           | 
           | 
          JHostname &  | 
          object  | 
         
        
           | 
          ) | 
           |  | 
         
       
   | 
  
friend   | 
  
 
Read hostname from input stream. 
- Parameters
 - 
  
    | in | input stream  | 
    | object | hostname  | 
  
   
- Returns
 - input stream 
 
Definition at line 129 of file JHostname.hh.
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 JHostname &  | 
          object  | 
         
        
           | 
          ) | 
           |  | 
         
       
   | 
  
friend   | 
  
 
Write hostname to output stream. 
- Parameters
 - 
  
    | out | output stream  | 
    | object | hostname  | 
  
   
- Returns
 - output stream 
 
Definition at line 148 of file JHostname.hh.
  150       return out << 
object.hostname << 
SEPARATOR << 
object.port;
 
static const char SEPARATOR
Separation character between hostname and port number. 
 
 
 
 
  
  
      
        
          | const char JNET::JHostname::SEPARATOR = ':' | 
         
       
   | 
  
static   | 
  
 
Separation character between hostname and port number. 
Definition at line 35 of file JHostname.hh.
 
 
      
        
          | std::string JNET::JHostname::hostname | 
        
      
 
 
      
        
          | int JNET::JHostname::port | 
        
      
 
 
The documentation for this struct was generated from the following file: