Decode() public static method

public static Decode ( string str ) : string
str string
return string
Ejemplo n.º 1
0
 internal override void parse(string str, ref int pos, ReleaseVersion release, int len, ConcurrentDictionary <int, BaseClassIfc> dictionary)
 {
     mName        = ParserIfc.Decode(ParserSTEP.StripString(str, ref pos, len));
     mDescription = ParserIfc.Decode(ParserSTEP.StripString(str, ref pos, len));
     mRelatingDraughtingCallout = ParserSTEP.StripLink(str, ref pos, len);
     mRelatedDraughtingCallout  = ParserSTEP.StripLink(str, ref pos, len);
 }
Ejemplo n.º 2
0
 internal override void parse(string str, ref int pos, ReleaseVersion release, int len, ConcurrentDictionary <int, BaseClassIfc> dictionary)
 {
     base.parse(str, ref pos, release, len, dictionary);
     RelatingMaterial = dictionary[ParserSTEP.StripLink(str, ref pos, len)] as IfcMaterial;
     RelatedMaterials.AddRange(ParserSTEP.StripListLink(str, ref pos, len).Select(x => Database[x] as IfcMaterial));
     mMaterialExpression = ParserIfc.Decode(ParserSTEP.StripString(str, ref pos, len));
 }
Ejemplo n.º 3
0
 internal override void parse(string str, ref int pos, ReleaseVersion release, int len, ConcurrentDictionary <int, BaseClassIfc> dictionary)
 {
     mName             = ParserIfc.Decode(ParserSTEP.StripString(str, ref pos, len));
     mLightColour      = ParserSTEP.StripLink(str, ref pos, len);
     mAmbientIntensity = ParserSTEP.StripDouble(str, ref pos, len);
     mIntensity        = ParserSTEP.StripDouble(str, ref pos, len);
 }
Ejemplo n.º 4
0
 internal override void parse(string str, ref int pos, ReleaseVersion release, int len, ConcurrentDictionary <int, BaseClassIfc> dictionary)
 {
     base.parse(str, ref pos, release, len, dictionary);
     mParentProfile = dictionary[ParserSTEP.StripLink(str, ref pos, len)] as IfcProfileDef;
     mOperator      = dictionary[ParserSTEP.StripLink(str, ref pos, len)] as IfcCartesianTransformationOperator2D;
     mLabel         = ParserIfc.Decode(ParserSTEP.StripString(str, ref pos, len));
 }
Ejemplo n.º 5
0
 internal override void parse(string str, ref int pos, ReleaseVersion release, int len, ConcurrentDictionary <int, BaseClassIfc> dictionary)
 {
     base.parse(str, ref pos, release, len, dictionary);
     mImpactType = ParserSTEP.StripString(str, ref pos, len);
     Enum.TryParse <IfcEnvironmentalImpactCategoryEnum>(ParserSTEP.StripField(str, ref pos, len).Replace(".", ""), true, out mEnvCategory);
     mUserDefinedCategory = ParserIfc.Decode(ParserSTEP.StripString(str, ref pos, len));
 }
Ejemplo n.º 6
0
 internal override void parse(string str, ref int pos, ReleaseVersion release, int len, ConcurrentDictionary <int, BaseClassIfc> dictionary)
 {
     base.parse(str, ref pos, release, len, dictionary);
     Enum.TryParse <IfcEventTypeEnum>(ParserSTEP.StripField(str, ref pos, len).Replace(".", ""), true, out mPredefinedType);
     Enum.TryParse <IfcEventTriggerTypeEnum>(ParserSTEP.StripField(str, ref pos, len).Replace(".", ""), true, out mEventTriggerType);
     mUserDefinedEventTriggerType = ParserIfc.Decode(ParserSTEP.StripString(str, ref pos, len));
 }
