Esempio n. 1
0
void Object<Broker>::CreateObject(JVMLoader env, std::string className, std::vector<BaseJavaValue *>& arguments) {
    
    jmethodID constructor;
    
    auto name = object.GetType();
    auto jni = Env();
    auto& findclazz = jni->functions->GetMethodID;
    
    auto member = Memoization(name, jni->functions->FindClass, jni, name.c_str());
    
    Utils::raiseNullError(member, "Class not found in: " + name);
    
    if(arguments.empty())
        constructor = Memoization(name, findclazz, jni, member,
                              CLASS_DEFAULT_CTS.c_str(), VOID_RETURN.c_str());
    else
        constructor = Memoization(name, findclazz, jni, member,
                              CLASS_DEFAULT_CTS.c_str(), Arguments::GetConstructorSignature(jni,arguments).c_str());
    
    
    auto javaValues = Arguments::GetValues(jni, arguments);
    auto tmp = Wrapper( jni->functions->NewObjectA, jni, member, constructor, (jvalue*)&javaValues[0] );
    
    object.Set(tmp);
    methodArray = broker.GetMethodsNative(object);
}
int main(int argc, char* argv[])
{
	Wrapper w2;
	Wrapper w1 = Wrapper (w2);
	Wrapper w3 = Wrapper(move(w2));
	Wrapper w4;
	cout << "------------------" << endl;
	w4 = w2;
	w4 = move(w2);
	//Wrapper w2;
	//w2 = w1;

	

	
	return 0;
}
Esempio n. 3
0
void test()
{
#if (!defined BOOST_NO_CXX11_RVALUE_REFERENCES)
  boost::optional<int> v = Wrapper();
  BOOST_TEST(v);
  BOOST_TEST_EQ(*v, 7);
#endif
}
void FPaperSpriteVertexBuffer::InitRHI()
{
	const uint32 SizeInBytes = Vertices.Num() * sizeof(FPaperSpriteVertex);

	FDummyResourceArrayWrapper Wrapper(Vertices.GetData(), SizeInBytes);
	FRHIResourceCreateInfo CreateInfo(&Wrapper);
	VertexBufferRHI = RHICreateVertexBuffer(SizeInBytes, BUF_Static, CreateInfo);

	Vertices.Empty();
}
Esempio n. 5
0
long __stdcall pVectoredExceptionHandler(_EXCEPTION_POINTERS *pException) { 
	if(pException->ContextRecord->Eip==Offsets.ExcAddy) //This is the address where the exception happens 
	{ 
		//Restore EDI. EDI = dwDVar wich is 0 and supposed to be dwDVarValue
		pException->ContextRecord->Edi = Offsets.dwDVarValue; 

		Wrapper(); //Call our function

		return EXCEPTION_CONTINUE_EXECUTION; 
	} 
	return EXCEPTION_CONTINUE_SEARCH; 
}
Esempio n. 6
0
Wrapper Wrapper::create()
{
    return Wrapper(QSharedPointer<int>(new int(-47)));
}
Esempio n. 7
0
void Baz ()
{
  Foo (Wrapper ()); // { dg-error "Wrapper" "" }
}