Jpp  18.3.1
the software that should make you happy
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Types | Public Member Functions | Static Public Member Functions | Static Public Attributes | Protected Member Functions | Protected Attributes | Static Protected Attributes | Private Attributes | List of all members
JNET::JControlHostObjectIterator< T > Class Template Reference

Object iteration through ControlHost. More...

#include <JControlHostObjectIterator.hh>

Inheritance diagram for JNET::JControlHostObjectIterator< T >:
JNET::JControlHost JLANG::JAbstractObjectIterator< T > JLANG::JTimeval JNET::JSocketBlocking JLANG::JThrow< JControlHost > JLANG::JObjectIterator< T > JLANG::JComparable< JTimeval > JNET::JTCPSocket JNET::JSocket JLANG::JFile JNET::JSocketAddress JLANG::JAbstractFile JLANG::JBinaryInput JLANG::JBinaryOutput JLANG::JComparable< JAbstractFile >

Public Types

typedef JObjectIterator< T >
::pointer_type 
pointer_type
 

Public Member Functions

 JControlHostObjectIterator (const JHostname &server, const JSubscription &subscription, JTimeval timeout=JTimeval::max())
 Constructor. More...
 
 JControlHostObjectIterator (const JHostname &server, JTimeval timeout=JTimeval::max(), bool all=true)
 Constructor. More...
 
virtual bool setObject (T &object) override
 Set object. More...
 
int Subscribe (const JSubscription &subscription)
 Subscribe to single tag. More...
 
int Subscribe (const JSubscriptionList &subscription)
 Subscribe to list of tags. More...
 
int MyId (const std::string &nick_name)
 Identify. More...
 
int SendMeNext ()
 Tell server to send next message. More...
 
int SendMeAlways ()
 Tell server to send messages forever. More...
 
int PutFullData (const JTag &tag, const void *buffer, const long long int length)
 Send data. More...
 
int PutFullData (const std::string &tag, const void *buffer, const long long int length)
 Send data. More...
 
int PutFullString (const JTag &tag, const std::string &buffer)
 Send string. More...
 
int PutFullString (const std::string &tag, const std::string &buffer)
 Send string. More...
 
int Connected ()
 Send version. More...
 
int WaitHead (JPrefix &prefix)
 Wait for header. More...
 
int WaitHead (std::string &tag, long long int &length)
 Wait for header. More...
 
int CheckHead (JPrefix &prefix, JTimeval timeout=JTimeval::min())
 Check for header, without waiting. More...
 
int CheckHead (std::string &tag, long long int &length, const int timeout_us=0)
 Check for header, without waiting. More...
 
int GetFullData (void *buffer, long long int length)
 Receive data. More...
 
int GetFullString (std::string &buffer)
 Receive string. More...
 
int configure ()
 Configure socket (factory reset). More...
 
int read (char *buffer, const int length) override
 Read data from socket. More...
 
int write (const char *buffer, const int length) override
 Write data to socket. More...
 
void setNonBlocking (const bool on)
 Set non-blocking of I/O. More...
 
bool getNonBlocking () const
 Get non-blocking of I/O. More...
 
void setKeepIdle (const int t_s)
 Set the TCP idle time. More...
 
void setKeepCnt (const int count)
 Set the TCP idle count. More...
 
void setKeepIntvl (const int t_s)
 Set the TCP interval time. More...
 
void setTcpNoDelay (const bool on)
 Set TCP no-delay. More...
 
bool getTcpNoDelay () const
 Get TCP no-delay. More...
 
void accept (const int server)
 Accept connection from a server. More...
 
void connect (const int port)
 Connect to port on local host. More...
 
void connect (const JHostname &hostname)
 Connect to port on specified host. More...
 
void connect (const std::string &hostname, const int port)
 Connect to port on specified host. More...
 
void connect (const int ip_number, const int port)
 Connect to port on specified host. More...
 
int shutdown ()
 Shut down socket. More...
 
void setKeepAlive (const bool on)
 Set keep alive of socket. More...
 
bool getKeepAlive () const
 Get keep alive of socket. More...
 
void setReuseAddress (const bool on)
 Set reuse address. More...
 
bool getReuseAddress () const
 Get reuse address. More...
 
void setReceiveBufferSize (const int size)
 Set receive buffer size. More...
 
int getReceiveBufferSize () const
 Set receive buffer size. More...
 
void setSendBufferSize (const int size)
 Set send buffer size. More...
 
int getSendBufferSize () const
 Get send buffer size. More...
 
int close ()
 Close file. More...
 
bool in_avail (JTimeval timeout=JTimeval::min()) const
 Check availability of input. More...
 
bool out_avail (JTimeval timeout=JTimeval::min()) const
 Check availability of output. More...
 
virtual bool good () const
 Check status. More...
 
virtual bool fail () const
 Check status. More...
 
virtual bool bad () const
 Check status. More...
 
virtual bool eof () const
 Check end of file. More...
 
bool less (const JAbstractFile &file) const
 Less than operation. More...
 
int getFileDescriptor () const
 Get file descriptor. More...
 
void setFileDescriptor (const int file)
 Set file descriptor. More...
 
bool is_open () const
 Get open status. More...
 
const sockaddr * getSockaddr () const
 Get sockaddr. More...
 
sockaddr * getSockaddr ()
 Get sockaddr. More...
 
int getFamily () const
 Get family. More...
 
void setFamily (const int family)
 Set family. More...
 
std::string getHostname () const
 Get host name. More...
 
int getIPnumber () const
 Get IP number. More...
 
void setIPnumber (const int ip_number)
 Set IP number. More...
 
void setIPnumber ()
 Set any IP number. More...
 
int getPort () const
 Get port number. More...
 
void setPort (const int port)
 Set port number. More...
 
virtual bool hasNext () override
 Check availability of next element. More...
 
virtual const pointer_typenext () override
 Get next element. More...
 
virtual skip_type skip (const skip_type ns)
 Skip items. More...
 
const JTimevalgetTimeval () const
 Get time value. More...
 
JTimevalgetTimeval ()
 Get time value. More...
 
void setTimeval (const JTimeval &timeval)
 Set time value. More...
 
bool less (const JTimeval &value) const
 Less than method. More...
 
const timeval * get () const
 Get pointer to time value. More...
 
timeval * get ()
 Get pointer to time value. More...
 
const timeval * operator& () const
 Address of operator. More...
 
timeval * operator& ()
 Address of operator. More...
 

Static Public Member Functions

