#include <wvdailyevent.h>
Inheritance diagram for WvDailyEvent:
Public Methods | |
WvDailyEvent (int _first_hour, int _num_per_day=0) | |
virtual bool | pre_select (SelectInfo &si) |
virtual bool | post_select (SelectInfo &si) |
virtual void | execute () |
void | reset () |
virtual bool | isok () const |
void | configure (int _first_hour, int _num_per_day=0) |
void | set_hour (int h) |
WvDailyEvent (int _first_hour, int _num_per_day=0) | |
virtual bool | pre_select (SelectInfo &si) |
virtual bool | post_select (SelectInfo &si) |
virtual void | execute () |
void | reset () |
virtual bool | isok () const |
void | configure (int _first_hour, int _num_per_day=0) |
void | set_hour (int h) |
Private Attributes | |
int | first_hour |
int | num_per_day |
bool | need_reset |
int | last_hour |
int | last_minute |
|
Definition at line 18 of file wvdailyevent.cc. |
|
|
|
|
|
Definition at line 87 of file wvdailyevent.cc. Referenced by set_hour(). |
|
The callback() function calls execute(), and then calls the user- specified callback if one is defined. Do not call execute() directly; call callback() instead. The default execute() function does nothing. Note: If you override this function in a derived class, you must call the parent execute() yourself from the derived class. Reimplemented from WvStream. |
|
The callback() function calls execute(), and then calls the user- specified callback if one is defined. Do not call execute() directly; call callback() instead. The default execute() function does nothing. Note: If you override this function in a derived class, you must call the parent execute() yourself from the derived class. Reimplemented from WvStream. Definition at line 68 of file wvdailyevent.cc. References WvStream::execute(). |
|
return true if the stream is actually usable right now Reimplemented from WvStream. |
|
return true if the stream is actually usable right now Reimplemented from WvStream. Definition at line 81 of file wvdailyevent.cc. |
|
post_select() is called after select(), and returns true if this object is now ready. Usually this is done by checking for this object in the read, write, and except lists in the SelectInfo structure. If you want to do it in some other way, you should usually do it in pre_select() instead. (post_select() _only_ gets called if select() returned true for _some_ stream or another.) You may also want to do extra maintenance functions here; for example, the standard WvStream::post_select tries to flush outbuf if it's nonempty. WvTCPConn might retry connect() if it's waiting for a connection to be established. Reimplemented from WvStream. |
|
post_select() is called after select(), and returns true if this object is now ready. Usually this is done by checking for this object in the read, write, and except lists in the SelectInfo structure. If you want to do it in some other way, you should usually do it in pre_select() instead. (post_select() _only_ gets called if select() returned true for _some_ stream or another.) You may also want to do extra maintenance functions here; for example, the standard WvStream::post_select tries to flush outbuf if it's nonempty. WvTCPConn might retry connect() if it's waiting for a connection to be established. Reimplemented from WvStream. Definition at line 62 of file wvdailyevent.cc. |
|
pre_select() sets up for eventually calling select(). It adds the right fds to the read, write, and except lists in the SelectInfo struct. Returns true if we already know this stream is ready, and there's no need to actually do a real select(). Some streams, such as timers, can be implemented by _only_ either returning true or false here after doing a calculation, and never actually adding anything to the SelectInfo. You can add your stream to any of the lists even if readable, writable, or isexception isn't set. This is what force_select() does. You can also choose not to add yourself to the list if you know it would be useless right now. pre_select() is only called if isok() is true. pre_select() is allowed to reduce msec_timeout (or change it if it's -1). However, it's not allowed to _increase_ msec_timeout. Reimplemented from WvStream. |
|
pre_select() sets up for eventually calling select(). It adds the right fds to the read, write, and except lists in the SelectInfo struct. Returns true if we already know this stream is ready, and there's no need to actually do a real select(). Some streams, such as timers, can be implemented by _only_ either returning true or false here after doing a calculation, and never actually adding anything to the SelectInfo. You can add your stream to any of the lists even if readable, writable, or isexception isn't set. This is what force_select() does. You can also choose not to add yourself to the list if you know it would be useless right now. pre_select() is only called if isok() is true. pre_select() is allowed to reduce msec_timeout (or change it if it's -1). However, it's not allowed to _increase_ msec_timeout. Reimplemented from WvStream. Definition at line 27 of file wvdailyevent.cc. |
|
|
|
Definition at line 75 of file wvdailyevent.cc. |
|
Definition at line 37 of file streams/wvdailyevent.h. References configure(), and num_per_day. |
|
Definition at line 37 of file include/wvdailyevent.h. References configure(), and num_per_day. |
|
Definition at line 41 of file streams/wvdailyevent.h. |
|
Definition at line 44 of file streams/wvdailyevent.h. |
|
Definition at line 45 of file streams/wvdailyevent.h. |
|
Definition at line 43 of file streams/wvdailyevent.h. |
|
Definition at line 42 of file streams/wvdailyevent.h. Referenced by set_hour(). |