DdsJs/ddsjs_base.cpp
// ======================================================
// ENUM IMPLEMENTATION: OwnershipQosPolicyKind
// ======================================================
// Initialization of enumeration OwnershipQosPolicyKind field type
ENUM IMPLEMENTATION: OwnershipQosPolicyKind
Initialization of enumeration OwnershipQosPolicyKind field type
ENUM IMPLEMENTATION : OwnershipQosPolicyKind Initialization of enumeration OwnershipQosPolicyKind field type
void OwnershipQosPolicyKindField::Init(Local<Object> exports)
{
	Isolate *isolate = Isolate::GetCurrent();
	Local<Context> ctx = Local<Context>::New(
		isolate,
		isolate->GetCurrentContext()
	);
	Local<Object> enumObj(Object::New(isolate));
	enumObj->ForceSet(ctx,
		String::NewFromUtf8(isolate, "SHARED_OWNERSHIP_QOS"),
		Number::New(isolate, ::DDS::SHARED_OWNERSHIP_QOS),
		::v8::ReadOnly);
	enumObj->ForceSet(ctx,
		String::NewFromUtf8(isolate, "EXCLUSIVE_OWNERSHIP_QOS"),
		Number::New(isolate, ::DDS::EXCLUSIVE_OWNERSHIP_QOS),
		::v8::ReadOnly);
	Maybe< bool > setResult = exports->Set(
		ctx,
		String::NewFromUtf8(isolate, "OwnershipQosPolicyKind"),
		enumObj
	);
	if (!setResult.FromMaybe(false))
	{
	}
}
void OwnershipQosPolicyKindField :: Init ( Local < Object > exports ) { Isolate * isolate = Isolate :: GetCurrent ( ) ; Local < Context > ctx = Local < Context > :: New ( isolate , isolate -> GetCurrentContext ( ) ) ; Local < Object > enumObj ( Object :: New ( isolate ) ) ; enumObj -> ForceSet ( ctx , String :: NewFromUtf8 ( isolate , " " ) , Number :: New ( isolate , :: DDS :: SHARED_OWNERSHIP_QOS ) , :: v8 :: ReadOnly ) ; enumObj -> ForceSet ( ctx , String :: NewFromUtf8 ( isolate , " " ) , Number :: New ( isolate , :: DDS :: EXCLUSIVE_OWNERSHIP_QOS ) , :: v8 :: ReadOnly ) ; Maybe < bool > setResult = exports -> Set ( ctx , String :: NewFromUtf8 ( isolate , " " ) , enumObj ) ; if ( ! setResult . FromMaybe ( false ) ) { } }
ENUM IMPLEMENTATION: OwnershipQosPolicyKind
Initialization of enumeration OwnershipQosPolicyKind field type
ENUM IMPLEMENTATION : OwnershipQosPolicyKind Initialization of enumeration OwnershipQosPolicyKind field type
// TODO: Throw exception