### Eclipse Workspace Patch 1.0 #P skeleton diff --git oo4gl/OpenEdge/Core/HashAlgorithmEnum.cls oo4gl/OpenEdge/Core/HashAlgorithmEnum.cls index a79a2b2..19a8912 100644 --- oo4gl/OpenEdge/Core/HashAlgorithmEnum.cls +++ oo4gl/OpenEdge/Core/HashAlgorithmEnum.cls @@ -1,20 +1,8 @@ -// TODO: this is an enum, fix when FWD supports it -class OpenEdge.Core.HashAlgorithmEnum -inherits Progress.Lang.Enum: - - define public static property MD5 as OpenEdge.Core.HashAlgorithmEnum get. - define public static property SHA-1 as OpenEdge.Core.HashAlgorithmEnum get. - define public static property SHA-256 as OpenEdge.Core.HashAlgorithmEnum get. - define public static property SHA-512 as OpenEdge.Core.HashAlgorithmEnum get. - - /* this is mocked here but in the 4GL it is implicitly added to the child enum class */ - /* and the type is coded to that enum */ - method static public OpenEdge.Core.HashAlgorithmEnum GetEnum(input name as char): - end method. - - /* this is mocked here but in the 4GL it is implicitly added to the child enum class */ - /* and the type is coded to that enum */ - method static public OpenEdge.Core.HashAlgorithmEnum GetEnum(input val as int64): - end method. - -end. +enum OpenEdge.Core.HashAlgorithmEnum: + define enum + MD5 = 0 + SHA-1 + SHA-256 + SHA-512 + . +end enum. \ No newline at end of file diff --git oo4gl/OpenEdge/Core/ServerConnection/FormatMaskEnum.cls oo4gl/OpenEdge/Core/ServerConnection/FormatMaskEnum.cls index f75c520..550cca5 100644 --- oo4gl/OpenEdge/Core/ServerConnection/FormatMaskEnum.cls +++ oo4gl/OpenEdge/Core/ServerConnection/FormatMaskEnum.cls @@ -1,18 +1,11 @@ -// TODO: make this a real enum -class OpenEdge.Core.ServerConnection.FormatMaskEnum: - define public static property Default as integer get. - - define public static property None as integer get. - - define public static property DashSpace as integer get. - - define public static property ABLConnect as integer get. - - define public static property DoubleDashSpace as integer get. - - define public static property DoubleDashEquals as integer get. - - define public static property NameEquals as integer get. - - define public static property Custom as integer get. -end. +enum OpenEdge.Core.ServerConnection.FormatMaskEnum: + define enum + None + DashSpace + DoubleDashEquals + DoubleDashSpace + NameEquals + Custom + ABLConnect = DashSpace + Default = ABLConnect. +end enum. \ No newline at end of file diff --git oo4gl/OpenEdge/Logging/LogLevelEnum.cls oo4gl/OpenEdge/Logging/LogLevelEnum.cls index 8c480cc..cbf7a7a 100644 --- oo4gl/OpenEdge/Logging/LogLevelEnum.cls +++ oo4gl/OpenEdge/Logging/LogLevelEnum.cls @@ -1,4 +1,12 @@ -// TODO: replace with ENUM once FWD supports it -class OpenEdge.Logging.LogLevelEnum: - // TODO: add the enum properties -end. +enum OpenEdge.Logging.LogLevelEnum: + define enum + OFF = 0 + FATAL + ERROR + WARN + INFO + DEBUG + TRACE + DEFAULT = WARN + . +end enum. \ No newline at end of file diff --git oo4gl/OpenEdge/Net/HTTP/StatusCodeEnum.cls oo4gl/OpenEdge/Net/HTTP/StatusCodeEnum.cls index 01d80a4..8fd9166 100644 --- oo4gl/OpenEdge/Net/HTTP/StatusCodeEnum.cls +++ oo4gl/OpenEdge/Net/HTTP/StatusCodeEnum.cls @@ -1,9 +1,86 @@ -// TODO: this is an enum - switch to enum when FWD supports it -class OpenEdge.Net.HTTP.StatusCodeEnum: - // TODO: add enum properties - define public static property OK as integer get. - define public static property BadRequest as integer get. - define public static property Forbidden as integer get. - define public static property NotFound as integer get. - define public static property Unauthorized as integer get. -end. +enum OpenEdge.Net.HTTP.StatusCodeEnum: + define enum /* out-of bounds-handling */ + None = 0 + Unknown = -1 + + /* 1xx: Informational - Request received, continuing process */ + Continue = 100 + SwitchingProtocols = 101 + Processing = 102 + /* 103-199 Unassigned */ + + /* 2xx: Success - The action was successfully received, understood, and accepted */ + OK = 200 + Created = 201 + Accepted = 202 + NonAuthoritativeInformation = 203 + NoContent = 204 + ResetContent = 205 + PartialContent = 206 + Multi-Status = 207 + AlreadyReported = 208 + /* 209-225 Unassigned */ + IMUsed = 226 + + /* 3xx: Redirection - Further action must be taken in order to complete the request */ + MultipleChoices = 300 + MovedPermanently = 301 + Found = 302 + SeeOther = 303 + NotModified = 304 + UseProxy = 305 + /* 306 Unused */ + TemporaryRedirect = 307 + PermanentRedirect = 308 + /* 309-399 Unassigned */ + + /* 4xx: Client Error - The request contains bad syntax or cannot be fulfilled */ + BadRequest = 400 + Unauthorized = 401 + PaymentRequired = 402 + Forbidden = 403 + NotFound = 404 + MethodNotAllowed = 405 + NotAcceptable = 406 + ProxyAuthenticationRequired = 407 + RequestTimeOut = 408 + Conflict = 409 + Gone = 410 + LengthRequired = 411 + PreconditionFailed = 412 + RequestEntityTooLarge = 413 + RequestURITooLarge = 414 + UnsupportedMediaType = 415 + RequestedRangeNotSatisfiable = 416 + ExpectationFailed = 417 + /* 418-420 Unassigned */ + MisdirectedRequest = 421 + UnprocessableEntity = 422 + Locked = 423 + FailedDependency = 424 + /* 425 Unassigned */ + UpgradeRequired = 426 + /*427 Unassigned */ + PreconditionRequired = 428 + TooManyRequests = 429 + /* 430 Unassigned */ + RequestHeaderFieldsTooLarge = 431 + /* 432-499 Unassigned */ + + + /* 5xx: Server Error - The server failed to fulfill an apparently valid request */ + InternalServerError = 500 + NotImplemented = 501 + BadGateway = 502 + ServiceUnavailable = 503 + GatewayTimeout = 504 + HTTPVersionNotSupported = 505 + VariantAlsoNegotiates = 506 + InsufficientStorage = 507 + LoopDetected = 508 + /* 509 Unassigned */ + NotExtended = 510 + NetworkAuthenticationRequired = 511 + /* 512-599 Unassigned */ + . +end enum. diff --git oo4gl/OpenEdge/Net/HTTP/TransferEncodingEnum.cls oo4gl/OpenEdge/Net/HTTP/TransferEncodingEnum.cls index 3831f15..fa85073 100644 --- oo4gl/OpenEdge/Net/HTTP/TransferEncodingEnum.cls +++ oo4gl/OpenEdge/Net/HTTP/TransferEncodingEnum.cls @@ -1,6 +1,10 @@ enum OpenEdge.Net.HTTP.TransferEncodingEnum: - - // Add enumerations as referenced - def enum. - + define enum None = 0 + Chunked + Identity + Gzip + X-Gzip = Gzip + Compress + Deflate + . end enum. \ No newline at end of file diff --git oo4gl/OpenEdge/Net/UriEncodingTypeEnum.cls oo4gl/OpenEdge/Net/UriEncodingTypeEnum.cls index 6525f65..db85558 100644 --- oo4gl/OpenEdge/Net/UriEncodingTypeEnum.cls +++ oo4gl/OpenEdge/Net/UriEncodingTypeEnum.cls @@ -1,20 +1,10 @@ -// TODO: convert to enum when FWD supports it -class OpenEdge.Net.UriEncodingTypeEnum -inherits Progress.Lang.Enum: - // TODO: add members here, as you find them - - define public static property Query as OpenEdge.Net.UriEncodingTypeEnum get. - define public static property Default as OpenEdge.Net.UriEncodingTypeEnum get. - define public static property Scheme as OpenEdge.Net.UriEncodingTypeEnum get. - define public static property Host as OpenEdge.Net.UriEncodingTypeEnum get. - define public static property Path as OpenEdge.Net.UriEncodingTypeEnum get. - define public static property Fragment as OpenEdge.Net.UriEncodingTypeEnum get. - define public static property Cookie as OpenEdge.Net.UriEncodingTypeEnum get. - - method static public OpenEdge.Net.UriEncodingTypeEnum GetEnum(input name as char): - end method. - - method static public OpenEdge.Net.UriEncodingTypeEnum GetEnum(input val as int64): - end method. - -end. +enum OpenEdge.Net.UriEncodingTypeEnum: + define enum Default = 0 + Scheme + Host + Path + Query + Fragment + Cookie + . +end enum. \ No newline at end of file diff --git oo4gl/OpenEdge/Net/UriSchemeEnum.cls oo4gl/OpenEdge/Net/UriSchemeEnum.cls index 4186da5..7584892 100644 --- oo4gl/OpenEdge/Net/UriSchemeEnum.cls +++ oo4gl/OpenEdge/Net/UriSchemeEnum.cls @@ -1,17 +1,6 @@ -// TODO: convert to enum when FWD supports it -class OpenEdge.Net.UriSchemeEnum -inherits Progress.Lang.Enum: - // TODO: add members here, as you find them - - define public static property http as OpenEdge.Net.UriSchemeEnum get. - define public static property https as OpenEdge.Net.UriSchemeEnum get. - define public static property file as OpenEdge.Net.UriSchemeEnum get. - define public static property ftp as OpenEdge.Net.UriSchemeEnum get. - - method static public OpenEdge.Net.UriSchemeEnum GetEnum(input name as char): - end method. - - method static public OpenEdge.Net.UriSchemeEnum GetEnum(input val as int64): - end method. - -end. +enum OpenEdge.Net.UriSchemeEnum: + define enum http = 0 + https + file + ftp. +end enum. diff --git oo4gl/Progress/Reflect/AccessMode.cls oo4gl/Progress/Reflect/AccessMode.cls index 5e8848d..84d62a7 100644 --- oo4gl/Progress/Reflect/AccessMode.cls +++ oo4gl/Progress/Reflect/AccessMode.cls @@ -1,18 +1,9 @@ -class Progress.Reflect.AccessMode -inherits Progress.Lang.Enum: +enum Progress.Reflect.AccessMode: - def public property Public as Progress.Reflect.AccessMode get. - def public property Protected as Progress.Reflect.AccessMode get. - def public property Private as Progress.Reflect.AccessMode get. - - /* this is mocked here but in the 4GL it is implicitly added to the child enum class */ - /* and the type is coded to that enum */ - method static public Progress.Reflect.AccessMode GetEnum(input name as char): - end method. + define enum + Public + Protected + Private. - /* this is mocked here but in the 4GL it is implicitly added to the child enum class */ - /* and the type is coded to that enum */ - method static public Progress.Reflect.AccessMode GetEnum(input val as int64): - end method. -end class. +end enum. diff --git oo4gl/Progress/Reflect/Flags.cls oo4gl/Progress/Reflect/Flags.cls index 3c7a433..060f91d 100644 --- oo4gl/Progress/Reflect/Flags.cls +++ oo4gl/Progress/Reflect/Flags.cls @@ -1,21 +1,11 @@ +enum Progress.Reflect.Flags flags: -class Progress.Reflect.Flags - inherits Progress.Lang.FlagsEnum: + define enum + Public = 1 + Protected + Private + Static + Instance + DeclaredOnly. - define public static property Public as Progress.Reflect.Flags get. - define public static property Protected as Progress.Reflect.Flags get. - define public static property Private as Progress.Reflect.Flags get. - define public static property Static as Progress.Reflect.Flags get. - define public static property Instance as Progress.Reflect.Flags get. - define public static property DeclaredOnly as Progress.Reflect.Flags get. - - /* this is mocked here but in the 4GL it is implicitly added to the child enum class */ - /* and the type is coded to that enum */ - method static public Progress.Reflect.Flags GetEnum(input name as char): - end method. - - /* this is mocked here but in the 4GL it is implicitly added to the child enum class */ - /* and the type is coded to that enum */ - method static public Progress.Reflect.Flags GetEnum(input val as int64): - end method. -end class. +end enum.