Differences From Artifact [ead9e7cf66]:
- File src/OFSystemInfo.h — part of check-in [9f372df30f] at 2017-10-19 20:21:44 on branch trunk — OFSystemInfo: Prevent instantiation (user: js, size: 5023) [annotate] [blame] [check-ins using]
To Artifact [72e74f04c4]:
- File
src/OFSystemInfo.h
— part of check-in
[a2e849c681]
at
2017-10-30 00:23:35
on branch trunk
— Add class properties where appropriate
This improves Swift compatibility. (user: js, size: 6147) [annotate] [blame] [check-ins using]
︙ | ︙ | |||
21 22 23 24 25 26 27 28 29 30 31 32 33 34 | /*! * @class OFSystemInfo OFSystemInfo.h ObjFW/OFSystemInfo.h * * @brief A class for querying information about the system. */ @interface OFSystemInfo: OFObject /*! * @brief Returns the size of a page. * * @return The size of a page */ + (size_t)pageSize; | > > > > > > > > > > > > > > > > > > > > > > | 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 | /*! * @class OFSystemInfo OFSystemInfo.h ObjFW/OFSystemInfo.h * * @brief A class for querying information about the system. */ @interface OFSystemInfo: OFObject #ifdef OF_HAVE_CLASS_PROPERTIES @property (class, readonly, nonatomic) size_t pageSize; @property (class, readonly, nonatomic) size_t numberOfCPUs; @property (class, readonly, nullable, nonatomic) OFString *userDataPath; @property (class, readonly, nullable, nonatomic) OFString *userConfigPath; @property (class, readonly, nullable, nonatomic) OFString *CPUVendor; # if defined(OF_X86_64) || defined(OF_X86) || defined(DOXYGEN) @property (class, readonly, nonatomic) bool supportsMMX; @property (class, readonly, nonatomic) bool supportsSSE; @property (class, readonly, nonatomic) bool supportsSSE2; @property (class, readonly, nonatomic) bool supportsSSE3; @property (class, readonly, nonatomic) bool supportsSSSE3; @property (class, readonly, nonatomic) bool supportsSSE41; @property (class, readonly, nonatomic) bool supportsSSE42; @property (class, readonly, nonatomic) bool supportsAVX; @property (class, readonly, nonatomic) bool supportsAVX2; # endif # if defined(OF_POWERPC) || defined(OF_POWERPC64) || defined(DOXYGEN) @property (class, readonly, nonatomic) bool supportsAltiVec; # endif #endif /*! * @brief Returns the size of a page. * * @return The size of a page */ + (size_t)pageSize; |
︙ | ︙ | |||
47 48 49 50 51 52 53 | * On Unix systems, this adheres to the XDG Base Directory specification.@n * On Mac OS X and iOS, it uses the `NSApplicationSupportDirectory` directory.@n * On Windows, it uses the `APPDATA` environment variable.@n * On Haiku, it uses the `B_USER_SETTINGS_DIRECTORY` directory. * * @return The path where user data for the application can be stored */ | | | | 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 | * On Unix systems, this adheres to the XDG Base Directory specification.@n * On Mac OS X and iOS, it uses the `NSApplicationSupportDirectory` directory.@n * On Windows, it uses the `APPDATA` environment variable.@n * On Haiku, it uses the `B_USER_SETTINGS_DIRECTORY` directory. * * @return The path where user data for the application can be stored */ + (nullable OFString *)userDataPath; /*! * @brief Returns the path where user configuration for the application can be * stored. * * On Unix systems, this adheres to the XDG Base Directory specification.@n * On Mac OS X and iOS, it uses the `Preferences` directory inside of * `NSLibraryDirectory` directory.@n * On Windows, it uses the `APPDATA` environment variable.@n * On Haiku, it uses the `B_USER_SETTINGS_DIRECTORY` directory. * * @return The path where user configuration for the application can be stored */ + (nullable OFString *)userConfigPath; /*! * @brief Returns the vendor of the CPU. * * If the vendor could not be determined, `nil` is returned instead. * * @return The vendor of the CPU |
︙ | ︙ |