Example #1
0
        public DXFEntity CreateEntity(string _name_prefix = "")
        {
            DXFEntity E;

            switch (this.FValue)
            {
            case DXFUtils.SECTION_END:
            case DXFUtils.SEQUENCE_END:
                this.PositionToOutputWindow("Decoder NULL");
                return(null);

            case DXFUtils.SECTION_START:
                E = new DXFSection();
                this.PositionToOutputWindow("Decoder DXFSection");
                break;

            case DXFUtils.ENTITY_SEQUENCE:
                E = new DXFHierarchicalContainer("of " + _name_prefix);     // helper for ENTITIES containing hierarchical structures (e.g. Layer)
                this.PositionToOutputWindow("Decoder DXFHierarchicalContainer");
                break;

            case DXFUtils.ENTITY_CONTINUE:
                E = new DXFContinue();     // helper for ENTITIES containing hierarchical structures (e.g. Layer)
                this.PositionToOutputWindow("Decoder DXFContinue");
                break;

            case DXFUtils.GV_LAYER:
                E = new DXFLayer();
                this.PositionToOutputWindow("Decoder DXFLayer");
                break;

            case DXFUtils.GV_ZONEDPOLY:
                E = new DXFZonedPolygon();
                this.PositionToOutputWindow("Decoder DXFZonedPolygon");
                break;

            case DXFUtils.GV_ZONEDPOLY_OPENING:
                E = new DXFZoneOpening();
                this.PositionToOutputWindow("Decoder DXFZoneOpening");
                break;

            case DXFUtils.GV_ZONEDLEVEL:
                E = new DXFZonedPolygonGroup();
                this.PositionToOutputWindow("Decoder DXFZonedPolygonGroup");
                break;

            case DXFUtils.GV_ZONEDVOL:
                E = new DXFZonedVolume();
                this.PositionToOutputWindow("Decoder DXFZonedVolume");
                break;

            case DXFUtils.GV_MATERIAL:
                E = new DXFMaterial();
                this.PositionToOutputWindow("Decoder DXFMaterial");
                break;

            default:
                E = new DXFDummy(this.FValue);
                this.PositionToOutputWindow("Decoder DXFDummy");
                break;
            }
            E.Decoder = this;
            return(E);
        }
        public DXFEntity CreateEntity()
        {
            DXFEntity E;

            switch (this.FValue)
            {
            case ParamStructTypes.SECTION_END:
            case ParamStructTypes.SEQUENCE_END:
                return(null);

            case ParamStructTypes.SECTION_START:
                E = new DXFSection();
                break;

            case ParamStructTypes.ENTITY_SEQUENCE:
                E = new DXFComponentSubContainer();     // helper for COMPONENT, FLOWNETWORK
                break;

            case ParamStructTypes.ENTITY_CONTINUE:
                E = new DXFContinue();     // helper for COMPONENT, FLOWNETWORK
                break;

            case ParamStructTypes.COMPONENT:
                E = new DXFComponent();
                break;

            case ParamStructTypes.ACCESS_PROFILE:
                E = new DXFAccessProfile();
                break;

            case ParamStructTypes.ACCESS_TRACKER:
                E = new DXFAccessTracker();
                break;

            case ParamStructTypes.CALCULATION:
                E = new DXFCalculation();
                break;

            case ParamStructTypes.PARAMETER:
                E = new DXFParameter();
                break;

            case ParamStructTypes.VALUE_FIELD:
                E = new DXFMultiValueField();
                break;

            case ParamStructTypes.FUNCTION_FIELD:
                E = new DXFMultiValueFunction();
                break;

            case ParamStructTypes.BIG_TABLE:
                E = new DXFMultiValueBigTable();
                break;

            case ParamStructTypes.FLOWNETWORK:
                E = new DXF_FLowNetwork();
                break;

            case ParamStructTypes.FLOWNETWORK_NODE:
                E = new DXF_FlNetNode();
                break;

            case ParamStructTypes.FLOWNETWORK_EDGE:
                E = new DXF_FlNetEdge();
                break;

            case ParamStructTypes.GEOM_RELATION:
                E = new DXFGeometricRelationship();
                break;

            case ParamStructTypes.MAPPING_TO_COMP:
                E = new DXFMapping2Component();
                break;

            default:
                E = new DXFDummy(this.FValue);
                break;
            }
            E.Decoder = this;
            return(E);
        }