static bool maybe_special (const JTag &tag)
 Check special ControlHost tags. More...
 
static bool is_valid (const char c)
 Check validity of subscription specifier. More...
 
static int WhereIs (const std::string &host_name, const std::string &nick_name, std::string &answer)
 Locate ControlHost client(s). More...
 
static int sizeOf ()
 Get size of object. More...
 
static void Throw (const bool option)
 Enable/disable throw option. More...
 
static int Throw (const JException &error, const int value=-1)
 Throw exception or return error. More...
 
static JTimeval min ()
 Get minimal time value. More...
 
static JTimeval max ()
 Get maximal time value. More...
 

Static Public Attributes

static const int FILE_CLOSED = -1
 

Protected Member Functions

template<class T >
void setOption (const int level, const int option, const T value)
 Set socket option. More...
 
template<class T >
T getOption (const int level, const int option) const
 Get socket option. More...
 

Protected Attributes

int fileDescriptor
 
T object
 object More...
 
bool has_next
 status More...
 

Static Protected Attributes

static bool do_throw
 throw option More...
 

Private Attributes

JPrefix prefix
 
std::vector< char > buffer
 

Detailed Description

template<class T>
class JNET::JControlHostObjectIterator< T >

Object iteration through ControlHost.

This class implements the JLANG::JObjectIterator interface.

Definition at line 31 of file JControlHostObjectIterator.hh.

Member Typedef Documentation

template<class T>
typedef JObjectIterator<T>::pointer_type JLANG::JAbstractObjectIterator< T >::pointer_type
inherited

Definition at line 39 of file JAbstractObjectIterator.hh.

Constructor & Destructor Documentation

template<class T>
JNET::JControlHostObjectIterator< T >::JControlHostObjectIterator ( const JHostname server,
const JSubscription subscription,
JTimeval  timeout = JTimeval::max() 
)
inline

Constructor.

Parameters
serverhost name and optional port number
subscriptionsubscription
timeouttimeout

Definition at line 44 of file JControlHostObjectIterator.hh.

46  :
47  JControlHost(server),
48  JTimeval(timeout)
49  {
50  Subscribe(subscription);
51  }
int Subscribe(const JSubscription &subscription)
Subscribe to single tag.
JTimeval()
Default constructor.
Definition: JTimeval.hh:34
JControlHost()
Default constructor.
template<class T>
JNET::JControlHostObjectIterator< T >::JControlHostObjectIterator ( const JHostname server,
JTimeval  timeout = JTimeval::max(),
bool  all = true 
)
inline

Constructor.

Parameters
serverhost name and optional port number
timeouttimeout
allsubscribe all, subscribe any if false

Definition at line 61 of file JControlHostObjectIterator.hh.

63  :
64  JControlHost(server),
65  JTimeval(timeout)
66  {
67  if (all) {
68  Subscribe(JSubscriptionAll(getTag<T>()));
69  } else {
70  Subscribe(JSubscriptionAny(getTag<T>()));
71  }
72  }
int Subscribe(const JSubscription &subscription)
Subscribe to single tag.
Auxiliary class for any subscription.
Auxiliary class for all subscription.
Definition: JControlHost.hh:97
JTimeval()
Default constructor.
Definition: JTimeval.hh:34
JControlHost()
Default constructor.

Member Function Documentation

template<class T>
virtual bool JNET::JControlHostObjectIterator< T >::setObject ( T object)
inlineoverridevirtual

Set object.

Parameters
objectreference to object to be set
Returns
true if set; else false

Implements JLANG::JAbstractObjectIterator< T >.

Definition at line 81 of file JControlHostObjectIterator.hh.

82  {
83  if (this->CheckHead(prefix, this->getTimeval()) > 0) {
84 
85  buffer.resize(prefix.getSize());
86 
87  this->GetFullData(buffer.data(), buffer.size());
88 
89  JIO::JByteArrayReader in(buffer.data(), buffer.size());
90 
91  in >> object;
92 
93  return true;
94 
95  } else {
96 
97  return false;
98  }
99  }
const JTimeval & getTimeval() const
Get time value.
Definition: JTimeval.hh:71
int getSize() const
Get size.
Definition: JPrefix.hh:62
int CheckHead(JPrefix &prefix, JTimeval timeout=JTimeval::min())
Check for header, without waiting.
Byte array binary input.
Definition: JByteArrayIO.hh:25
int GetFullData(void *buffer, long long int length)
Receive data.
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
Definition: JCanberra.sh:48
static bool JNET::JControlHost::maybe_special ( const JTag tag)
inlinestaticinherited

Check special ControlHost tags.

Parameters
tagtag
Returns
true if possibly special tag; else false

Definition at line 269 of file JControlHost.hh.

270  {
271  return tag[0] == '_';
272  }
static bool JNET::JControlHost::is_valid ( const char  c)
inlinestaticinherited

Check validity of subscription specifier.

Parameters
csubscription specifier
Returns
true if valid; else false

Definition at line 281 of file JControlHost.hh.

282  {
283  return (c == SUBSCRIBE_ALL ||
284  c == SUBSCRIBE_ANY);// ||
285  //c == SUBSCRIBE_SHARED_MEMORY);
286  }
$WORKDIR ev_configure_dqsimulator txt echo process $DQ_SIMULATOR $i $SOURCE_HOST[$index] csh c(setenv ROOTSYS $ROOTSYS &&source $JPP_DIR/setenv.csh $JPP_DIR &&($DQ_SIMULATOR\-u\$NAME\$\-H\$SERVER\$\-M\$LOGGER\$\-d $DEBUG</dev/null > &/dev/null &))'
int JNET::JControlHost::Subscribe ( const JSubscription subscription)
inlineinherited

Subscribe to single tag.

Parameters
subscriptionsubscription
Returns
0 if OK; -1 if socket error

Definition at line 360 of file JControlHost.hh.

361  {
362  return PutFullString(DISPTAG_Subscribe, subscription.toString());
363  }
static const JTag DISPTAG_Subscribe("_Subscri")
Special ControlHost tags.
std::string toString() const
Convert subscription to string.
Definition: JControlHost.hh:83
int PutFullString(const JTag &tag, const std::string &buffer)
Send string.
int JNET::JControlHost::Subscribe ( const JSubscriptionList subscription)
inlineinherited

Subscribe to list of tags.

Parameters
subscriptionsubscription
Returns
0 if OK; -1 if socket error

Definition at line 372 of file JControlHost.hh.

