Пример #1
0
 public void SetSubType(FieldSubType type)
 {
     OgrPINVOKE.FieldDefn_SetSubType(swigCPtr, (int)type);
     if (OgrPINVOKE.SWIGPendingException.Pending)
     {
         throw OgrPINVOKE.SWIGPendingException.Retrieve();
     }
 }
Пример #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);
 }
Пример #3
0
        public static string GetFieldSubTypeName(FieldSubType type)
        {
            string ret = OgrPINVOKE.GetFieldSubTypeName((int)type);

            if (OgrPINVOKE.SWIGPendingException.Pending)
            {
                throw OgrPINVOKE.SWIGPendingException.Retrieve();
            }
            return(ret);
        }
Пример #4
0
        public FieldSubType GetSubType()
        {
            FieldSubType ret = (FieldSubType)OgrPINVOKE.FieldDefn_GetSubType(swigCPtr);

            if (OgrPINVOKE.SWIGPendingException.Pending)
            {
                throw OgrPINVOKE.SWIGPendingException.Retrieve();
            }
            return(ret);
        }
Пример #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.");
            }
        }
Пример #6
0
 public void SetSubType(FieldSubType type)
 {
     OgrPINVOKE.FieldDefn_SetSubType(swigCPtr, (int)type);
     if (OgrPINVOKE.SWIGPendingException.Pending) throw OgrPINVOKE.SWIGPendingException.Retrieve();
 }
Пример #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);
        }
Пример #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);
        }
Пример #9
0
 public static string GetFieldSubTypeName(FieldSubType type)
 {
     string ret = OgrPINVOKE.GetFieldSubTypeName((int)type);
     if (OgrPINVOKE.SWIGPendingException.Pending) throw OgrPINVOKE.SWIGPendingException.Retrieve();
     return ret;
 }
Пример #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");
			}
		}
Пример #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;
		}