/**Inserta un atribuoto, el entidad especificada*/
        public void insAtributo(CNodoAtributo nuevo, CNodoEntidad ent)
        {
            CNodoAtributo aux, ant = null;

            aux = ent.getCabListAtri();

            while (aux != null)
            {
                ant = aux;
                aux = aux.getSigAtri();
            }

            if (aux == ent.getCabListAtri())
                ent.setCabListAtri(nuevo);
            else
                ant.setSigAtri(nuevo);

            nuevo.setSigAtri(aux);
       }
Beispiel #2
0
        /**Obtiene la información de un bloqque*/
        public void DameCE(CNodoEntidad e, ref int despCE, ref int tipoCE, ref int tamCE, ref int tamB,
                            ref int despCB, ref int tipoCB, ref int tamCB, CNodoEntidad eS)
        {
            CNodoAtributo aux;
            despCE = 0;
            despCB = 0;
            tamB = 0;
            bool band = true;
            bool band2 = true;

            aux = e.getCabListAtri();
            while (aux != null)
            {
                if (band == true)
                    if (aux.getEntRel() == null)
                        despCE += aux.getTamaño();
                    else
                    {
                        if (aux.getEntRel() == eS)
                        {
                            tipoCE = aux.getTipo();
                            tamCE = aux.getTamaño();
                            band = false;
                        }
                    }

                if (band2 == true)
                    if (aux.getClave() == 0)
                        despCB += aux.getTamaño();
                    else
                    {
                        tipoCB = aux.getTipo();
                        tamCB = aux.getTamaño();
                        band2 = false;
                    }

                tamB += aux.getTamaño();
                aux = aux.getSigAtri();
            }

            if (tamB != 0)
                tamB += 8;
        }