373  {
374  return PutFullString(DISPTAG_Subscribe, subscription.toString());
375  }
static const JTag DISPTAG_Subscribe("_Subscri")
Special ControlHost tags.
std::string toString() const
Convert subscription list to string.
int PutFullString(const JTag &tag, const std::string &buffer)
Send string.
int JNET::JControlHost::MyId ( const std::string nick_name)
inlineinherited

Identify.

Parameters
nick_namenick name
Returns
0 if OK; -1 if socket error

Definition at line 384 of file JControlHost.hh.

385  {
386  return PutFullString(DISPTAG_MyId, nick_name);
387  }
static const JTag DISPTAG_MyId("_MyId")
int PutFullString(const JTag &tag, const std::string &buffer)
Send string.
int JNET::JControlHost::SendMeNext ( )
inlineinherited

Tell server to send next message.

Returns
0 if OK; -1 if socket error

Definition at line 395 of file JControlHost.hh.

396  {
397  return PutFullData(DISPTAG_Gime, NULL, 0);
398  }
static const JTag DISPTAG_Gime("_Gime")
int PutFullData(const JTag &tag, const void *buffer, const long long int length)
Send data.
int JNET::JControlHost::SendMeAlways ( )
inlineinherited

Tell server to send messages forever.

Returns
0 if OK; -1 if socket error

Definition at line 406 of file JControlHost.hh.

407  {
408  return PutFullData(DISPTAG_Always, NULL, 0);
409  }
static const JTag DISPTAG_Always("_Always")
int PutFullData(const JTag &tag, const void *buffer, const long long int length)
Send data.
int JNET::JControlHost::PutFullData ( const JTag tag,
const void *  buffer,
const long long int  length 
)
inlineinherited

Send data.

Parameters
tagtag
bufferdata
lengthnumber of bytes
Returns
0 if OK; -1 if socket error; -2 if other error

Definition at line 420 of file JControlHost.hh.

421  {
422  try {
423 
424  JPrefix __prefix__(tag, length);
425 
426  write((char*) &__prefix__, sizeof(JPrefix));
427 
428  if (length != 0) {
429  write((char*) buffer, (int) length);
430  }
431 
432  return 0;
433  }
434  catch (const JSocketException& error) {
435  return Throw(error, -1);
436  }
437  }
ControlHost prefix.
Definition: JPrefix.hh:31
int write(const char *buffer, const int length) override
Write data to socket.
static void Throw(const bool option)
Enable/disable throw option.
Definition: JThrow.hh:37
int JNET::JControlHost::PutFullData ( const std::string tag,
const void *  buffer,
const long long int  length 
)
inlineinherited

Send data.

Parameters
tagtag
bufferdata
lengthnumber of bytes
Returns
0 if OK; -1 if socket error; -2 if other error

Definition at line 448 of file JControlHost.hh.

449  {
450  try {
451  return PutFullData(JTag(tag), buffer, length);
452  }
453  catch (const JSocketException& error) {
454  return Throw(error, -1);
455  }
456  catch (const JControlHostException& error) {
457  return Throw(error, -2);
458  }
459  }
ControlHost tag.
Definition: JTag.hh:38
int PutFullData(const JTag &tag, const void *buffer, const long long int length)
Send data.
static void Throw(const bool option)
Enable/disable throw option.
Definition: JThrow.hh:37
int JNET::JControlHost::PutFullString ( const JTag tag,
const std::string buffer 
)
inlineinherited

Send string.

Parameters
tagtag
bufferdata
Returns
0 if OK; -1 if socket error; -2 if other error

Definition at line 469 of file JControlHost.hh.

471  {
472  return PutFullData(tag, buffer.c_str(), buffer.size());
473  }
const char * c_str() const
C-string.
Definition: JTag.hh:201
int PutFullData(const JTag &tag, const void *buffer, const long long int length)
Send data.
int JNET::JControlHost::PutFullString ( const std::string tag,
const std::string buffer 
)
inlineinherited

Send string.

Parameters
tagtag
bufferdata
Returns
0 if OK; -1 if socket error; -2 if other error

Definition at line 483 of file JControlHost.hh.

485  {
486  return PutFullData(tag, buffer.c_str(), buffer.size());
487  }
int PutFullData(const JTag &tag, const void *buffer, const long long int length)
Send data.
int JNET::JControlHost::Connected ( )
inlineinherited

Send version.

Returns
0 if OK; -1 if socket error; -2 if other error

Definition at line 495 of file JControlHost.hh.

496  {
498  }
static const std::string CHOO_VERSION
Definition: JControlHost.hh:34
static const JTag DISPTAG_Version("_Version")
int PutFullString(const JTag &tag, const std::string &buffer)
Send string.
int JNET::JControlHost::WaitHead ( JPrefix prefix)
inlineinherited

Wait for header.

Parameters
prefixprefix
Returns
0 if OK; -1 if socket error

Definition at line 507 of file JControlHost.hh.

508  {
509  try {
510 
511  read((char*) &this->prefix, sizeof(JPrefix));
512 
513  prefix = this->prefix;
514 
515  return 0;
516  }
517  catch (const JSocketException& error) {
518  return Throw(error, -1);
519  }
520  }
ControlHost prefix.
Definition: JPrefix.hh:31
int read(char *buffer, const int length) override
Read data from socket.
static void Throw(const bool option)
Enable/disable throw option.
Definition: JThrow.hh:37
int JNET::JControlHost::WaitHead ( std::string tag,
long long int &  length 
)
inlineinherited

Wait for header.

Parameters
tagtag
lengthnumber of bytes
Returns
0 if OK; -1 if socket error

Definition at line 530 of file JControlHost.hh.

531  {
532  const int rvalue = WaitHead(this->prefix);
533 
534  if (rvalue == 0) {
535  tag = this->prefix.getTag();
536  length = this->prefix.getSize();
537  }
538 
539  return rvalue;
540  }
int getSize() const
Get size.
Definition: JPrefix.hh:62
const JTag & getTag() const
Get tag.
Definition: JTag.hh:86
int WaitHead(JPrefix &prefix)
Wait for header.
int JNET::JControlHost::CheckHead ( JPrefix prefix,
JTimeval  timeout = JTimeval::min() 
)
inlineinherited

Check for header, without waiting.

Parameters
prefixprefix
timeouttimeout
Returns
1 if header; 0 if no header; -1 if socket error

Definition at line 550 of file JControlHost.hh.

