DdsJs/ddsjs_base.cpp
// From C++ to JavaScript for topic SampleInfo
From C++ to JavaScript for topic SampleInfo
From C ++ to JavaScript for topic SampleInfo
Local<Value> SampleInfoField::FromCppToJsValue(SampleInfoField::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,
			SampleInfoField::sample_stateFieldName
		),
		::DdsJs::UnsignedLongField::FromCppToJsValue(
			cppValue.sample_state
		)
	);
	if (!setResult.FromMaybe(false))
	{
	}setResult = result->Set(
		ctx,
		Local<String>::New(
			isolate,
			SampleInfoField::view_stateFieldName
		),
		::DdsJs::UnsignedLongField::FromCppToJsValue(
			cppValue.view_state
		)
	);
	if (!setResult.FromMaybe(false))
	{
	}setResult = result->Set(
		ctx,
		Local<String>::New(
			isolate,
			SampleInfoField::instance_stateFieldName
		),
		::DdsJs::UnsignedLongField::FromCppToJsValue(
			cppValue.instance_state
		)
	);
	if (!setResult.FromMaybe(false))
	{
	}setResult = result->Set(
		ctx,
		Local<String>::New(
			isolate,
			SampleInfoField::instance_handleFieldName
		),
		::DdsJs::UnsignedLongField::FromCppToJsValue(
			cppValue.instance_handle
		)
	);
	if (!setResult.FromMaybe(false))
	{
	}setResult = result->Set(
		ctx,
		Local<String>::New(
			isolate,
			SampleInfoField::publication_handleFieldName
		),
		::DdsJs::UnsignedLongField::FromCppToJsValue(
			cppValue.publication_handle
		)
	);
	if (!setResult.FromMaybe(false))
	{
	}setResult = result->Set(
		ctx,
		Local<String>::New(
			isolate,
			SampleInfoField::disposed_generation_countFieldName
		),
		::DdsJs::LongField::FromCppToJsValue(
			cppValue.disposed_generation_count
		)
	);
	if (!setResult.FromMaybe(false))
	{
	}setResult = result->Set(
		ctx,
		Local<String>::New(
			isolate,
			SampleInfoField::no_writers_generation_countFieldName
		),
		::DdsJs::LongField::FromCppToJsValue(
			cppValue.no_writers_generation_count
		)
	);
	if (!setResult.FromMaybe(false))
	{
	}setResult = result->Set(
		ctx,
		Local<String>::New(
			isolate,
			SampleInfoField::sample_rankFieldName
		),
		::DdsJs::LongField::FromCppToJsValue(
			cppValue.sample_rank
		)
	);
	if (!setResult.FromMaybe(false))
	{
	}setResult = result->Set(
		ctx,
		Local<String>::New(
			isolate,
			SampleInfoField::generation_rankFieldName
		),
		::DdsJs::LongField::FromCppToJsValue(
			cppValue.generation_rank
		)
	);
	if (!setResult.FromMaybe(false))
	{
	}setResult = result->Set(
		ctx,
		Local<String>::New(
			isolate,
			SampleInfoField::absolute_generation_rankFieldName
		),
		::DdsJs::LongField::FromCppToJsValue(
			cppValue.absolute_generation_rank
		)
	);
	if (!setResult.FromMaybe(false))
	{
	}setResult = result->Set(
		ctx,
		Local<String>::New(
			isolate,
			SampleInfoField::valid_dataFieldName
		),
		::DdsJs::BooleanField::FromCppToJsValue(
			cppValue.valid_data
		)
	);
	if (!setResult.FromMaybe(false))
	{
	}
	return scope.Escape(result);
}
Local < Value > SampleInfoField :: FromCppToJsValue ( SampleInfoField :: 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 , SampleInfoField :: sample_stateFieldName ) , :: DdsJs :: UnsignedLongField :: FromCppToJsValue ( cppValue . sample_state ) ) ; if ( ! setResult . FromMaybe ( false ) ) { } setResult = result -> Set ( ctx , Local < String > :: New ( isolate , SampleInfoField :: view_stateFieldName ) , :: DdsJs :: UnsignedLongField :: FromCppToJsValue ( cppValue . view_state ) ) ; if ( ! setResult . FromMaybe ( false ) ) { } setResult = result -> Set ( ctx , Local < String > :: New ( isolate , SampleInfoField :: instance_stateFieldName ) , :: DdsJs :: UnsignedLongField :: FromCppToJsValue ( cppValue . instance_state ) ) ; if ( ! setResult . FromMaybe ( false ) ) { } setResult = result -> Set ( ctx , Local < String > :: New ( isolate , SampleInfoField :: instance_handleFieldName ) , :: DdsJs :: UnsignedLongField :: FromCppToJsValue ( cppValue . instance_handle ) ) ; if ( ! setResult . FromMaybe ( false ) ) { } setResult = result -> Set ( ctx , Local < String > :: New ( isolate , SampleInfoField :: publication_handleFieldName ) , :: DdsJs :: UnsignedLongField :: FromCppToJsValue ( cppValue . publication_handle ) ) ; if ( ! setResult . FromMaybe ( false ) ) { } setResult = result -> Set ( ctx , Local < String > :: New ( isolate , SampleInfoField :: disposed_generation_countFieldName ) , :: DdsJs :: LongField :: FromCppToJsValue ( cppValue . disposed_generation_count ) ) ; if ( ! setResult . FromMaybe ( false ) ) { } setResult = result -> Set ( ctx , Local < String > :: New ( isolate , SampleInfoField :: no_writers_generation_countFieldName ) , :: DdsJs :: LongField :: FromCppToJsValue ( cppValue . no_writers_generation_count ) ) ; if ( ! setResult . FromMaybe ( false ) ) { } setResult = result -> Set ( ctx , Local < String > :: New ( isolate , SampleInfoField :: sample_rankFieldName ) , :: DdsJs :: LongField :: FromCppToJsValue ( cppValue . sample_rank ) ) ; if ( ! setResult . FromMaybe ( false ) ) { } setResult = result -> Set ( ctx , Local < String > :: New ( isolate , SampleInfoField :: generation_rankFieldName ) , :: DdsJs :: LongField :: FromCppToJsValue ( cppValue . generation_rank ) ) ; if ( ! setResult . FromMaybe ( false ) ) { } setResult = result -> Set ( ctx , Local < String > :: New ( isolate , SampleInfoField :: absolute_generation_rankFieldName ) , :: DdsJs :: LongField :: FromCppToJsValue ( cppValue . absolute_generation_rank ) ) ; if ( ! setResult . FromMaybe ( false ) ) { } setResult = result -> Set ( ctx , Local < String > :: New ( isolate , SampleInfoField :: valid_dataFieldName ) , :: DdsJs :: BooleanField :: FromCppToJsValue ( cppValue . valid_data ) ) ; if ( ! setResult . FromMaybe ( false ) ) { } return scope . Escape ( result ) ; }
From C++ to JavaScript for topic SampleInfo
From C ++ to JavaScript for topic SampleInfo
// TODO: throw exception // TODO: throw exception // TODO: throw exception // TODO: throw exception // TODO: throw exception // TODO: throw exception // TODO: throw exception // TODO: throw exception // TODO: throw exception // TODO: throw exception // TODO: throw exception