Ejemplo n.º 7
0
 internal override void parse(string str, ref int pos, ReleaseVersion release, int len, ConcurrentDictionary <int, BaseClassIfc> dictionary)
 {
     mName        = ParserIfc.Decode(ParserSTEP.StripString(str, ref pos, len));
     mDescription = ParserIfc.Decode(ParserSTEP.StripString(str, ref pos, len));
     MaterialProfiles.AddRange(ParserSTEP.StripListLink(str, ref pos, len).ConvertAll(x => dictionary[x] as IfcMaterialProfile));
     CompositeProfile = dictionary[ParserSTEP.StripLink(str, ref pos, len)] as IfcCompositeProfileDef;
 }
Ejemplo n.º 8
0
        internal override void parse(string str, ref int pos, ReleaseVersion release, int len, ConcurrentDictionary <int, BaseClassIfc> dictionary)
        {
            base.parse(str, ref pos, release, len, dictionary);
            string s = ParserSTEP.StripField(str, ref pos, len);

            if (release < ReleaseVersion.IFC4X3)
            {
                if (!double.TryParse(s, System.Globalization.NumberStyles.Any, ParserSTEP.NumberFormat, out mCountValueDouble))
                {
                    if (s.StartsWith("IFCCOUNTMEASURE"))
                    {
                        s = s.Substring(16, s.Length - 17);
                        double.TryParse(s, System.Globalization.NumberStyles.Any, ParserSTEP.NumberFormat, out mCountValueDouble);
                    }
                }
            }
            else
            {
                if (!int.TryParse(s, System.Globalization.NumberStyles.Any, ParserSTEP.NumberFormat, out mCountValue))
                {
                    if (s.StartsWith("IFCCOUNTMEASURE"))
                    {
                        s = s.Substring(16, s.Length - 17);
                        int.TryParse(s, System.Globalization.NumberStyles.Any, ParserSTEP.NumberFormat, out mCountValue);
                    }
                }
            }
            if (release > ReleaseVersion.IFC2x3)
            {
                mFormula = ParserIfc.Decode(ParserSTEP.StripString(str, ref pos, len));
            }
        }
Ejemplo n.º 9
0
 internal override void parse(string str, ref int pos, ReleaseVersion release, int len, ConcurrentDictionary <int, BaseClassIfc> dictionary)
 {
     mName        = ParserIfc.Decode(ParserSTEP.StripString(str, ref pos, len));
     mDescription = ParserIfc.Decode(ParserSTEP.StripString(str, ref pos, len));
     mMaterial    = dictionary[ParserSTEP.StripLink(str, ref pos, len)] as IfcMaterial;
     mFraction    = ParserSTEP.StripDouble(str, ref pos, len);
     mCategory    = ParserIfc.Decode(ParserSTEP.StripString(str, ref pos, len));
 }
Ejemplo n.º 10
0
 internal override void parse(string str, ref int pos, ReleaseVersion release, int len, ConcurrentDictionary <int, BaseClassIfc> dictionary)
 {
     base.parse(str, ref pos, release, len, dictionary);
     ParentContext = dictionary[ParserSTEP.StripLink(str, ref pos, len)] as IfcGeometricRepresentationContext;
     mTargetScale  = ParserSTEP.StripDouble(str, ref pos, len);
     Enum.TryParse <IfcGeometricProjectionEnum>(ParserSTEP.StripField(str, ref pos, len).Replace(".", ""), true, out mTargetView);
     mUserDefinedTargetView = ParserIfc.Decode(ParserSTEP.StripString(str, ref pos, len));
 }
Ejemplo n.º 11
0
 internal override void parse(string str, ref int pos, ReleaseVersion release, int len, ConcurrentDictionary <int, BaseClassIfc> dictionary)
 {
     mIdentification = ParserIfc.Decode(ParserSTEP.StripString(str, ref pos, len));
     mName           = ParserIfc.Decode(ParserSTEP.StripString(str, ref pos, len));
     mDescription    = ParserIfc.Decode(ParserSTEP.StripString(str, ref pos, len));
     Roles.AddRange(ParserSTEP.StripListLink(str, ref pos, len).ConvertAll(x => dictionary[x] as IfcActorRole));
     mAddresses.AddRange(ParserSTEP.StripListLink(str, ref pos, len).ConvertAll(x => dictionary[x] as IfcAddress));
 }