551  {
552  try {
553 
554  if (in_avail(timeout)) {
555 
556  WaitHead(prefix);
557 
558  return 1;
559 
560  } else {
561 
562  return 0;
563  }
564  }
565  catch (const JSocketException& error) {
566  return Throw(error, -1);
567  }
568  }
bool in_avail(JTimeval timeout=JTimeval::min()) const
Check availability of input.
Definition: JFile.hh:106
int WaitHead(JPrefix &prefix)
Wait for header.
static void Throw(const bool option)
Enable/disable throw option.
Definition: JThrow.hh:37
int JNET::JControlHost::CheckHead ( std::string tag,
long long int &  length,
const int  timeout_us = 0 
)
inlineinherited

Check for header, without waiting.

Parameters
tagtag
lengthnumber of bytes
timeout_ustimeout [us]
Returns
1 if header; 0 if no header; -1 if socket error

Definition at line 579 of file JControlHost.hh.

580  {
581  const int rvalue = CheckHead(this->prefix, timeout_us);
582 
583  if (rvalue == 1) {
584  tag = this->prefix.getTag();
585  length = this->prefix.getSize();
586  }
587 
588  return rvalue;
589  }
int getSize() const
Get size.
Definition: JPrefix.hh:62
int CheckHead(JPrefix &prefix, JTimeval timeout=JTimeval::min())
Check for header, without waiting.
const JTag & getTag() const
Get tag.
Definition: JTag.hh:86
int JNET::JControlHost::GetFullData ( void *  buffer,
long long int  length 
)
inlineinherited

Receive data.

Parameters
bufferdata
lengthnumber of bytes
Returns
0 if OK; -1 if socket error

Definition at line 599 of file JControlHost.hh.

600  {
601  try {
602 
603  read((char*) buffer, (int) length);
604 
605  return 0;
606  }
607  catch (const JSocketException& error) {
608  return Throw(error, -1);
609  }
610  }
int read(char *buffer, const int length) override
Read data from socket.
static void Throw(const bool option)
Enable/disable throw option.
Definition: JThrow.hh:37
int JNET::JControlHost::GetFullString ( std::string buffer)
inlineinherited

Receive string.

Parameters
bufferdata
Returns
0 if OK; -1 if socket error

Definition at line 619 of file JControlHost.hh.

620  {
621  buffer.resize(this->prefix.getSize());
622 
623  return GetFullData((char*) buffer.data(), buffer.size());
624  }
int getSize() const
Get size.
Definition: JPrefix.hh:62
int GetFullData(void *buffer, long long int length)
Receive data.
static int JNET::JControlHost::WhereIs ( const std::string host_name,
const std::string nick_name,
std::string answer 
)
inlinestaticinherited

Locate ControlHost client(s).

Parameters
host_namehost name
nick_namenick name
answerlist of host names
Returns
0 if OK; -1 if socket error

Definition at line 635 of file JControlHost.hh.

638  {
639  try {
640 
641  using namespace std;
642 
643  JControlHost socket(host_name);
644 
645  socket.PutFullString(DISPTAG_WhereIs, nick_name);
646 
647  string tag;
648  long long int length;
649 
650  socket.WaitHead(tag, length);
651  socket.GetFullString(answer);
652 
653  return 0;
654  }
655  catch (const JSocketException& error) {
656  return Throw(error, -1);
657  }
658  }
ControlHost class.
static const JTag DISPTAG_WhereIs("_WhereIs")
static void Throw(const bool option)
Enable/disable throw option.
Definition: JThrow.hh:37
int JNET::JControlHost::configure ( )
inlineinherited

Configure socket (factory reset).

Returns
0 if OK; -1 if socket error

Definition at line 666 of file JControlHost.hh.

667  {
668  try {
669 
670  setTcpNoDelay (true);
671  setReuseAddress(true);
672  setKeepAlive (true);
673  setSendBufferSize (128*1024);
674  setReceiveBufferSize(128*1024);
675  setNonBlocking (false);
676 
677  return 0;
678  }
679  catch (const JSocketException& error) {
680  return Throw(error, -1);
681  }
682  }
void setReuseAddress(const bool on)
Set reuse address.
Definition: JSocket.hh:111
void setSendBufferSize(const int size)
Set send buffer size.
Definition: JSocket.hh:155
void setTcpNoDelay(const bool on)
Set TCP no-delay.
Definition: JTCPSocket.hh:128
void setReceiveBufferSize(const int size)
Set receive buffer size.
Definition: JSocket.hh:133
void setNonBlocking(const bool on)
Set non-blocking of I/O.
Definition: JTCPSocket.hh:53
void setKeepAlive(const bool on)
Set keep alive of socket.
Definition: JSocket.hh:89
static void Throw(const bool option)
Enable/disable throw option.
Definition: JThrow.hh:37
int JNET::JSocketBlocking::read ( char *  buffer,
const int  length 
)
inlineoverridevirtualinherited

Read data from socket.

Parameters
bufferbuffer
lengthnumber of bytes to read
Returns
number of bytes read

Reimplemented from JNET::JSocket.

Definition at line 52 of file JSocketBlocking.hh.

53  {
54  char* data = buffer;
55  int size = length;
56 
57  while (size != 0) {
58 
59  const int pos = JSocket::read(data, size);
60 
61  if (pos != 0) {
62  data += pos;
63  size -= pos;
64  } else {
65  in_avail(1);
66  }
67  }
68 
69  return length - size;
70  }
bool in_avail(JTimeval timeout=JTimeval::min()) const
Check availability of input.
Definition: JFile.hh:106
virtual int read(char *buffer, const int length) override
Read data from socket.
Definition: JSocket.hh:183
int JNET::JSocketBlocking::write ( const char *  buffer,
const int  length 
)
inlineoverridevirtualinherited

Write data to socket.

Parameters
bufferbuffer
lengthnumber of bytes to write
Returns
number of bytes written

Reimplemented from JNET::JSocket.

Definition at line 80 of file JSocketBlocking.hh.

81  {
82  const char* data = buffer;
83  int size = length;
84 
85  while (size != 0) {
86 
87  const int pos = JSocket::write(data, size);
88 
89  if (pos != 0) {
90  data += pos;
91  size -= pos;
92  } else {
93  out_avail(1);
94  }
95  }
96 
97  return length - size;
98  }
bool out_avail(JTimeval timeout=JTimeval::min()) const
Check availability of output.
Definition: JFile.hh:119
virtual int write(const char *buffer, const int length) override
Write data to socket.
Definition: JSocket.hh:222
void JNET::JTCPSocket::setNonBlocking ( const bool  on)
inlineinherited

