Package skadistats.clarity.model

Examples of skadistats.clarity.model.DTClass


        HandlerHelper.traceMessage(log, peekTick, message);
       
        // last packet of the prologue: compile receive tables!

        for (Iterator<DTClass> i = match.getDtClasses().iterator(); i.hasNext();) {
            DTClass dtc = i.next();
            if (!dtc.getSendTable().isDecoderNeeded()) {
                continue;
            }
            List<ReceiveProp> rps = new SendTableFlattener(match.getDtClasses(), dtc.getSendTable()).flatten();
            dtc.setReceiveProps(rps);
        }

        // last packet of the prologue: set super classes
       
        for (Iterator<DTClass> i = match.getDtClasses().iterator(); i.hasNext();) {
            DTClass dtc = i.next();
            String superClassName = dtc.getSendTable().getBaseClass();
            if (superClassName != null) {
                dtc.setSuperClass(match.getDtClasses().forDtName(superClassName));
            }
        }
       
    }
View Full Code Here


                    sp.getNumBits()
                )
            );
        }
       
        match.getDtClasses().add(new DTClass(message.getNetTableName(), st));
    }
View Full Code Here

    }

    private int decodeDiff(int index, EntityCollection entities) {
        index = stream.readEntityIndex(index);
        PVS pvs = stream.readEntityPVS();
        DTClass cls = null;
        Integer serial = null;
        Object[] state = null;
        List<Integer> propList = null;
        Entity entity = null;
        switch (pvs) {
        case ENTER:
            cls = dtClasses.forClassId(stream.readNumericBits(classBits));
            serial = stream.readNumericBits(10);
            propList = stream.readEntityPropList();
            state = decodeBaseProperties(cls);
            decodeProperties(state, cls, propList);
            entities.add(index, serial, cls, pvs, state);
            log.debug("          {} [index={}, serial={}, handle={}, type={}]",
                pvs,
                index,
                serial,
                Handle.forIndexAndSerial(index, serial),
                cls.getDtName()
            );
            break;
        case PRESERVE:
            entity = entities.getByIndex(index);
            entity.setPvs(pvs);
View Full Code Here

    public void add(DTClass dtClass) {
        byDtName.put(dtClass.getDtName(), dtClass);
    }

    public void setClassIdForDtName(String dtName, int classId) {
        DTClass dt = forDtName(dtName);
        dt.setClassId(classId);
        byClassId.put(classId, dt);
    }
View Full Code Here

        this.numEntries = numEntries;
        this.classBits = Util.calcBitsNeededFor(dtClasses.size() - 1);
    }

    public void decodeAndApply(TempEntityCollection world) {
        DTClass cls = null;
        int count = 0;
        while (count < numEntries) {
            stream.readBit(); // seems to be always 0
            if (stream.readBit()) {
                cls = dtClasses.forClassId(stream.readNumericBits(classBits) - 1);
            }
            Object[] state = null;
            List<Integer> propList = null;
            propList = stream.readEntityPropList();
            state = new Object[cls.getReceiveProps().size()];
            decodeProperties(state, cls, propList);
            world.add(cls, state);
            log.debug("          {} [state={}]",
                cls.getDtName(),
                state
            );
            count++;
        }
    }
View Full Code Here

TOP

Related Classes of skadistats.clarity.model.DTClass

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.