本文整理汇总了C++中xmlrpc_c::paramList类的典型用法代码示例。如果您正苦于以下问题:C++ paramList类的具体用法?C++ paramList怎么用?C++ paramList使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了paramList类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: print
void Log::print(const xmlrpc_c::paramList & params)
{
for(unsigned i=0; i < params.size(); i++) {
std::clog<<"param["<<i<<"]\n";
printValues(params.getStruct(i));
}
}
示例2: Exception
void devTcp4Client_Interface::client_create(xmlrpc_c::paramList const& paramList,
xmlrpc_c::value* retvalP) {
ACE_TRACE("devTcp4Client_Interface::create");
std::string devname = static_cast<std::string>(paramList.getString(0));
if (devices::instance()->exists(devname)) {
throw Exception("Device with that name already exists.");
}
std::string address = IPv4Addr::IPv4_Any;
int port = 0;
devTcp4Client* tcp4_dev = new devTcp4Client(devname, this);
devices::instance()->add(tcp4_dev);
if (paramList.size() > 1) {
address = static_cast<std::string>(paramList.getString(2));
tcp4_dev->setAddress(address);
}
if (paramList.size() > 2) {
port = static_cast<int>(paramList.getInt(3));
tcp4_dev->setPort(port);
if (port > 0) tcp4_dev->openConnection();
}
*retvalP = xmlrpc_c::value_nil();
}
示例3: execute
void
execute(const xmlrpc_c::paramList & paramList, xmlrpc_c::value* retvalP) {
// Get the requested mode
bool const hvRequested(paramList.getBoolean(0));
paramList.verifyEnd(1);
TheTransmitControl->setHvRequested(hvRequested);
*retvalP = xmlrpc_c::value_nil();
}
示例4:
void RemoteKinematics::LookAtMethod::execute(xmlrpc_c::paramList const& paramList, xmlrpc_c::value* const resultP) {
paramList.verifyEnd(4);
double x = paramList.getDouble(0);
double y = paramList.getDouble(1);
double z = paramList.getDouble(2);
bool top_camera = paramList.getBoolean(3);
this->m_kinematics->lookAt(x, y, z, top_camera);
*resultP = value_nil();
}
示例5: execute
void
execute(xmlrpc_c::paramList const& paramList,
value * const retvalP) {
paramList.getNil(0);
paramList.verifyEnd(1);
*retvalP = value_i8(7ll);
}
示例6:
void devTcp4Client_Interface::client_set_ms_between_attempts(xmlrpc_c::paramList const& paramList,
xmlrpc_c::value* retvalP) {
ACE_TRACE("devTcp4Client_Interface::client_set_ms_between_attempts");
std::string devname = static_cast<std::string>(paramList.getString(0));
int ms = static_cast<int>(paramList.getInt(1));
devTcp4Client* tcp4_dev = dynamic_cast<devTcp4Client*>(devices::instance()->device(devname));
tcp4_dev->setMsBetweenAttempts(ms);
*retvalP = xmlrpc_c::value_nil();
}
示例7: get_rate_limit
virtual void get_rate_limit(xmlrpc_c::paramList const& paramList, xmlrpc_c::value* retvalP) {
ACE_TRACE("modEmulateRate_Interface::get_rate");
int rate = 0;
if (paramList.size() > 2 ) {
rate = find_handler(paramList)->getRateLimitAtTime(paramList.getDouble(2));
}
else {
rate = find_handler(paramList)->getRateLimit();
}
*retvalP = xmlrpc_c::value_double(rate);
}
示例8: execute
void execute(xmlrpc_c::paramList const& paramList, xmlrpc_c::value* const retvalP)
{
chair = paramList.getInt(0);
symbol_name = paramList.getString(1);
SetEvent(symbol_need);
DWORD wait_result;
wait_result = WaitForSingleObject(symbol_ready, INFINITE);
if(WAIT_OBJECT_0 == wait_result)
{
*retvalP = xmlrpc_c::value_double(symbol_value);
} else {
msg(L"Something went wrong.", L"openholdem-xmlrpc-dll");
}
}
示例9: execute
void
execute(xmlrpc_c::paramList const& paramList,
xmlrpc_c::value * const retvalP) {
const params_t params = paramList.getStruct(0);
breakOutParams(params);
#if PT_UG
Mmsapt* pdsa = reinterpret_cast<Mmsapt*>(PhraseDictionary::GetColl()[0]);
pdsa->add(source_,target_,alignment_);
#else
const PhraseDictionary* pdf = PhraseDictionary::GetColl()[0];
PhraseDictionaryDynSuffixArray*
pdsa = (PhraseDictionaryDynSuffixArray*) pdf;
cerr << "Inserting into address " << pdsa << endl;
pdsa->insertSnt(source_, target_, alignment_);
#endif
if(add2ORLM_) {
//updateORLM();
}
XVERBOSE(1,"Done inserting\n");
//PhraseDictionary* pdsa = (PhraseDictionary*) pdf->GetDictionary(*dummy);
map<string, xmlrpc_c::value> retData;
//*retvalP = xmlrpc_c::value_struct(retData);
#ifndef PT_UG
pdf = 0;
#endif
pdsa = 0;
*retvalP = xmlrpc_c::value_string("Phrase table updated");
}
示例10: execute
void
execute(xmlrpc_c::paramList const& paramList,
xmlrpc_c::value * const retvalP) {
int const addend(paramList.getInt(0));
int const adder(paramList.getInt(1));
paramList.verifyEnd(2);
*retvalP = xmlrpc_c::value_int(addend + adder);
// Sometimes, make it look hard (so client can see what it's like
// to do an RPC that takes a while).
if (adder == 1)
SLEEP(2);
}
示例11: execute
void RegisterDeviceHandler::execute(xmlrpc_c::paramList const& paramList, xmlrpc_c::value * const retvalP){
std::string device(paramList.getString(0));
LOG_INFO("Register device: " << device);
*retvalP = xmlrpc_c::value_int(1337);
}
示例12: execute
void
CloseSession::
execute(xmlrpc_c::paramList const& paramList,
xmlrpc_c::value * const retvalP)
{
typedef std::map<std::string, xmlrpc_c::value> params_t;
paramList.verifyEnd(1); // ??? UG
params_t const& params = paramList.getStruct(0);
params_t::const_iterator si = params.find("session-id");
if (si != params.end())
{
uint64_t session_id = xmlrpc_c::value_int(si->second);
m_server.delete_session(session_id);
*retvalP = xmlrpc_c::value_string("Session closed");
}
}
示例13: execute
void
execute(xmlrpc_c::paramList const& paramList,
value * const retvalP) {
paramList.verifyEnd(1);
*retvalP = paramList[0];
}
示例14: set_rate_limit
virtual void set_rate_limit(xmlrpc_c::paramList const& paramList, xmlrpc_c::value* retvalP) {
ACE_TRACE("modEmulateRate_Interface::set_rate");
int rate = 0, startTime = -1.0;
if ( paramList[2].type() != xmlrpc_c::value::TYPE_ARRAY ) {
rate = paramList.getInt(2);
}
else {
const std::vector<xmlrpc_c::value> arrayData = paramList.getArray(2);
startTime = xmlrpc_c::value_double(arrayData[0]);
rate = xmlrpc_c::value_double(arrayData[1]);
}
find_handler(paramList)->setRateLimit(rate, startTime);
*retvalP = xmlrpc_c::value_nil();
}
示例15:
/** Execute method.
* @param params parameters
* @param result result value
*/
void
XmlRpcLogMethods::log_log::execute(xmlrpc_c::paramList const& params,
xmlrpc_c::value * const result)
{
std::string component = params.getString(0);
std::string message = params.getString(1);
__logger->log(__log_level, component.c_str(), "%s", message.c_str());
*result = xmlrpc_c::value_nil();
}