Set non-blocking of I/O.

Parameters
ontrue to enable non-blocking; false to disable

Definition at line 53 of file JTCPSocket.hh.

54  {
55  const int flags = fcntl(getFileDescriptor(), F_GETFL, -1);
56  const int mask = FNDELAY;
57 
58  if (flags == -1) {
59  THROW(JSocketException, "Get socket option failed " << errno);
60  }
61 
62  if (((flags & mask) != mask && on) ||
63  ((flags & mask) != 0 && !on) ) {
64 
65  if (fcntl(getFileDescriptor(), F_SETFL, flags ^ mask) < 0) {
66  THROW(JSocketException, "Set socket option failed " << errno);
67  }
68  }
69  }
#define THROW(JException_t, A)
Marco for throwing exception with std::ostream compatible message.
Definition: JException.hh:712
int getFileDescriptor() const
Get file descriptor.
bool JNET::JTCPSocket::getNonBlocking ( ) const
inlineinherited

Get non-blocking of I/O.

Returns
true if enabled non-blocking; else false

Definition at line 77 of file JTCPSocket.hh.

78  {
79  const int flags = fcntl(getFileDescriptor(), F_GETFL, -1);
80  const int mask = FNDELAY;
81 
82  if (flags == -1) {
83  THROW(JSocketException, "Get socket option failed " << errno);
84  }
85 
86  return ((flags & mask) != 0);
87  }
#define THROW(JException_t, A)
Marco for throwing exception with std::ostream compatible message.
Definition: JException.hh:712
int getFileDescriptor() const
Get file descriptor.
void JNET::JTCPSocket::setKeepIdle ( const int  t_s)
inlineinherited

Set the TCP idle time.

Parameters
t_stime [s]

Definition at line 95 of file JTCPSocket.hh.

96  {
97  setOption(IPROTO_TCP, TCP_KEEPIDLE, t_s);
98  }
#define IPROTO_TCP
Definition: JTCPSocket.hh:11
void setOption(const int level, const int option, const T value)
Set socket option.
Definition: JSocket.hh:259
void JNET::JTCPSocket::setKeepCnt ( const int  count)
inlineinherited

Set the TCP idle count.

Parameters
countcount

Definition at line 106 of file JTCPSocket.hh.

107  {
108  setOption(IPROTO_TCP, TCP_KEEPCNT, count);
109  }
#define IPROTO_TCP
Definition: JTCPSocket.hh:11
void setOption(const int level, const int option, const T value)
Set socket option.
Definition: JSocket.hh:259
void JNET::JTCPSocket::setKeepIntvl ( const int  t_s)
inlineinherited

Set the TCP interval time.

Parameters
t_stime [s]

Definition at line 117 of file JTCPSocket.hh.

118  {
119  setOption(IPROTO_TCP, TCP_KEEPINTVL, t_s);
120  }
#define IPROTO_TCP
Definition: JTCPSocket.hh:11
void setOption(const int level, const int option, const T value)
Set socket option.
Definition: JSocket.hh:259
void JNET::JTCPSocket::setTcpNoDelay ( const bool  on)
inlineinherited

Set TCP no-delay.

Parameters
ontrue to set TCP no-delay; false to disable

Definition at line 128 of file JTCPSocket.hh.

129  {
130  setOption(IPPROTO_TCP, TCP_NODELAY, int(on ? 1 : 0));
131  }
void setOption(const int level, const int option, const T value)
Set socket option.
Definition: JSocket.hh:259
bool JNET::JTCPSocket::getTcpNoDelay ( ) const
inlineinherited

Get TCP no-delay.

Returns
true if TCP no-delay; else false

Definition at line 139 of file JTCPSocket.hh.

140  {
141  return (getOption<int>(IPPROTO_TCP, TCP_NODELAY) == 1);
142  }
void JNET::JTCPSocket::accept ( const int  server)
inlineinherited

Accept connection from a server.

Parameters
serverfile descriptor of TCP server socket

Definition at line 150 of file JTCPSocket.hh.

151  {
152  socklen_t size = sizeof(sockaddr_in);
153 
154  fileDescriptor = ::accept(server, getSockaddr(), &size);
155  }
const sockaddr * getSockaddr() const
Get sockaddr.
void accept(const int server)
Accept connection from a server.
Definition: JTCPSocket.hh:150
void JNET::JTCPSocket::connect ( const int  port)
inlineinherited

Connect to port on local host.

Parameters
portport number

Definition at line 163 of file JTCPSocket.hh.

164  {
165  connect(INADDR_ANY, port);
166  }
void connect(const int port)
Connect to port on local host.
Definition: JTCPSocket.hh:163
void JNET::JTCPSocket::connect ( const JHostname hostname)
inlineinherited

Connect to port on specified host.

Parameters
hostnamehost name

Definition at line 174 of file JTCPSocket.hh.

175  {
176  connect(hostname.hostname, hostname.port);
177  }
std::string hostname
Definition: JHostname.hh:171
void connect(const int port)
Connect to port on local host.
Definition: JTCPSocket.hh:163
void JNET::JTCPSocket::connect ( const std::string hostname,
const int  port 
)
inlineinherited

Connect to port on specified host.

Parameters
hostnamehost name
portport number

Definition at line 186 of file JTCPSocket.hh.

187  {
188  connect(JSYSTEM::getIPnumber(hostname), port);
189  }
int getIPnumber(const std::string &host_name)
Get IP number.
Definition: JNetwork.hh:117
void connect(const int port)
Connect to port on local host.
Definition: JTCPSocket.hh:163
void JNET::JTCPSocket::connect ( const int  ip_number,
const int  port 
)
inlineinherited

Connect to port on specified host.

Parameters
ip_numberIP number
portport number

Definition at line 198 of file JTCPSocket.hh.

199  {
200  setIPnumber(ip_number);
201  setPort(port);
202 
203  if (::connect(getFileDescriptor(), getSockaddr(), sizeof(sockaddr_in)) < 0) {
204  THROW(JSocketException, "Socket connection failed " << JSYSTEM::getIPaddress(ip_number) << ":" << port << " / " << getFileDescriptor() << " " << errno);
205  }
206  }
#define THROW(JException_t, A)
Marco for throwing exception with std::ostream compatible message.
Definition: JException.hh:712
std::string getIPaddress(const int ip)
Get IP address (decimal-dot notation).
Definition: JNetwork.hh:154
void setIPnumber()
Set any IP number.
const sockaddr * getSockaddr() const
Get sockaddr.
int getFileDescriptor() const
Get file descriptor.
void setPort(const int port)
Set port number.
void connect(const int port)
Connect to port on local host.
Definition: JTCPSocket.hh:163
int JNET::JSocket::shutdown ( )
inlineinherited

