Ejemplo n.º 1
0
/*ARGSUSED*/
_cf_init(struct cf* self, struct JMCException* *exceptionThrown,
		 struct nfrc *rc)
{
	cfImpl *oimpl = cf2cfImpl(self);
	FontObject *fobj = new FontObject((struct nff *)self, rc);
	if (fobj == NULL)
	  {
		JMC_EXCEPTION(exceptionThrown, JMCEXCEPTION_OUT_OF_MEMORY);
	  }
	else
	  {
		oimpl->object = fobj;
	  }
	return;
}
Ejemplo n.º 2
0
cdlmFactory_Create(JMCException* *exception)
{
	cdlmImplHeader* impl = (cdlmImplHeader*)XP_NEW_ZAP(cdlmImpl);
	cdlm* self;
	if (impl == NULL) {
		JMC_EXCEPTION(exception, JMCEXCEPTION_OUT_OF_MEMORY);
		return NULL;
	}
	self = cdlmImpl2cdlm(impl);
	impl->vtablecdlm = &cdlmVtable;
	impl->refcount = 1;
	_cdlm_init(self, exception);
	if (JMC_EXCEPTION_RETURNED(exception)) {
		XP_FREE(impl);
		return NULL;
	}
	return self;
}
Ejemplo n.º 3
0
winfpFactory_Create(JMCException* *exception, struct nffbp* broker)
{
	winfpImplHeader* impl = (winfpImplHeader*)XP_NEW_ZAP(winfpImpl);
	winfp* self;
	if (impl == NULL) {
		JMC_EXCEPTION(exception, JMCEXCEPTION_OUT_OF_MEMORY);
		return NULL;
	}
	self = winfpImpl2winfp(impl);
	impl->vtablewinfp = &winfpVtable;
	impl->refcount = 1;
	_winfp_init(self, exception, broker);
	if (JMC_EXCEPTION_RETURNED(exception)) {
		XP_FREE(impl);
		return NULL;
	}
	return self;
}
Ejemplo n.º 4
0
winrfFactory_Create(JMCException* *exception)
{
	winrfImplHeader* impl = (winrfImplHeader*)XP_NEW_ZAP(winrfImpl);
	winrf* self;
	if (impl == NULL) {
		JMC_EXCEPTION(exception, JMCEXCEPTION_OUT_OF_MEMORY);
		return NULL;
	}
	self = winrfImpl2winrf(impl);
	impl->vtablewinrf = &winrfVtable;
	impl->refcount = 1;
	_winrf_init(self, exception);
	if (JMC_EXCEPTION_RETURNED(exception)) {
		XP_FREE(impl);
		return NULL;
	}
	return self;
}
Ejemplo n.º 5
0
cfpFactory_Create(JMCException* *exception, struct nffbp* a)
{
    cfpImplHeader* impl = (cfpImplHeader*)XP_NEW_ZAP(cfpImpl);
    cfp* self;
    if (impl == NULL) {
        JMC_EXCEPTION(exception, JMCEXCEPTION_OUT_OF_MEMORY);
        return NULL;
    }
    self = cfpImpl2cfp(impl);
    impl->vtablecfp = &cfpVtable;
    impl->refcount = 1;
    _cfp_init(self, exception, a);
    if (JMC_EXCEPTION_RETURNED(exception)) {
        XP_FREE(impl);
        return NULL;
    }
    return self;
}
Ejemplo n.º 6
0
IMGCBFactory_Create(JMCException* *exception)
{
	IMGCBImplHeader* impl = (IMGCBImplHeader*)XP_NEW_ZAP(IMGCBImpl);
	IMGCB* self;
	if (impl == NULL) {
		JMC_EXCEPTION(exception, JMCEXCEPTION_OUT_OF_MEMORY);
		return NULL;
	}
	self = IMGCBImpl2IMGCB(impl);
	impl->vtableIMGCB = &IMGCBVtable;
	impl->refcount = 1;
	_IMGCB_init(self, exception);
	if (JMC_EXCEPTION_RETURNED(exception)) {
		XP_FREE(impl);
		return NULL;
	}
	return self;
}
Ejemplo n.º 7
0
/*ARGSUSED*/
_cfmi_init(struct cfmi* self, struct JMCException* *exceptionThrown,
		   const char* name, const char* charset, const char* encoding,
		   jint weight, jint pitch, jint style, jint underline, jint strikeOut,
		   jint resolutionX, jint resolutionY)
{
	cfmiImpl *oimpl = cfmi2cfmiImpl(self);
	FontMatchInfoObject *fmiob = (FontMatchInfoObject *)oimpl->object;
	fmiob = new FontMatchInfoObject(name, charset, encoding, weight,
									pitch, style, underline, strikeOut,
									resolutionX, resolutionY);
	if (fmiob == NULL)
	  {
		JMC_EXCEPTION(exceptionThrown, JMCEXCEPTION_OUT_OF_MEMORY);
	  }
	else
	  {
		oimpl->object = fmiob;
	  }
}