當前位置: 首頁>>代碼示例>>C++>>正文


C++ GetMethod函數代碼示例

本文整理匯總了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)";
	}
}
開發者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


注:本文中的GetMethod函數示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。