本文整理汇总了C++中GetMethod函数的典型用法代码示例。如果您正苦于以下问题:C++ GetMethod函数的具体用法?C++ GetMethod怎么用?C++ GetMethod使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了GetMethod函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: return
std::string PersistCommand::GetString() const
{
if (m_activity->IsPersistTokenSet()) {
return (GetMethod() + " " + m_activity->GetPersistToken()->GetString());
} else {
return GetMethod() + "(no token)";
}
}
示例2: pwr_tStatus
int XNav::call_method( const char *method, const char *filter,
pwr_sAttrRef attrref,
xmenu_eItemType item_type,
xmenu_mUtility caller,
unsigned int priv, char *arg)
{
pwr_tStatus sts;
int sel_cnt;
pwr_tStatus (*method_func)( xmenu_sMenuCall *);
pwr_tStatus (*filter_func)( xmenu_sMenuCall *);
if (mcp == NULL)
mcp = (xmenu_sMenuCall *)calloc(1, sizeof(xmenu_sMenuCall));
mcp->EditorContext = (void *)this;
mcp->PointedSet = xmenu_eMenuSet_Object;
mcp->Pointed = attrref;
mcp->Caller = caller;
mcp->ItemType = item_type;
mcp->Priv = priv;
mcp->SelectedSet = xmenu_eMenuSet_None;
mcp->SelectedSet = xmenu_eMenuSet_Object;
if ( arg)
strcpy( mcp->Arg, arg);
sel_cnt = 1;
if ( mcp->Selected)
free( mcp->Selected);
mcp->Selected = (pwr_sAttrRef *) calloc( sel_cnt + 1, sizeof (pwr_sAttrRef));
mcp->Selected[0] = attrref;
mcp->Selected[sel_cnt].Objid = pwr_cNObjid;
mcp->SelectCount = sel_cnt;
if ( filter && strcmp( filter, "") != 0) {
sts = GetMethod( filter, &filter_func);
if ( EVEN(sts)) return sts;
sts = (filter_func) ( mcp);
if ( EVEN(sts)) return sts;
}
sts = GetMethod( method, &method_func);
if ( EVEN(sts)) return sts;
sts = (method_func) ( mcp);
if ( EVEN(sts)) return sts;
free( mcp->Selected);
mcp->Selected = 0;
return XNAV__SUCCESS;
}
示例3: VERBOSE
bool UPnpMSRR::ProcessRequest( HttpWorkerThread *pThread, HTTPRequest *pRequest )
{
if (pRequest)
{
if (Eventing::ProcessRequest( pThread, pRequest ))
return true;
if ( pRequest->m_sBaseUrl != m_sControlUrl )
return false;
VERBOSE(VB_UPNP, QString("UPnpMSRR::ProcessRequest : %1 : %2 :")
.arg( pRequest->m_sBaseUrl )
.arg( pRequest->m_sMethod ));
switch( GetMethod( pRequest->m_sMethod ) )
{
case MSRR_GetServiceDescription : pRequest->FormatFileResponse( m_sServiceDescFileName ); break;
case MSRR_IsAuthorized : HandleIsAuthorized ( pRequest ); break;
case MSRR_RegisterDevice : HandleRegisterDevice ( pRequest ); break;
case MSRR_IsValidated : HandleIsValidated ( pRequest ); break;
default:
UPnp::FormatErrorResponse( pRequest, UPnPResult_InvalidAction );
break;
}
}
return( true );
}
示例4: _FunctionCollect
bool IrisClass::_FunctionAchieved() {
_InterfaceFunctionDeclareMap mpFunctionDeclare;
// 递归调用,把所有的接口的FunctionDeclare给放到map里面
for (auto inter : m_hsInterfaces){
_FunctionCollect(inter.second, mpFunctionDeclare);
}
bool bResult = false;
IrisMethod* pMethod = nullptr;
// 开始逐个检查
for (auto funcdec : mpFunctionDeclare) {
pMethod = GetMethod(IrisClass::SearchMethodType::InstanceMethod, funcdec.first, bResult);
// 如果没有找到,那么直接退出
if (!pMethod) {
return false;
}
else {
// 如果找到了但是参数不对,还是退出
auto pMethodDeclare = funcdec.second;
if (pMethod->m_bIsWithVariableParameter != pMethodDeclare.m_bHaveVariableParameter
|| pMethod->m_nParameterAmount != pMethodDeclare.m_nParameterAmount) {
return false;
}
}
}
return true;
}
示例5: CollectTypeDescriptors
static void CollectTypeDescriptors(WfCustomType* td, SortedList<ITypeDescriptor*>& tds)
{
vint baseCount = td->GetBaseTypeDescriptorCount();
for (vint i = 0; i < baseCount; i++)
{
auto baseType = td->GetBaseTypeDescriptor(i);
CollectTypeDescriptors(baseType, tds);
}
vint methodGroupCount = td->GetMethodGroupCount();
for (vint i = 0; i < methodGroupCount; i++)
{
auto group = td->GetMethodGroup(i);
vint methodCount = group->GetMethodCount();
for (vint j = 0; j < methodCount; j++)
{
auto method = group->GetMethod(j);
CollectTypeDescriptors(method, tds);
}
}
vint propertyCount = td->GetPropertyCount();
for (vint i = 0; i < propertyCount; i++)
{
CollectTypeDescriptors(td->GetProperty(i), tds);
}
vint eventCount = td->GetEventCount();
for (vint i = 0; i < eventCount; i++)
{
CollectTypeDescriptors(td->GetEvent(i), tds);
}
}
示例6: Send
void HttpDebugSocket::OnFirst()
{
Send(
"HTTP/1.1 200 OK\n"
"Content-type: text/html\n"
"Connection: close\n"
"Server: HttpDebugSocket/1.0\n"
"\n");
Send(
"<html><head><title>Echo Request</title></head>"
"<body><h3>Request Header</h3>");
Send( "<form method='post' action='/test_post'>"
"<input type='text' name='text' value='test text'><br>"
"<input type='submit' name='submit' value=' OK '></form>");
// enctype 'multipart/form-data'
Sendf("<form action='/test_post' method='post' enctype='multipart/form-data'>");
Sendf("<input type=file name=the_file><br>");
Sendf("<input type=text name=the_name><br>");
Sendf("<input type=submit name=submit value=' test form-data '>");
Sendf("</form>");
Send( "<pre style='background: #e0e0e0'>");
Send(GetMethod() + " " + GetUrl() + " " + GetHttpVersion() + "\n");
}
示例7: GetArgsCount
int GetArgsCount(JNIEnv *env, jobject args)
{
jmethodID mid = GetMethod(env, "com/yeguang/paramprotocol/ParamArgs",
"getCount", "()I");
return env->CallIntMethod(args, mid);
}
示例8: SecurityClient
SecurityClientSSL::SecurityClientSSL( Address& Address,
std::string certFile,
std::string keyFile,
std::string trustFile,
std::string password,
securityMode method) :
SecurityClient(Address),
itsSecurityMode(method),
itsCertificate(new Certificate()), itsKey(new Key()), itsTrust(new Trust())
{
SetCertificate(certFile);
SetKey(keyFile);
SetTrust(trustFile);
itsPassword = password;
libsslInit();
itsCTX = SSLWrap::SSL_CTX_new(GetMethod()); /* create new context from method */
if (itsCTX == NULL) {
throw_SSL("SSL_CTX_new failed");
}
SSLWrap::SSL_CTX_set_default_passwd_cb(itsCTX, passwordCallback);
if (itsPassword.length() >= 4)
SSLWrap::SSL_CTX_set_default_passwd_cb_userdata(itsCTX, this);
itsCertificate->SetContext(itsCTX);
itsKey->SetContext(itsCTX);
itsTrust->SetContext(itsCTX);
itsCertificate->Apply();
itsKey->Apply();
itsTrust->Apply();
//create new SSL BIO, basing on a configured context
BIO* bio = SSLWrap::BIO_new_ssl_connect(itsCTX);
if (bio == NULL) {
throw_SSL("BIO_new_ssl_connect failed");
}
//make sure SSL is here
SSLWrap::BIO_get_ssl_(bio, & itsSSL);
if (itsSSL == NULL) {
throw_SSL("BIO_get_ssl failed");
}
/* With this option set, if the server suddenly wants a new handshake,
* OpenSSL handles it in the background. */
SSLWrap::SSL_set_mode_(itsSSL, SSL_MODE_AUTO_RETRY);
/*The hostname can be an IP address. The hostname can also include the port
* in the form hostname:port . It is also acceptable to use the form
* "hostname/any/other/path" or "hostname:port/any/other/path".*/
SSLWrap::BIO_set_conn_hostname_(bio, itsSrverAddress.GetHostAndPort().c_str());
DBG << "populated safe client BIO @host=" << itsSrverAddress.GetHostAndPort() << std::endl;
SetBIO(bio);
DBG_CONSTRUCTOR;
}
示例9: GetMethod
Variant DynamicObject::m_GetMethod(int numargs, Variant args[])
{
MethodHandler *mthd = GetMethod(args[0]);
if (mthd) {
return anytovariant(mthd->GetName());
}
return VARNULL;
}
示例10: getEnv
void JniFirebase::UnAuth() {
auto env = getEnv();
if (!GetMethod(env, s_firebaseClass, "unauth", "()V",
&s_unAuth)) {
return;
}
env->CallVoidMethod(m_firebase, s_unAuth);
}
示例11: PrintProperty
static void PrintProperty (LocationObject* loc)
{
if (!loc) return;
LocationMethod method = LOCATION_METHOD_NONE;
LocationPosition *pos = NULL;
LocationAccuracy *acc = NULL;
guint pos_interval = 0;
guint vel_interval = 0;
guint sat_interval = 0;
gchar method_str[STR_MAX] = {0, };
gchar status_str[STR_MAX] = {0, };
gchar* devname = NULL;
g_object_get(loc, "method", &method, NULL);
GetMethod(method_str, method);
g_printf("method[%s] ", method_str);
if (LOCATION_METHOD_GPS == method) {
g_object_get(loc, "dev-name", &devname, NULL);
if (devname) {
g_printf("dev-name[%s] ", devname);
g_free(devname);
}
}
int ret = location_get_last_position (loc, &pos, &acc);
if (ret == LOCATION_ERROR_NONE) {
GetStatus(status_str, pos->status);
g_printf("\nLast position [time(%d) lat(%f) long(%f) alt(%f) status(%s)]",
pos->timestamp, pos->latitude, pos->longitude, pos->altitude, status_str);
location_position_free (pos);
location_accuracy_free (acc);
}
if (method == LOCATION_METHOD_HYBRID || method == LOCATION_METHOD_GPS) {
g_object_get(loc, "pos-interval", &pos_interval, NULL);
g_object_get(loc, "vel-interval", &vel_interval, NULL);
g_object_get(loc, "sat-interval", &sat_interval, NULL);
}
else if (method == LOCATION_METHOD_WPS) {
g_object_get(loc, "pos-interval", &pos_interval, NULL);
g_object_get(loc, "vel-interval", &vel_interval, NULL);
}
else if (method == LOCATION_METHOD_CPS) {
g_object_get(loc, "pos-interval", &pos_interval, NULL);
}
g_printf("Position interval : [%u], Velocity interval [%u], Satellite interval [%u]\n", pos_interval, vel_interval, sat_interval);
g_printf("\nSignals: ");
if (g_sig_enable) g_printf("[service-enabled], ");
if (g_sig_disable) g_printf("[service-disabled], ");
if (g_sig_update) g_printf("[service-updated], ");
if (g_sig_zonein) g_printf("[zone-in], ");
if (g_sig_zoneout) g_printf("[zone-out]");
}
示例12: GetMethod
yeguang::ParamSocket *GetSocket(JNIEnv *env, jobject obj)
{
// call Lcom/yeguang/paramprotocol/ParamSocket; getSock
jmethodID mid = GetMethod(env, "com/yeguang/paramprotocol/ParamSocket",
"getSock", "()J");
yeguang::ParamSocket *sock = (yeguang::ParamSocket *)env->CallLongMethod(obj, mid);
return sock;
}
示例13: GetMethod
ColumnScoringMethod ColumnScorer::GetMethodForScorer(unsigned int scorerIndex) const {
ColumnScoringMethod method = eInvalidColumnScorerMethod;
if (scorerIndex == 0 && !IsCompound()) {
method = GetMethod();
} else if (IsCompound() && scorerIndex < m_scorers.size()) {
method = m_scorers[scorerIndex]->GetMethod();
}
return method;
}
示例14: assert
void TSExpression::Build(SemanticApi::TGlobalBuildContext build_context)
{
assert(first_op.get() == nullptr);
TSemanticTreeBuilder b(build_context, GetSyntax(), GetOwner(), GetMethod(), this);
auto syntax = GetSyntax();
if (!syntax->IsEmpty())
first_op.reset(b.VisitNode(syntax));
expression_result = dynamic_cast<TSOperation*>(first_op.get())->GetFormalParameter();
}
示例15: GetMethod
bool ScriptFile::Execute(asIScriptObject* object, const String& declaration, const VariantVector& parameters, bool unprepare)
{
asIScriptFunction* method = GetMethod(object, declaration);
if (!method)
{
LOGERROR("Method " + declaration + " not found in " + GetName());
return false;
}
return Execute(object, method, parameters, unprepare);
}