Ejemplo n.º 12
0
 internal override void parse(string str, ref int pos, ReleaseVersion release, int len, ConcurrentDictionary <int, BaseClassIfc> dictionary)
 {
     base.parse(str, ref pos, release, len, dictionary);
     Enum.TryParse <IfcWindowTypeEnum>(ParserSTEP.StripField(str, ref pos, len).Replace(".", ""), true, out mPredefinedType);
     Enum.TryParse <IfcWindowTypePartitioningEnum>(ParserSTEP.StripField(str, ref pos, len).Replace(".", ""), true, out mPartitioningType);
     mParameterTakesPrecedence    = ParserSTEP.StripBool(str, ref pos, len);
     mUserDefinedPartitioningType = ParserIfc.Decode(ParserSTEP.StripString(str, ref pos, len));
 }
Ejemplo n.º 13
0
 internal override void parse(string str, ref int pos, ReleaseVersion release, int len, ConcurrentDictionary <int, BaseClassIfc> dictionary)
 {
     base.parse(str, ref pos, release, len, dictionary);
     if (release < ReleaseVersion.IFC4)
     {
         mControlElementId = ParserIfc.Decode(ParserSTEP.StripString(str, ref pos, len));
     }
 }
Ejemplo n.º 14
0
 internal override void parse(string str, ref int pos, ReleaseVersion release, int len, ConcurrentDictionary <int, BaseClassIfc> dictionary)
 {
     base.parse(str, ref pos, release, len, dictionary);
     mMethodOfMeasurement = ParserIfc.Decode(ParserSTEP.StripString(str, ref pos, len));
     foreach (IfcPhysicalQuantity quantity in ParserSTEP.StripListLink(str, ref pos, len).Select(x => dictionary[x] as IfcPhysicalQuantity))
     {
         addQuantity(quantity);
     }
 }
Ejemplo n.º 15
0
 internal override void parse(string str, ref int pos, ReleaseVersion release, int len, ConcurrentDictionary <int, BaseClassIfc> dictionary)
 {
     MaterialLayers.AddRange(ParserSTEP.StripListLink(str, ref pos, len).Select(x => dictionary[x] as IfcMaterialLayer));
     mLayerSetName = ParserIfc.Decode(ParserSTEP.StripString(str, ref pos, len));
     if (release != ReleaseVersion.IFC2x3)
     {
         mDescription = ParserIfc.Decode(ParserSTEP.StripString(str, ref pos, len));
     }
 }
Ejemplo n.º 16
0
 internal override void parse(string str, ref int pos, ReleaseVersion release, int len, ConcurrentDictionary <int, BaseClassIfc> dictionary)
 {
     base.parse(str, ref pos, release, len, dictionary);
     if (release != ReleaseVersion.IFC2x3)
     {
         mDescription        = ParserIfc.Decode(ParserSTEP.StripString(str, ref pos, len));
         mReferencedDocument = dictionary[ParserSTEP.StripLink(str, ref pos, len)] as IfcDocumentInformation;
     }
 }
Ejemplo n.º 17
0
 internal override void parse(string str, ref int pos, ReleaseVersion release, int len, ConcurrentDictionary <int, BaseClassIfc> dictionary)
 {
     base.parse(str, ref pos, release, len, dictionary);
     double.TryParse(ParserSTEP.StripField(str, ref pos, len), System.Globalization.NumberStyles.Any, ParserSTEP.NumberFormat, out mTimeValue);
     if (release > ReleaseVersion.IFC2x3)
     {
         mFormula = ParserIfc.Decode(ParserSTEP.StripString(str, ref pos, len));
     }
 }
Ejemplo n.º 18
0
 internal override void parse(string str, ref int pos, ReleaseVersion release, int len, ConcurrentDictionary <int, BaseClassIfc> dictionary)
 {
     mName        = ParserIfc.Decode(ParserSTEP.StripString(str, ref pos, len));
     mDescription = ParserIfc.Decode(ParserSTEP.StripString(str, ref pos, len));
     foreach (IfcMaterialConstituent constituent in ParserSTEP.StripListLink(str, ref pos, len).Select(x => dictionary[x] as IfcMaterialConstituent))
     {
         mMaterialConstituents[constituent.Name] = constituent;
     }
 }
Ejemplo n.º 19
0
 internal override void parse(string str, ref int pos, ReleaseVersion release, int len, ConcurrentDictionary <int, BaseClassIfc> dictionary)
 {
     Elements.AddRange(ParserSTEP.StripListLink(str, ref pos, len).Select(x => dictionary[x] as IfcDerivedUnitElement));
     Enum.TryParse <IfcDerivedUnitEnum>(ParserSTEP.StripField(str, ref pos, len).Replace(".", ""), true, out mUnitType);
     mUserDefinedType = ParserSTEP.StripString(str, ref pos, len);
     if (release >= ReleaseVersion.IFC4X3)
     {
         mName = ParserIfc.Decode(ParserSTEP.StripString(str, ref pos, len));
     }
 }
Ejemplo n.º 20
0
 internal override void parse(string str, ref int pos, ReleaseVersion release, int len, ConcurrentDictionary <int, BaseClassIfc> dictionary)
 {
     base.parse(str, ref pos, release, len, dictionary);
     mCompressiveStrength   = ParserSTEP.StripDouble(str, ref pos, len);
     mMaxAggregateSize      = ParserSTEP.StripDouble(str, ref pos, len);
     mAdmixturesDescription = ParserIfc.Decode(ParserSTEP.StripString(str, ref pos, len));
     mWorkability           = ParserIfc.Decode(ParserSTEP.StripString(str, ref pos, len));
     mProtectivePoreRatio   = ParserSTEP.StripDouble(str, ref pos, len);
     mWaterImpermeability   = ParserIfc.Decode(ParserSTEP.StripString(str, ref pos, len));
 }
Ejemplo n.º 21
0
        internal override void parse(string str, ref int pos, ReleaseVersion release, int len, ConcurrentDictionary <int, BaseClassIfc> dictionary)
        {
            base.parse(str, ref pos, release, len, dictionary);
            mLongName = ParserIfc.Decode(ParserSTEP.StripString(str, ref pos, len));
            string s = ParserSTEP.StripField(str, ref pos, len);

            if (s.StartsWith("."))
            {
                Enum.TryParse <IfcDistributionSystemEnum>(s.Replace(".", ""), true, out mPredefinedType);
            }
        }
Ejemplo n.º 22
0
        internal override void parse(string str, ref int pos, ReleaseVersion release, int len, ConcurrentDictionary <int, BaseClassIfc> dictionary)
        {
            base.parse(str, ref pos, release, len, dictionary);
            mBenchmarkValues.AddRange(ParserSTEP.StripListLink(str, ref pos, len).Select(x => dictionary[x] as IfcConstraint));
            string s = ParserSTEP.StripField(str, ref pos, len);

            if (s[0] == '.')
            {
                Enum.TryParse <IfcLogicalOperatorEnum>(s.Replace(".", ""), true, out mLogicalAggregator);
            }
            Enum.TryParse <IfcObjectiveEnum>(ParserSTEP.StripField(str, ref pos, len).Replace(".", ""), true, out mObjectiveQualifier);
            mUserDefinedQualifier = ParserIfc.Decode(ParserSTEP.StripString(str, ref pos, len));
        }
Ejemplo n.º 23
0
 internal override void parse(string str, ref int pos, ReleaseVersion release, int len, ConcurrentDictionary <int, BaseClassIfc> dictionary)
 {
     mName = ParserIfc.Decode(ParserSTEP.StripString(str, ref pos, len));
     if (release != ReleaseVersion.IFC2x3)
     {
         try
         {
             mDescription = ParserIfc.Decode(ParserSTEP.StripString(str, ref pos, len));
             mCategory    = ParserIfc.Decode(ParserSTEP.StripString(str, ref pos, len));
         }
         catch (Exception) { }
     }
 }
Ejemplo n.º 24
0
 internal override void parse(string str, ref int pos, ReleaseVersion release, int len, ConcurrentDictionary <int, BaseClassIfc> dictionary)
 {
     base.parse(str, ref pos, release, len, dictionary);
     foreach (int i in ParserSTEP.StripListLink(str, ref pos, len))
     {
         IfcProperty property = dictionary[i] as IfcProperty;
         if (property != null)
         {
             mProperties[property.Name] = property;
         }
     }
     mDescription = ParserIfc.Decode(ParserSTEP.StripString(str, ref pos, len));
     mName        = ParserIfc.Decode(ParserSTEP.StripString(str, ref pos, len));
 }
Ejemplo n.º 25
0
        internal override void parse(string str, ref int pos, ReleaseVersion release, int len, ConcurrentDictionary <int, BaseClassIfc> dictionary)
        {
            mName        = ParserIfc.Decode(ParserSTEP.StripString(str, ref pos, len));
            mDescription = ParserIfc.Decode(ParserSTEP.StripString(str, ref pos, len));
            Material     = dictionary[ParserSTEP.StripLink(str, ref pos, len)] as IfcMaterial;
            Profile      = dictionary[ParserSTEP.StripLink(str, ref pos, len)] as IfcProfileDef;
            string s = ParserSTEP.StripField(str, ref pos, len);
            double d = 0;

            if (double.TryParse(s, System.Globalization.NumberStyles.Any, ParserSTEP.NumberFormat, out d))            //Was normalizedRatioMeasure
            {
                Priority = (int)d;
            }
            mCategory = ParserIfc.Decode(ParserSTEP.StripString(str, ref pos, len));
        }
Ejemplo n.º 26
0
        internal override void parse(string str, ref int pos, ReleaseVersion release, int len, ConcurrentDictionary <int, BaseClassIfc> dictionary)
        {
            base.parse(str, ref pos, release, len, dictionary);
            Enum.TryParse <IfcBenchmarkEnum>(ParserSTEP.StripField(str, ref pos, len).Replace(".", ""), true, out mBenchMark);
            mValueSource = ParserIfc.Decode(ParserSTEP.StripString(str, ref pos, len));
            string s = ParserSTEP.StripField(str, ref pos, len);

            if (s[0] == '#')
            {
                mDataValue = dictionary[ParserSTEP.ParseLink(s)] as IfcMetricValueSelect;
            }
            else
            {
                mDataValue = ParserIfc.parseValue(s) as IfcMetricValueSelect;
            }
            mReferencePath = dictionary[ParserSTEP.StripLink(str, ref pos, len)] as IfcReference;
        }
Ejemplo n.º 27
0
 internal override void parse(string str, ref int pos, ReleaseVersion release, int len, ConcurrentDictionary <int, BaseClassIfc> dictionary)
 {
     mMaterial       = dictionary[ParserSTEP.StripLink(str, ref pos, len)] as IfcMaterial;
     mLayerThickness = ParserSTEP.StripDouble(str, ref pos, len);
     mIsVentilated   = ParserIfc.StripLogical(str, ref pos, len);
     try
     {
         if (release != ReleaseVersion.IFC2x3)
         {
             mName        = ParserIfc.Decode(ParserSTEP.StripString(str, ref pos, len));
             mDescription = ParserIfc.Decode(ParserSTEP.StripString(str, ref pos, len));
             mCategory    = ParserIfc.Decode(ParserSTEP.StripString(str, ref pos, len));
             mPriority    = ParserSTEP.StripDouble(str, ref pos, len);
         }
     }
     catch (Exception) { }
 }
