MythTV  master
Static Public Member Functions | Public Attributes | Protected Member Functions | Static Private Member Functions | List of all members
MythHTTPMetaMethod Class Reference

#include <mythhttpmetamethod.h>

Collaboration diagram for MythHTTPMetaMethod:
Collaboration graph
[legend]

Static Public Member Functions

static HTTPMethodPtr Create (int Index, QMetaMethod &Method, int RequestTypes, const QString &ReturnName={}, bool Slot=true)
 
static void * CreateParameter (void *Parameter, int Type, const QString &Value)
 Populate the QMetaType object referenced by Parameter with Value. More...
 
static QVariant CreateReturnValue (int Type, void *Value)
 

Public Attributes

bool m_valid { false }
 
bool m_protected { false }
 
int m_index { 0 }
 
int m_requestTypes { HTTPUnknown }
 
QMetaMethod m_method
 
std::vector< QString > m_names
 
std::vector< int > m_types
 
QString m_returnTypeName
 

Protected Member Functions

 MythHTTPMetaMethod (int Index, QMetaMethod &Method, int RequestTypes, const QString &ReturnName, bool Slot)
 

Static Private Member Functions

static bool ValidReturnType (int Type)
 
static bool ToBool (const QString &Value)
 

Detailed Description

Note
Instances of this class SHOULD be initialised statically to improve performance but MUST NOT be initialised globally. This is because a number of Qt types (e.g. enums) and our own custom types will not have been initialised at that point (i.e. qRegisterMetatype<>() has not been called).

Definition at line 18 of file mythhttpmetamethod.h.

Constructor & Destructor Documentation

◆ MythHTTPMetaMethod()

MythHTTPMetaMethod::MythHTTPMetaMethod ( int  Index,
QMetaMethod &  Method,
int  RequestTypes,
const QString &  ReturnName,
bool  Slot 
)
protected

Definition at line 18 of file mythhttpmetamethod.cpp.

Referenced by Create().

Member Function Documentation

◆ Create()

HTTPMethodPtr MythHTTPMetaMethod::Create ( int  Index,
QMetaMethod &  Method,
int  RequestTypes,
const QString &  ReturnName = {},
bool  Slot = true 
)
static

Definition at line 116 of file mythhttpmetamethod.cpp.

Referenced by MythHTTPMetaService::MythHTTPMetaService().

◆ CreateParameter()

void * MythHTTPMetaMethod::CreateParameter ( void *  Parameter,
int  Type,
const QString &  Value 
)
static

Populate the QMetaType object referenced by Parameter with Value.

Note
In the event that the type is not handled, we return the unaltered object which may then contain an undefined value.

Definition at line 131 of file mythhttpmetamethod.cpp.

◆ CreateReturnValue()

QVariant MythHTTPMetaMethod::CreateReturnValue ( int  Type,
void *  Value 
)
static

Definition at line 204 of file mythhttpmetamethod.cpp.

◆ ValidReturnType()

static bool MythHTTPMetaMethod::ValidReturnType ( int  Type)
inlinestaticprivate

Definition at line 42 of file mythhttpmetamethod.h.

Referenced by CreateReturnValue(), and MythHTTPMetaMethod().

◆ ToBool()

static bool MythHTTPMetaMethod::ToBool ( const QString &  Value)
inlinestaticprivate

Definition at line 47 of file mythhttpmetamethod.h.

Referenced by CreateParameter().

Member Data Documentation

◆ m_valid

bool MythHTTPMetaMethod::m_valid { false }

Definition at line 26 of file mythhttpmetamethod.h.

Referenced by MythHTTPMetaMethod().

◆ m_protected

bool MythHTTPMetaMethod::m_protected { false }

Definition at line 27 of file mythhttpmetamethod.h.

◆ m_index

int MythHTTPMetaMethod::m_index { 0 }

Definition at line 28 of file mythhttpmetamethod.h.

◆ m_requestTypes

int MythHTTPMetaMethod::m_requestTypes { HTTPUnknown }

Definition at line 29 of file mythhttpmetamethod.h.

◆ m_method

QMetaMethod MythHTTPMetaMethod::m_method

Definition at line 30 of file mythhttpmetamethod.h.

◆ m_names

std::vector<QString> MythHTTPMetaMethod::m_names

Definition at line 31 of file mythhttpmetamethod.h.

Referenced by MythHTTPMetaMethod().

◆ m_types

std::vector<int> MythHTTPMetaMethod::m_types

Definition at line 32 of file mythhttpmetamethod.h.

Referenced by MythHTTPMetaMethod().

◆ m_returnTypeName

QString MythHTTPMetaMethod::m_returnTypeName

Definition at line 33 of file mythhttpmetamethod.h.

Referenced by MythHTTPMetaMethod().


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