package com.jxml.quick.engine;
import com.jxml.quick.*;
import com.jxml.quick.access.*;
import com.jxml.quick.tf.*;

public class QIsIdRefAccess extends QOptionalAccess
{
    protected void validateParent(Object parent, QContext context)
	throws QPE
    {
	if (!(parent instanceof QElementFactory))
	    context.throwPE("requires QCMFactory parent, not"+
			    parent.getClass());
    }

    protected Object get(Object parent, QContext context)
	throws QPE
    {
	validateParent(parent,context);
	QElementFactory ef=(QElementFactory)parent;
	return new Boolean(ef.isIdRef);
    }

    public void add(Object parent, 
		    QTargetFactory parentFactory,
		    Object child, 
		    QContext context)
	throws QPE
    {
	validateParent(parent,context);
	validateChild(child,context);
	QElementFactory ef=(QElementFactory)parent;
	ef.isIdRef=((Boolean)child).booleanValue();
    }
}
