DdsJs/ddsjs_base.cpp
// From C++ to JavaScript for topic LivelinessQosPolicy
From C++ to JavaScript for topic LivelinessQosPolicy
From C ++ to JavaScript for topic LivelinessQosPolicy
Local<Value> LivelinessQosPolicyField::FromCppToJsValue(LivelinessQosPolicyField::ConstRefType cppValue)
{
	Isolate *isolate = Isolate::GetCurrent();
	EscapableHandleScope scope(isolate);
	Local<Object> result(Object::New(isolate));
	Local<Context> ctx = Local<Context>::New(isolate, isolate->GetCurrentContext());
	Maybe< bool > setResult = ::v8::Nothing< bool >();
	setResult = result->Set(
		ctx,
		Local<String>::New(
			isolate,
			LivelinessQosPolicyField::kindFieldName
		),
		::DDS::LivelinessQosPolicyKindField::FromCppToJsValue(
			cppValue.kind
		)
	);
	if (!setResult.FromMaybe(false))
	{
	}setResult = result->Set(
		ctx,
		Local<String>::New(
			isolate,
			LivelinessQosPolicyField::lease_durationFieldName
		),
		::DDS::Duration_tField::FromCppToJsValue(
			cppValue.lease_duration
		)
	);
	if (!setResult.FromMaybe(false))
	{
	}
	return scope.Escape(result);
}
Local < Value > LivelinessQosPolicyField :: FromCppToJsValue ( LivelinessQosPolicyField :: ConstRefType cppValue ) { Isolate * isolate = Isolate :: GetCurrent ( ) ; EscapableHandleScope scope ( isolate ) ; Local < Object > result ( Object :: New ( isolate ) ) ; Local < Context > ctx = Local < Context > :: New ( isolate , isolate -> GetCurrentContext ( ) ) ; Maybe < bool > setResult = :: v8 :: Nothing < bool > ( ) ; setResult = result -> Set ( ctx , Local < String > :: New ( isolate , LivelinessQosPolicyField :: kindFieldName ) , :: DDS :: LivelinessQosPolicyKindField :: FromCppToJsValue ( cppValue . kind ) ) ; if ( ! setResult . FromMaybe ( false ) ) { } setResult = result -> Set ( ctx , Local < String > :: New ( isolate , LivelinessQosPolicyField :: lease_durationFieldName ) , :: DDS :: Duration_tField :: FromCppToJsValue ( cppValue . lease_duration ) ) ; if ( ! setResult . FromMaybe ( false ) ) { } return scope . Escape ( result ) ; }
From C++ to JavaScript for topic LivelinessQosPolicy
From C ++ to JavaScript for topic LivelinessQosPolicy
// TODO: throw exception // TODO: throw exception