• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C++ GetMethod函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C++中GetMethod函数的典型用法代码示例。如果您正苦于以下问题:C++ GetMethod函数的具体用法?C++ GetMethod怎么用?C++ GetMethod使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了GetMethod函数的16个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: return

std::string PersistCommand::GetString() const
{
	if (m_activity->IsPersistTokenSet()) {
		return (GetMethod() + " " + m_activity->GetPersistToken()->GetString());
	} else {
		return GetMethod() + "(no token)";
	}
}
开发者ID:ctbrowser,项目名称:activitymanager,代码行数:8,代码来源:PersistCommand.cpp


示例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;
}
开发者ID:Strongc,项目名称:proview,代码行数:53,代码来源:xtt_menu.cpp


示例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 );

}
开发者ID:DocOnDev,项目名称:mythtv,代码行数:30,代码来源:upnpmsrr.cpp


示例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;
}
开发者ID:RedFog,项目名称:Iris-Language,代码行数:27,代码来源:IrisClass.cpp


示例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);
				}
			}
开发者ID:mrnixe,项目名称:Workflow,代码行数:33,代码来源:WfRuntimeAssembly.cpp


示例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");
}
开发者ID:BackupTheBerlios,项目名称:openslx-svn,代码行数:25,代码来源:HttpDebugSocket.cpp


示例7: GetArgsCount

int GetArgsCount(JNIEnv *env, jobject args)
{
	jmethodID mid = GetMethod(env, "com/yeguang/paramprotocol/ParamArgs",
		"getCount", "()I");

	return env->CallIntMethod(args, mid);
}
开发者ID:zhangyongfei,项目名称:ParamProtocol,代码行数:7,代码来源:com_yeguang_paramprotocol_ParamSocket.cpp


示例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;
}
开发者ID:nazgee,项目名称:libosock,代码行数:59,代码来源:SecurityClientSSL.cpp


示例9: GetMethod

Variant DynamicObject::m_GetMethod(int numargs, Variant args[])
{
    MethodHandler *mthd = GetMethod(args[0]);
    if (mthd) {
        return anytovariant(mthd->GetName());
    }
    return VARNULL;
}
开发者ID:vseryakov,项目名称:lmbox,代码行数:8,代码来源:object.cpp


示例10: getEnv

void JniFirebase::UnAuth() {
    auto env = getEnv();
    if (!GetMethod(env, s_firebaseClass, "unauth", "()V",
                   &s_unAuth)) {
        return;
    }
    env->CallVoidMethod(m_firebase, s_unAuth);
}
开发者ID:Blue7un,项目名称:Firebase-Unity,代码行数:8,代码来源:JniFirebase.cpp


示例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]");
}
开发者ID:tizenorg,项目名称:framework.location.libslp-location,代码行数:56,代码来源:location-api-test.c


示例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;
}
开发者ID:zhangyongfei,项目名称:ParamProtocol,代码行数:10,代码来源:com_yeguang_paramprotocol_ParamSocket.cpp


示例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;
}
开发者ID:jackgopack4,项目名称:pico-blast,代码行数:10,代码来源:ColumnScorer.cpp


示例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();
}
开发者ID:HumMan,项目名称:BaluScript,代码行数:10,代码来源:SExpression.cpp


示例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);
}
开发者ID:jjiezheng,项目名称:urho3d,代码行数:11,代码来源:ScriptFile.cpp


示例16: getEnv

JniChildEventStub::JniChildEventStub(JniFirebase* firebase, jlong cookie) {
    auto env = getEnv();
    
    if (!GetClass(env, s_stubClassName, &s_stubClass)) {
        return;
    }
    
    if (!GetMethod(env, s_stubClass, s_stubCtorName, s_stubCtorSig, &s_stubCtor)) {
        return;
    }
    
    if (!GetMethod(env, s_stubClass, s_stubReleaseName, s_stubReleaseSig, &s_stubRelease)) {
        return;
    }
    
    JOBJECT localRef = JOBJECT(env,
                               env->NewObject(s_stubClass, s_stubCtor, firebase->getJniObject(),
                                              cookie));
    m_stub = env->NewGlobalRef(localRef);
}
开发者ID:benwulfe,项目名称:firebase-unity,代码行数:20,代码来源:JniChildEventStub.cpp



注:本文中的GetMethod函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ GetMethodID函数代码示例发布时间:2022-05-30
下一篇:
C++ GetMeter函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap