Esempio n. 1
0
 public void SetSubType(FieldSubType type)
 {
     OgrPINVOKE.FieldDefn_SetSubType(swigCPtr, (int)type);
     if (OgrPINVOKE.SWIGPendingException.Pending)
     {
         throw OgrPINVOKE.SWIGPendingException.Retrieve();
     }
 }
Esempio n. 2
0
 internal static string GetExportName(string fieldName, out FieldSubType subType)
 {
     if (fieldName[0] == '#')
     {
         subType = FieldSubType.ContentList;
         return(fieldName.Substring(1));
     }
     subType = FieldSubType.General;
     return(fieldName);
 }
Esempio n. 3
0
        public static string GetFieldSubTypeName(FieldSubType type)
        {
            string ret = OgrPINVOKE.GetFieldSubTypeName((int)type);

            if (OgrPINVOKE.SWIGPendingException.Pending)
            {
                throw OgrPINVOKE.SWIGPendingException.Retrieve();
            }
            return(ret);
        }
Esempio n. 4
0
        public FieldSubType GetSubType()
        {
            FieldSubType ret = (FieldSubType)OgrPINVOKE.FieldDefn_GetSubType(swigCPtr);

            if (OgrPINVOKE.SWIGPendingException.Pending)
            {
                throw OgrPINVOKE.SWIGPendingException.Retrieve();
            }
            return(ret);
        }
Esempio n. 5
0
        internal static string ParseImportName(string importName, FieldSubType subType)
        {
            switch (subType)
            {
            case FieldSubType.General:
                return(importName);

            case FieldSubType.ContentList:
                return(importName.Insert(0, "#"));

            default:
                throw new SnNotSupportedException("FieldSubType '" + subType + "' is not supported.");
            }
        }
Esempio n. 6
0
 public void SetSubType(FieldSubType type)
 {
     OgrPINVOKE.FieldDefn_SetSubType(swigCPtr, (int)type);
     if (OgrPINVOKE.SWIGPendingException.Pending) throw OgrPINVOKE.SWIGPendingException.Retrieve();
 }
Esempio n. 7
0
        public static FieldDomain CreateGlobFieldDomain(string name, string description, FieldType type, FieldSubType subtype, string glob)
        {
            IntPtr      cPtr = OgrPINVOKE.CreateGlobFieldDomain(name, description, (int)type, (int)subtype, glob);
            FieldDomain ret  = (cPtr == IntPtr.Zero) ? null : new FieldDomain(cPtr, true, ThisOwn_true());

            if (OgrPINVOKE.SWIGPendingException.Pending)
            {
                throw OgrPINVOKE.SWIGPendingException.Retrieve();
            }
            return(ret);
        }
Esempio n. 8
0
        public static FieldDomain CreateRangeFieldDomain(string name, string description, FieldType type, FieldSubType subtype, double min, bool minIsInclusive, double max, double maxIsInclusive)
        {
            IntPtr      cPtr = OgrPINVOKE.CreateRangeFieldDomain(name, description, (int)type, (int)subtype, min, minIsInclusive, max, maxIsInclusive);
            FieldDomain ret  = (cPtr == IntPtr.Zero) ? null : new FieldDomain(cPtr, true, ThisOwn_true());

            if (OgrPINVOKE.SWIGPendingException.Pending)
            {
                throw OgrPINVOKE.SWIGPendingException.Retrieve();
            }
            return(ret);
        }
Esempio n. 9
0
 public static string GetFieldSubTypeName(FieldSubType type)
 {
     string ret = OgrPINVOKE.GetFieldSubTypeName((int)type);
     if (OgrPINVOKE.SWIGPendingException.Pending) throw OgrPINVOKE.SWIGPendingException.Retrieve();
     return ret;
 }
Esempio n. 10
0
		internal static string ParseImportName(string importName, FieldSubType subType)
		{
			switch (subType)
			{
				case FieldSubType.General:
					return importName;
				case FieldSubType.ContentList:
					return importName.Insert(0, "#");
				default:
					throw new NotImplementedException("FieldSubType '" + subType +"' is not implemented");
			}
		}
Esempio n. 11
0
		internal static string GetExportName(string fieldName, out FieldSubType subType)
		{
			if (fieldName[0] == '#')
			{
				subType = FieldSubType.ContentList;
				return fieldName.Substring(1);
			}
			subType = FieldSubType.General;
			return fieldName;
		}