NCBI C++ ToolKit
Public Types | Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes | Friends | List of all members
CPSG_Request Class Referenceabstract

Search Toolkit Book for CPSG_Request

Request to the PSG server (see "CPSG_Request_*" below) More...

#include <objtools/pubseq_gateway/client/psg_client.hpp>

+ Inheritance diagram for CPSG_Request:
+ Collaboration diagram for CPSG_Request:

Public Types

enum  EType {
  eBiodata , eResolve , eBlob , eNamedAnnotInfo ,
  eChunk , eIpgResolve
}
 
enum  EFlags { fExcludeHUP = (0 << 0) , fIncludeHUP = (1 << 0) , eDefaultFlags = fExcludeHUP }
 
using TOptionalFlags = CNullable< TFlags >
 

Public Member Functions

 DECLARE_SAFE_FLAGS_TYPE (EFlags, TFlags)
 
template<typename TUserContext >
shared_ptr< TUserContext > GetUserContext () const
 Get the user-provided context. More...
 
CRef< CRequestContextGetRequestContext () const
 Get request context. More...
 
void SetRequestContext (CRef< CRequestContext > request_context)
 Set request context. More...
 
EType GetType () const
 Get request type. More...
 
string GetId () const
 
void SetFlags (TOptionalFlags flags)
 Set flags. More...
 
void SetUserArgs (SPSG_UserArgs user_args)
 Set arbitrary URL arguments to add to this request. More...
 

Protected Member Functions

template<class T >
T GetCtx (T c)
 
 CPSG_Request (shared_ptr< void > user_context={}, CRef< CRequestContext > request_context={})
 
virtual ~CPSG_Request ()=default
 

Private Member Functions

virtual EType x_GetType () const =0
 
virtual string x_GetId () const =0
 
virtual void x_GetAbsPathRef (ostream &) const =0
 

Private Attributes

shared_ptr< void > m_UserContext
 
CRef< CRequestContextm_RequestContext
 
TOptionalFlags m_Flags
 
SPSG_UserArgs m_UserArgs
 

Friends

class CPSG_Queue
 

Detailed Description

Request to the PSG server (see "CPSG_Request_*" below)

Definition at line 99 of file psg_client.hpp.

Member Typedef Documentation

◆ TOptionalFlags

Definition at line 117 of file psg_client.hpp.

Member Enumeration Documentation

◆ EFlags

Enumerator
fExcludeHUP 
fIncludeHUP 
eDefaultFlags 

Definition at line 111 of file psg_client.hpp.

◆ EType

enum CPSG_Request::EType ( void  )
Enumerator
eBiodata 
eResolve 
eBlob 
eNamedAnnotInfo 
eChunk 
eIpgResolve 

Definition at line 102 of file psg_client.hpp.

Constructor & Destructor Documentation

◆ CPSG_Request()

CPSG_Request::CPSG_Request ( shared_ptr< void >  user_context = {},
CRef< CRequestContext request_context = {} 
)
inlineprotected

Definition at line 149 of file psg_client.hpp.

◆ ~CPSG_Request()

virtual CPSG_Request::~CPSG_Request ( )
protectedvirtualdefault

Member Function Documentation

◆ DECLARE_SAFE_FLAGS_TYPE()

CPSG_Request::DECLARE_SAFE_FLAGS_TYPE ( EFlags  ,
TFlags   
)

◆ GetCtx()

template<class T >
T CPSG_Request::GetCtx ( T  c)
inlineprotected

Definition at line 147 of file psg_client.hpp.

References CRequestContext::Clone(), and CDiagContext::GetRequestContext().

Referenced by SetRequestContext().

◆ GetId()

string CPSG_Request::GetId ( void  ) const
inline

Definition at line 134 of file psg_client.hpp.

References x_GetId().

◆ GetRequestContext()

CRef<CRequestContext> CPSG_Request::GetRequestContext ( void  ) const
inline

Get request context.

Definition at line 125 of file psg_client.hpp.

References m_RequestContext.

◆ GetType()

EType CPSG_Request::GetType ( void  ) const
inline

Get request type.

Definition at line 131 of file psg_client.hpp.

References x_GetType().

◆ GetUserContext()

template<typename TUserContext >
shared_ptr<TUserContext> CPSG_Request::GetUserContext ( ) const
inline

Get the user-provided context.

Definition at line 121 of file psg_client.hpp.

References m_UserContext.

◆ SetFlags()

void CPSG_Request::SetFlags ( TOptionalFlags  flags)
inline

Set flags.

Definition at line 137 of file psg_client.hpp.

References flags, and m_Flags.

◆ SetRequestContext()

void CPSG_Request::SetRequestContext ( CRef< CRequestContext request_context)
inline

Set request context.

Definition at line 1351 of file psg_client.hpp.

References GetCtx(), and m_RequestContext.

◆ SetUserArgs()

void CPSG_Request::SetUserArgs ( SPSG_UserArgs  user_args)
inline

Set arbitrary URL arguments to add to this request.

request->SetUserArgs("param1=value1&param1=value2&param2=value3");
request->SetUserArgs({{ "param1", { "value1", "value2" }}, { "param2", { "value3" }}});

Definition at line 144 of file psg_client.hpp.

References m_UserArgs.

◆ x_GetAbsPathRef()

virtual void CPSG_Request::x_GetAbsPathRef ( ostream &  ) const
privatepure virtual

◆ x_GetId()

virtual string CPSG_Request::x_GetId ( ) const
privatepure virtual

◆ x_GetType()

virtual EType CPSG_Request::x_GetType ( ) const
privatepure virtual

Friends And Related Function Documentation

◆ CPSG_Queue

friend class CPSG_Queue
friend

Definition at line 167 of file psg_client.hpp.

Member Data Documentation

◆ m_Flags

TOptionalFlags CPSG_Request::m_Flags
private

Definition at line 164 of file psg_client.hpp.

Referenced by SetFlags().

◆ m_RequestContext

CRef<CRequestContext> CPSG_Request::m_RequestContext
private

Definition at line 163 of file psg_client.hpp.

Referenced by GetRequestContext(), and SetRequestContext().

◆ m_UserArgs

SPSG_UserArgs CPSG_Request::m_UserArgs
private

Definition at line 165 of file psg_client.hpp.

Referenced by SetUserArgs().

◆ m_UserContext

shared_ptr<void> CPSG_Request::m_UserContext
private

Definition at line 162 of file psg_client.hpp.

Referenced by GetUserContext().


The documentation for this class was generated from the following file:
Modified on Fri Sep 20 14:58:19 2024 by modify_doxy.py rev. 669887