Shut down socket.

Returns
return value

Definition at line 74 of file JSocket.hh.

75  {
76  const int value = ::shutdown(getFileDescriptor(), SHUT_RDWR);
77 
78  close();
79 
80  return value;
81  }
int close()
Close file.
Definition: JFile.hh:57
int getFileDescriptor() const
Get file descriptor.
int shutdown()
Shut down socket.
Definition: JSocket.hh:74
void JNET::JSocket::setKeepAlive ( const bool  on)
inlineinherited

Set keep alive of socket.

Parameters
ontrue to enable keep alive; false to disable

Definition at line 89 of file JSocket.hh.

90  {
91  setOption(SOL_SOCKET, SO_KEEPALIVE, int(on ? 1 : 0));
92  }
void setOption(const int level, const int option, const T value)
Set socket option.
Definition: JSocket.hh:259
bool JNET::JSocket::getKeepAlive ( ) const
inlineinherited

Get keep alive of socket.

Returns
true if keep alive; else false

Definition at line 100 of file JSocket.hh.

101  {
102  return (getOption<int>(SOL_SOCKET, SO_KEEPALIVE) == 1);
103  }
void JNET::JSocket::setReuseAddress ( const bool  on)
inlineinherited

Set reuse address.

Parameters
ontrue to enable reuse address; false to disable

Definition at line 111 of file JSocket.hh.

112  {
113  setOption(SOL_SOCKET, SO_REUSEADDR, int(on ? 1 : 0));
114  }
void setOption(const int level, const int option, const T value)
Set socket option.
Definition: JSocket.hh:259
bool JNET::JSocket::getReuseAddress ( ) const
inlineinherited

Get reuse address.

Returns
true if enable reuse address; else false

Definition at line 122 of file JSocket.hh.

123  {
124  return (getOption<int>(SOL_SOCKET, SO_REUSEADDR) == 1);
125  }
void JNET::JSocket::setReceiveBufferSize ( const int  size)
inlineinherited

Set receive buffer size.

Parameters
sizenumber of bytes

Definition at line 133 of file JSocket.hh.

134  {
135  setOption(SOL_SOCKET, SO_RCVBUF, int(size));
136  }
void setOption(const int level, const int option, const T value)
Set socket option.
Definition: JSocket.hh:259
int JNET::JSocket::getReceiveBufferSize ( ) const
inlineinherited

Set receive buffer size.

Returns
number of bytes

Definition at line 144 of file JSocket.hh.

145  {
146  return getOption<int>(SOL_SOCKET, SO_RCVBUF);
147  }
void JNET::JSocket::setSendBufferSize ( const int  size)
inlineinherited

Set send buffer size.

Parameters
sizenumber of bytes

Definition at line 155 of file JSocket.hh.

156  {
157  setOption(SOL_SOCKET, SO_SNDBUF, int(size));
158  }
void setOption(const int level, const int option, const T value)
Set socket option.
Definition: JSocket.hh:259
int JNET::JSocket::getSendBufferSize ( ) const
inlineinherited

Get send buffer size.

Returns
number of bytes

Definition at line 166 of file JSocket.hh.

167  {
168  return getOption<int>(SOL_SOCKET, SO_SNDBUF);
169  }
template<class T >
void JNET::JSocket::setOption ( const int  level,
const int  option,
const T  value 
)
inlineprotectedinherited

Set socket option.

Parameters
levellevel
optionoption
valuevalue

Definition at line 259 of file JSocket.hh.

260  {
261  socklen_t size = sizeof(T);
262 
263  if (setsockopt(getFileDescriptor(), level, option, &value, size) < 0) {
264  THROW(JSocketException, "Set socket option failed " << errno);
265  }
266  }
#define THROW(JException_t, A)
Marco for throwing exception with std::ostream compatible message.
Definition: JException.hh:712
int getFileDescriptor() const
Get file descriptor.
do set_variable OUTPUT_DIRECTORY $WORKDIR T
template<class T >
T JNET::JSocket::getOption ( const int  level,
const int  option 
) const
inlineprotectedinherited

Get socket option.

Parameters
levellevel
optionoption
Returns
value

Definition at line 277 of file JSocket.hh.

278  {
279  T value;
280  socklen_t size = sizeof(T);
281 
282  if (getsockopt(getFileDescriptor(), level, option, &value, &size) < 0) {
283  THROW(JSocketException, "Get socket option failed " << errno);
284  }
285 
286  return value;
287  }
#define THROW(JException_t, A)
Marco for throwing exception with std::ostream compatible message.
Definition: JException.hh:712
int getFileDescriptor() const
Get file descriptor.
do set_variable OUTPUT_DIRECTORY $WORKDIR T
int JLANG::JFile::close ( )
inlineinherited

Close file.

Returns
return value

Definition at line 57 of file JFile.hh.

58  {
59  int value = -1;
60 
61  if (fileDescriptor != FILE_CLOSED) {
62 
63  value = ::close(fileDescriptor);
64 
66  result = 0;
67  }
68 
69  return value;
70  }
int close()
Close file.
Definition: JFile.hh:57
static const int FILE_CLOSED
int result
Definition: JFile.hh:170
bool JLANG::JFile::in_avail ( JTimeval  timeout = JTimeval::min()) const
inlineinherited

Check availability of input.

This method returns true if at least one byte can be read without blocking.

Parameters
timeouttimeout
Returns
true if ready to read; else false

Definition at line 106 of file JFile.hh.

107  {
108  return JFileDescriptorMask(*this).in_avail(timeout);
109  }
Auxiliary class for method select.
bool in_avail(JTimeval timeout=JTimeval::min())
Check availability of input.
bool JLANG::JFile::out_avail ( JTimeval  timeout = JTimeval::min()) const
inlineinherited

Check availability of output.

This method returns true if at least one byte can be written without blocking.

Parameters
timeouttimeout
Returns
true if ready to write; else false

Definition at line 119 of file JFile.hh.

120  {
121  return JFileDescriptorMask(*this).out_avail(timeout);
122  }
bool out_avail(JTimeval timeout=JTimeval::min())
Check availability of output.
Auxiliary class for method select.
virtual bool JLANG::JFile::good ( ) const
inlinevirtualinherited

