Example #1
0
bool Version::operator !=(const Version &version)
{
   return compareTo(version) != 0;
}
unsigned char
RAbstractStringRef::equals(const char *cstr) const
{
  return compareTo(cstr) == 0;
}
unsigned char
RAbstractStringRef::equals(const RAbstractStringRef &s) const
{
  return compareTo(s) == 0;
}
Example #4
0
UtlBoolean UtlLongLongInt::isEqual(UtlContainable const * inVal) const
{
    return (compareTo(inVal) == 0) ;
}
Example #5
0
bool str::operator==(const char* pString) const
{
    return compareTo(pString);
}
Example #6
0
TEST_F( Ginga, descriptor_focusSrc1 ) {
	ASSERT_TRUE( play("descriptor/focusSrc/focusSrc1.ncl") );
	ASSERT_TRUE( compareTo("blue360x288_centered_borderWhite_2px") );
}
// Test this object to another like-object for equality.
UtlBoolean
NameValuePairInsensitive::isEqual(
   UtlContainable const * compareContainable) const
{
    return (compareTo(compareContainable) == 0);
}
int32_t java::time::Duration::compareTo(::java::lang::Object* o)
{
    return compareTo(dynamic_cast< Duration* >(o));
}
Example #9
0
unsigned char ICACHE_FLASH_ATTR String::equals(const String &s2) const {
    return (len == s2.len && compareTo(s2) == 0);
}
Example #10
0
// Test this object to another like-object for equality.
UtlBoolean UtlString::isEqual(UtlContainable const * compareContainable) const
{
    return (compareTo(compareContainable) == 0);
}
Example #11
0
/***********************************************************************
 * Handler implementation
 **********************************************************************/
