#include <QuestionerId.h>
Public Member Functions | |
QuestionerId ()=default | |
to-be-determined ID More... | |
void | pack (TypedMsgHdr &) const |
for sending the ID of the asking process More... | |
void | unpack (const TypedMsgHdr &) |
for receiving the ID of the asking process More... | |
void | rejectAnswerIfStale () const |
does nothing but throws if the questioner was not the current process More... | |
void | print (std::ostream &) const |
reports the stored opaque ID value (for debugging) More... | |
Private Member Functions | |
QuestionerId (const pid_t aPid) | |
for MyQuestionerId() convenience More... | |
Private Attributes | |
pid_t | pid = -1 |
Friends | |
QuestionerId | MyQuestionerId () |
the questioner ID of the current/calling process More... | |
Detailed Description
Identifies a kid process sending IPC messages that require an answer. Must be unique across all kids with pending questions.
Definition at line 21 of file QuestionerId.h.
Constructor & Destructor Documentation
◆ QuestionerId() [1/2]
|
default |
◆ QuestionerId() [2/2]
|
inlineexplicitprivate |
Definition at line 41 of file QuestionerId.h.
Member Function Documentation
◆ pack()
void Ipc::QuestionerId::pack | ( | TypedMsgHdr & | hdrMsg | ) | const |
Definition at line 25 of file QuestionerId.cc.
References pid, and Ipc::TypedMsgHdr::putPod().
◆ print()
void Ipc::QuestionerId::print | ( | std::ostream & | os | ) | const |
◆ rejectAnswerIfStale()
void Ipc::QuestionerId::rejectAnswerIfStale | ( | ) | const |
Definition at line 37 of file QuestionerId.cc.
References Debug::Extra(), Here, Ipc::MyQuestionerId(), pid, pid, and ToSBuf().
◆ unpack()
void Ipc::QuestionerId::unpack | ( | const TypedMsgHdr & | hdrMsg | ) |
Definition at line 31 of file QuestionerId.cc.
References Ipc::TypedMsgHdr::getPod(), and pid.
Referenced by Ipc::StrandSearchRequest::StrandSearchRequest().
Friends And Related Function Documentation
◆ MyQuestionerId
|
friend |
Member Data Documentation
◆ pid
|
private |
OS process ID of the asking kid. If the kid restarts, it is assumed not to wrap back to the old value until the answer is received.
Definition at line 46 of file QuestionerId.h.
Referenced by pack(), and rejectAnswerIfStale().
The documentation for this class was generated from the following files:
- src/ipc/QuestionerId.h
- src/ipc/QuestionerId.cc