Check status.

Returns
true if last I/O operation successful; else false

Definition at line 130 of file JFile.hh.

131  {
132  return is_open() && !eof() && !bad();
133  }
virtual bool eof() const
Check end of file.
Definition: JFile.hh:163
bool is_open() const
Get open status.
virtual bool bad() const
Check status.
Definition: JFile.hh:152
virtual bool JLANG::JFile::fail ( ) const
inlinevirtualinherited

Check status.

Returns
true if last I/O operation caused logical error; else false

Definition at line 141 of file JFile.hh.

142  {
143  return result == 0;
144  }
int result
Definition: JFile.hh:170
virtual bool JLANG::JFile::bad ( ) const
inlinevirtualinherited

Check status.

Returns
true if last I/O operation caused read/write error; else false

Definition at line 152 of file JFile.hh.

153  {
154  return fail();
155  }
virtual bool fail() const
Check status.
Definition: JFile.hh:141
virtual bool JLANG::JFile::eof ( ) const
inlinevirtualinherited

Check end of file.

Returns
true if end of file; else false

Definition at line 163 of file JFile.hh.

164  {
165  return result == EOF;
166  }
int result
Definition: JFile.hh:170
bool JLANG::JAbstractFile::less ( const JAbstractFile file) const
inlineinherited

Less than operation.

Parameters
fileJAbstractFile to be compared
Returns
true if this file descriptor is less; else false

Definition at line 64 of file JAbstractFile.hh.

65  {
66  return getFileDescriptor() < file.getFileDescriptor();
67  }
int getFileDescriptor() const
Get file descriptor.
int JLANG::JAbstractFile::getFileDescriptor ( ) const
inlineinherited

Get file descriptor.

Returns
file descriptor

Definition at line 75 of file JAbstractFile.hh.

76  {
77  return fileDescriptor;
78  }
void JLANG::JAbstractFile::setFileDescriptor ( const int  file)
inlineinherited

Set file descriptor.

Parameters
filefile descriptor

Definition at line 86 of file JAbstractFile.hh.

87  {
89  }
then usage $script[< detector identifier >< run range >]< QA/QCfile > nExample script to produce data quality plots nWhen a detector identifier and run range are data are downloaded from the database nand subsequently stored in the given QA QC file
Definition: JDataQuality.sh:19
bool JLANG::JAbstractFile::is_open ( ) const
inlineinherited

Get open status.

Definition at line 95 of file JAbstractFile.hh.

96  {
97  return fileDescriptor != FILE_CLOSED;
98  }
static const int FILE_CLOSED
const sockaddr* JNET::JSocketAddress::getSockaddr ( ) const
inlineinherited

Get sockaddr.

Returns
pointer to sockaddr structure

Definition at line 44 of file JSocketAddress.hh.

45  {
46  return (const sockaddr*) static_cast<const sockaddr_in*>(this);
47  }
sockaddr* JNET::JSocketAddress::getSockaddr ( )
inlineinherited

Get sockaddr.

Returns
pointer to sockaddr structure

Definition at line 55 of file JSocketAddress.hh.

56  {
57  return (sockaddr*) static_cast<sockaddr_in*>(this);
58  }
int JNET::JSocketAddress::getFamily ( ) const
inlineinherited

Get family.

Returns
family

Definition at line 66 of file JSocketAddress.hh.

67  {
68  return sin_family;
69  }
void JNET::JSocketAddress::setFamily ( const int  family)
inlineinherited

Set family.

Parameters
familyfamily

Definition at line 77 of file JSocketAddress.hh.

78  {
79  sin_family = family;
80  }
std::string JNET::JSocketAddress::getHostname ( ) const
inlineinherited

Get host name.

Returns
host name

Definition at line 88 of file JSocketAddress.hh.

89  {
90  return JSYSTEM::getHostname(this->getIPnumber());
91  }
int getIPnumber() const
Get IP number.
std::string getHostname()
Get host name.
Definition: JNetwork.hh:77
int JNET::JSocketAddress::getIPnumber ( ) const
inlineinherited

Get IP number.

Returns
IP number

Definition at line 99 of file JSocketAddress.hh.

100  {
101  return sin_addr.s_addr;
102  }
void JNET::JSocketAddress::setIPnumber ( const int  ip_number)
inlineinherited

Set IP number.

Parameters
ip_numberIP number

Definition at line 110 of file JSocketAddress.hh.

111  {
112  sin_addr.s_addr = ip_number;
113  }
void JNET::JSocketAddress::setIPnumber ( )
inlineinherited

Set any IP number.

Definition at line 119 of file JSocketAddress.hh.

120  {
121  sin_addr.s_addr = htonl(INADDR_ANY);
122  }
int JNET::JSocketAddress::getPort ( ) const
inlineinherited

Get port number.

Returns
port number

Definition at line 130 of file JSocketAddress.hh.

131  {
132  return ntohs(this->sin_port);
133  }
void JNET::JSocketAddress::setPort ( const int  port)
inlineinherited

Set port number.

Parameters
portport number

Definition at line 141 of file JSocketAddress.hh.

142  {
143  if (port >= 0 && port <= std::numeric_limits<u_short>::max())
144  sin_port = htons((u_short) port);
145  else
146  THROW(JCastException, "JSocketAddress::setPort() illegal value.");
147  }
#define THROW(JException_t, A)
Marco for throwing exception with std::ostream compatible message.
Definition: JException.hh:712
static int JNET::JSocketAddress::sizeOf ( )
inlinestaticinherited

Get size of object.

Returns
number of bytes

Definition at line 155 of file JSocketAddress.hh.

156  {
157  return sizeof(sockaddr_in);
158  }
static void JLANG::JThrow< JControlHost >::Throw ( const bool  option)
inlinestaticinherited

Enable/disable throw option.

Parameters
optiontrue enable; false disable

Definition at line 37 of file JThrow.hh.

38  {
39  do_throw = option;
40  }
static bool do_throw
throw option
Definition: JThrow.hh:28
static int JLANG::JThrow< JControlHost >::Throw ( const JException error,
const int  value = -1 
)
inlinestaticinherited

Throw exception or return error.

Parameters
errorexception
valuereturn code
Returns
return code

Definition at line 50 of file JThrow.hh.