Ejemplo n.º 28
0
 internal override void parse(string str, ref int pos, ReleaseVersion release, int len, ConcurrentDictionary <int, BaseClassIfc> dictionary)
 {
     mName      = ParserIfc.Decode(ParserSTEP.StripString(str, ref pos, len));
     mVersion   = ParserIfc.Decode(ParserSTEP.StripString(str, ref pos, len));
     mPublisher = dictionary[ParserSTEP.StripLink(str, ref pos, len)] as IfcActorSelect;
     if (release < ReleaseVersion.IFC4)
     {
         mVersionDateSS = dictionary[ParserSTEP.StripLink(str, ref pos, len)] as IfcCalendarDate;
         mLibraryReference.AddRange(ParserSTEP.StripListLink(str, ref pos, len).Select(x => dictionary[x] as IfcLibraryReference));
     }
     else
     {
         mVersionDate = IfcDateTime.ParseSTEP(ParserSTEP.StripField(str, ref pos, len));
         mLocation    = ParserIfc.Decode(ParserSTEP.StripString(str, ref pos, len));
         mDescription = ParserIfc.Decode(ParserSTEP.StripString(str, ref pos, len));
     }
 }
Ejemplo n.º 29
0
        internal override void parse(string str, ref int pos, ReleaseVersion release, int len, ConcurrentDictionary <int, BaseClassIfc> dictionary)
        {
            base.parse(str, ref pos, release, len, dictionary);
            string s = ParserSTEP.StripField(str, ref pos, len);

            if (!double.TryParse(s, System.Globalization.NumberStyles.Any, ParserSTEP.NumberFormat, out mWeightValue))
            {
                IfcMeasureValue mv = ParserIfc.parseMeasureValue(s);
                if (mv != null)
                {
                    mWeightValue = mv.Measure;
                }
            }
            if (release > ReleaseVersion.IFC2x3)
            {
                mFormula = ParserIfc.Decode(ParserSTEP.StripString(str, ref pos, len));
            }
        }
Ejemplo n.º 30
0
        internal override void parse(string str, ref int pos, ReleaseVersion release, int len, ConcurrentDictionary <int, BaseClassIfc> dictionary)
        {
            mIdentification = ParserIfc.Decode(ParserSTEP.StripString(str, ref pos, len));
            mName           = ParserIfc.Decode(ParserSTEP.StripString(str, ref pos, len));
            mDescription    = ParserIfc.Decode(ParserSTEP.StripString(str, ref pos, len));
            if (release < ReleaseVersion.IFC4)
            {
                mDocumentReferences = ParserSTEP.StripListLink(str, ref pos, len);
            }
            else
            {
                mLocation = ParserIfc.Decode(ParserSTEP.StripString(str, ref pos, len));
            }
            mPurpose          = ParserSTEP.StripString(str, ref pos, len);
            mIntendedUse      = ParserSTEP.StripString(str, ref pos, len);
            mScope            = ParserSTEP.StripString(str, ref pos, len);
            mRevision         = ParserSTEP.StripString(str, ref pos, len);
            mDocumentOwner    = ParserSTEP.StripLink(str, ref pos, len);
            mEditors          = ParserSTEP.StripListLink(str, ref pos, len);
            mCreationTime     = IfcDateTime.ParseSTEP(ParserSTEP.StripField(str, ref pos, len));
            mLastRevisionTime = IfcDateTime.ParseSTEP(ParserSTEP.StripField(str, ref pos, len));
            if (release < ReleaseVersion.IFC4)
            {
                mSSElectronicFormat = ParserSTEP.StripLink(str, ref pos, len);
            }
            else
            {
                mElectronicFormat = ParserSTEP.StripString(str, ref pos, len);
            }
            mValidFrom  = IfcDate.ParseSTEP(ParserSTEP.StripField(str, ref pos, len));
            mValidUntil = IfcDate.ParseSTEP(ParserSTEP.StripField(str, ref pos, len));
            string s = ParserSTEP.StripField(str, ref pos, len);

            if (s[0] == '.')
            {
                Enum.TryParse <IfcDocumentConfidentialityEnum>(s.Replace(".", ""), true, out mConfidentiality);
            }
            s = ParserSTEP.StripField(str, ref pos, len);
            if (s[0] == '.')
            {
                Enum.TryParse <IfcDocumentStatusEnum>(s.Replace(".", ""), true, out mStatus);
            }
        }