bool Pothos::RemoteHandler::runHandlerOnce(std::istream &is, std::ostream &os)
{
    bool done = false;

    //deserialize the request
    const auto reqArgs = recvDatagram(is);

    //process the request and form the reply
    Pothos::ObjectKwargs replyArgs;
    replyArgs["tid"] = reqArgs.at("tid");
    POTHOS_EXCEPTION_TRY
    {
        const auto &action = reqArgs.at("action").extract<std::string>();
        if (action == "RemoteProxyEnvironment")
        {
            Pothos::ProxyEnvironmentArgs envArgs;
            for (const auto &entry : reqArgs)
            {
                if (entry.second.type() != typeid(std::string)) continue;
                envArgs[entry.first] = entry.second.extract<std::string>();
            }
            const auto &name = reqArgs.at("name").extract<std::string>();
            auto env = Pothos::ProxyEnvironment::make(name, envArgs);
            replyArgs["envID"] = getNewObjectId(Pothos::Object(env));

            //a unique process ID for this server
            const auto info = Pothos::System::HostInfo::get();
            replyArgs["upid"] = Pothos::Object(Pothos::ProxyEnvironment::getLocalUniquePid());
            replyArgs["nodeId"] = Pothos::Object(info.nodeId);
            replyArgs["peerAddr"] = Pothos::Object(_peerAddr);
        }
        else if (action == "~RemoteProxyEnvironment")
        {
            removeObjectAtId(reqArgs.at("envID"));
            done = true;
        }
        else if (action == "findProxy")
        {
            auto env = getObjectAtId(reqArgs.at("envID")).extract<Pothos::ProxyEnvironment::Sptr>();
            auto proxy = env->findProxy(reqArgs.at("name").extract<std::string>());
            replyArgs["handleID"] = getNewObjectId(Pothos::Object(proxy));
        }
        else if (action == "convertObjectToProxy")
        {
            auto env = getObjectAtId(reqArgs.at("envID")).extract<Pothos::ProxyEnvironment::Sptr>();
            auto proxy = env->convertObjectToProxy(reqArgs.at("local"));
            replyArgs["handleID"] = getNewObjectId(Pothos::Object(proxy));
        }
        else if (action == "convertProxyToObject")
        {
            auto env = getObjectAtId(reqArgs.at("envID")).extract<Pothos::ProxyEnvironment::Sptr>();
            auto proxy = getObjectAtId(reqArgs.at("handleID")).extract<Pothos::Proxy>();
            auto local = env->convertProxyToObject(proxy);
            replyArgs["local"] = local;
        }
        else if (action == "~RemoteProxyHandle")
        {
            removeObjectAtId(reqArgs.at("handleID"));
        }
        else if (action == "call")
        {
            auto proxy = getObjectAtId(reqArgs.at("handleID")).extract<Pothos::Proxy>();

            //load the args
            std::vector<Pothos::Proxy> args;
            size_t argNo = 0;
            while (true)
            {
                auto it = reqArgs.find(std::to_string(argNo++));
                if (it == reqArgs.end()) break;
                args.push_back(getObjectAtId(it->second).extract<Pothos::Proxy>());
            }

            //make the call
            try
            {
                const auto &name = reqArgs.at("name").extract<std::string>();
                auto result = proxy.getHandle()->call(name, args.data(), args.size());
                replyArgs["handleID"] = getNewObjectId(Pothos::Object(result));
            }
            catch (const Pothos::ProxyExceptionMessage &ex)
            {
                replyArgs["message"] = Pothos::Object(ex.message());
            }
        }
        else if (action == "compareTo")
        {
            auto proxy = getObjectAtId(reqArgs.at("handleID")).extract<Pothos::Proxy>();
            auto other = getObjectAtId(reqArgs.at("otherID")).extract<Pothos::Proxy>();
            replyArgs["result"] = Pothos::Object(proxy.compareTo(other));
        }
        else if (action == "hashCode")
        {
            auto proxy = getObjectAtId(reqArgs.at("handleID")).extract<Pothos::Proxy>();
            replyArgs["result"] = Pothos::Object(proxy.hashCode());
        }
        else if (action == "toString")
        {
            auto proxy = getObjectAtId(reqArgs.at("handleID")).extract<Pothos::Proxy>();
            replyArgs["result"] = Pothos::Object(proxy.toString());
        }
        else if (action == "getClassName")
        {
            auto proxy = getObjectAtId(reqArgs.at("handleID")).extract<Pothos::Proxy>();
            replyArgs["result"] = Pothos::Object(proxy.getClassName());
        }
        else
        {
            poco_bugcheck_msg(action.c_str());
        }
    }
    POTHOS_EXCEPTION_CATCH(const Pothos::Exception &ex)
    {
        replyArgs["errorMsg"] = Pothos::Object(ex.displayText());
    }
Example #12
0
UtlBoolean UtlString::operator!=(const UtlString& compareStr) const
{
    return compareTo(compareStr) != 0;
}
Example #13
0
UtlBoolean UtlString::operator==(const char *compareStr) const
{
    return compareTo(compareStr) == 0;
}
Example #14
0
int32_t java::lang::Integer::compareTo(Object* o)
{ 
    return compareTo(dynamic_cast< Integer* >(o));
}
int32_t java::nio::ByteBuffer::compareTo(::java::lang::Object* arg0)
{ 
    return compareTo(dynamic_cast< ByteBuffer* >(arg0));
}
Example #16
0
unsigned char ICACHE_FLASH_ATTR String::operator>=(const String &rhs) const {
    return compareTo(rhs) >= 0;
}
Example #17
0
int32_t ByteBuffer::compareTo(const sp<ByteBuffer>& other) const {
    if (other == nullptr) {
        return false;
    }
    return compareTo(*other);
}
Example #18
0
TEST_F( Ginga, media_dinamic_fontStyle1 ) {
	ASSERT_TRUE( play("media/fontStyle/dinamic_fontStyle1.ncl") );
	ASSERT_TRUE( compareTo("standardText") );
	ASSERT_TRUE( pressKey( ::util::key::red ));
	ASSERT_TRUE( compareTo("standardText_italic") );
}
Example #19
0
TEST_F( Ginga, descriptor_focusSrc2 ) {
	ASSERT_TRUE( play("descriptor/focusSrc/focusSrc2.ncl") );
	ASSERT_TRUE( compareTo("black720x576") );
}
Example #20
0
TEST_F( Ginga, region_zIndex5 ) {
	ASSERT_TRUE( play("region/zIndex/zIndex5.ncl") );
	ASSERT_TRUE( compareTo("blueOverRed") );
}
Example #21
0
int string::compareTo(string const &src) const
{
  return compareTo(src.s);
}
Example #22
0
TEST_F( Ginga, region_zIndex7 ) {
	ASSERT_TRUE( play("region/zIndex/zIndex7.ncl") );
	ASSERT_TRUE( compareTo("greenOverBlue") );
}
Example #23
0
unsigned char String::operator>=(const String &rhs) const
{
	return compareTo(rhs) >= 0;
}
Example #24
0
TEST_F( Ginga, region_zIndex9 ) {
	ASSERT_TRUE( play("region/zIndex/zIndex9.ncl") );
	ASSERT_TRUE( compareTo("blueOverRedOverGreen") );
}
Example #25
0
bool str::operator==(const str& rhs) const
{
    return compareTo(rhs.c_str());
}
Example #26
0
TEST_F( Ginga, region_zIndex10 ) {
	ASSERT_TRUE( play("region/zIndex/zIndex10.ncl") );
	ASSERT_TRUE( compareTo("redOverGreenOverBlue2") );
}
unsigned char
RAbstractStringRef::operator >=(const RAbstractStringRef &rhs) const
{
  return compareTo(rhs) >= 0;
}
Example #28
0
TEST_F( Ginga, region_zIndex2 ) {
	ASSERT_TRUE( play("region/zIndex/zIndex2.ncl") );
	ASSERT_TRUE( compareTo("redOverBlue") );
}
Example #29
0
unsigned char String::equals(const String &s2) const
{
	return (len == s2.len && compareTo(s2) == 0);
}
Example #30
0
bool Version::operator <(const Version &version)
{
   return compareTo(version) < 0;
}