51  {
52  using namespace std;
53 
54  if (do_throw) {
55  throw error;
56  }
57 
58  cerr << error.what() << endl;
59 
60  return value;
61  }
virtual const char * what() const override
Get error message.
Definition: JException.hh:64
static bool do_throw
throw option
Definition: JThrow.hh:28
template<class T>
virtual bool JLANG::JAbstractObjectIterator< T >::hasNext ( )
inlineoverridevirtualinherited

Check availability of next element.

Returns
true if the iteration has more elements; else false

Implements JLANG::JObjectIterator< T >.

Definition at line 56 of file JAbstractObjectIterator.hh.

57  {
58  if (!has_next) {
59  has_next = this->setObject(object);
60  }
61 
62  return has_next;
63  }
virtual bool setObject(T &object)=0
Set object.
template<class T>
virtual const pointer_type& JLANG::JAbstractObjectIterator< T >::next ( )
inlineoverridevirtualinherited

Get next element.

Returns
pointer to element

Implements JLANG::JObjectIterator< T >.

Definition at line 71 of file JAbstractObjectIterator.hh.

72  {
73  if (has_next)
74  ps.reset(&this->object);
75  else
76  ps.reset(NULL);
77 
78  has_next = false;
79 
80  return ps;
81  }
virtual void reset() override
Reset pointer.
Definition: JPointer.hh:84
template<class T>
virtual skip_type JLANG::JObjectIterator< T >::skip ( const skip_type  ns)
inlinevirtualinherited

Skip items.

Parameters
nsnumber of items to skip
Returns
number of items skipped

Reimplemented in JLANG::JPipe< T >, JLANG::JPipe< JTail_t >, JLANG::JPipe< JHead_t >, JLANG::JSTDObjectIterator< T >, JLANG::JAbstractObjectReader< T >, JLANG::JAbstractObjectReader< const event_type >, JLANG::JAbstractObjectReader< JNullType >, JLANG::JAbstractObjectReader< const T >, JLANG::JAbstractObjectReader< JTail_t >, JLANG::JAbstractObjectReader< JHead_t >, JLANG::JAbstractObjectReader< KM3NETDAQ::KM3NETDAQ::JDAQEvent >, and JLANG::JAbstractObjectReader< JDAQSummaryslice >.

Definition at line 90 of file JObjectIterator.hh.

91  {
92  skip_type i = 0;
93 
94  for ( ; i != ns && hasNext(); ++i) {
95  next();
96  }
97 
98  return i;
99  }
unsigned int skip_type
Type definition for number of objects to skip.
std::vector< size_t > ns
virtual const pointer_type & next()=0
Get next element.
virtual bool hasNext()=0
Check availability of next element.
const JTimeval& JLANG::JTimeval::getTimeval ( ) const
inlineinherited

Get time value.

Returns
time value

Definition at line 71 of file JTimeval.hh.

72  {
73  return static_cast<const JTimeval&>(*this);
74  }
Auxiliary class for time values.
Definition: JTimeval.hh:26
JTimeval& JLANG::JTimeval::getTimeval ( )
inlineinherited

Get time value.

Returns
time value

Definition at line 82 of file JTimeval.hh.

83  {
84  return static_cast<JTimeval&>(*this);
85  }
Auxiliary class for time values.
Definition: JTimeval.hh:26
void JLANG::JTimeval::setTimeval ( const JTimeval timeval)
inlineinherited

Set time value.

Parameters
timevaltime value

Definition at line 93 of file JTimeval.hh.

94  {
95  static_cast<JTimeval&>(*this) = timeval;
96  }
Auxiliary class for time values.
Definition: JTimeval.hh:26
bool JLANG::JTimeval::less ( const JTimeval value) const
inlineinherited

Less than method.

Parameters
valuetime value
Returns
true if this time value less than given time value; else false

Definition at line 105 of file JTimeval.hh.

106  {
107  if (this->tv_sec == value.tv_sec)
108  return this->tv_usec < value.tv_usec;
109  else
110  return this->tv_sec < value.tv_sec;
111  }
static JTimeval JLANG::JTimeval::min ( )
inlinestaticinherited

Get minimal time value.

Returns
time value

Definition at line 119 of file JTimeval.hh.

120  {
121  return JTimeval(0, 0);
122  }
JTimeval()
Default constructor.
Definition: JTimeval.hh:34
static JTimeval JLANG::JTimeval::max ( )
inlinestaticinherited

Get maximal time value.

Returns
time value

Definition at line 131 of file JTimeval.hh.

132  {
133  return JTimeval(std::numeric_limits<int>::max(), std::numeric_limits<int>::max());
134  }
JTimeval()
Default constructor.
Definition: JTimeval.hh:34
const timeval* JLANG::JTimeval::get ( ) const
inlineinherited

Get pointer to time value.

Returns
pointer to time value

Definition at line 143 of file JTimeval.hh.

144  {
145  return static_cast<const timeval*>(this);
146  }
timeval* JLANG::JTimeval::get ( )
inlineinherited

Get pointer to time value.

Returns
pointer to time value

Definition at line 154 of file JTimeval.hh.

155  {
156  return static_cast<timeval*>(this);
157  }
const timeval* JLANG::JTimeval::operator& ( ) const
inlineinherited

Address of operator.

Returns
pointer to time value

Definition at line 165 of file JTimeval.hh.

166  {
167  return get();
168  }
timeval* JLANG::JTimeval::operator& ( )
inlineinherited

Address of operator.

Returns
pointer to time value

Definition at line 176 of file JTimeval.hh.

177  {
178  return get();
179  }

Member Data Documentation

template<class T>
JPrefix JNET::JControlHostObjectIterator< T >::prefix
private

Definition at line 102 of file JControlHostObjectIterator.hh.

template<class T>
std::vector<char> JNET::JControlHostObjectIterator< T >::buffer
private

Definition at line 103 of file JControlHostObjectIterator.hh.

const int JLANG::JAbstractFile::FILE_CLOSED = -1
staticinherited

Definition at line 27 of file JAbstractFile.hh.

int JLANG::JAbstractFile::fileDescriptor
protectedinherited

Definition at line 102 of file JAbstractFile.hh.

bool JLANG::JThrow< JControlHost >::do_throw
staticprotectedinherited

throw option

Set default throw option to true.

Definition at line 28 of file JThrow.hh.

template<class T>
T JLANG::JAbstractObjectIterator< T >::object
protectedinherited

object

Definition at line 34 of file JAbstractObjectIterator.hh.

template<class T>
bool JLANG::JAbstractObjectIterator< T >::has_next
protectedinherited

status

Definition at line 35 of file JAbstractObjectIterator.hh.


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