Ocean
Build.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) Meta Platforms, Inc. and affiliates.
3  *
4  * This source code is licensed under the MIT license found in the
5  * LICENSE file in the root directory of this source tree.
6  */
7 
8 #ifndef META_OCEAN_BASE_BUILD_H
9 #define META_OCEAN_BASE_BUILD_H
10 
11 #include "ocean/base/Base.h"
12 
13 namespace Ocean
14 {
15 
16 /**
17  * This class provides compiler build support.
18  * @ingroup base
19  */
20 class OCEAN_BASE_EXPORT Build
21 {
22  public:
23 
24  /**
25  * Returns a string holding the platform type.
26  * Platform type can be "android", "ios", "osx" or "win".
27  * @return System type
28  */
29  static std::string platformType();
30 
31  /**
32  * Returns a string holding the target architecture type.
33  * Platform type can be e.g. "arm", "arm64", "x64", "x86", or "i386"
34  * @return Target platform
35  */
36  static std::string architectureType();
37 
38  /**
39  * Returns a string holding the release type.
40  * In debug mode "debug" is returned, in release mode an empty string is returned.
41  * @return Release type
42  */
43  static std::string releaseType();
44 
45  /**
46  * Returns a string holding the runtime type.
47  * Possible values are "shared" or "static"
48  * @return Runtime type
49  */
50  static std::string runtimeType();
51 
52  /**
53  * Returns a string holding the compiler version.
54  * Compiler version are e.g. "gc48", "gc49", "xc6", "xc8", "cl38", "vc08", "vc09", "vc10", "vc11", "vc12", or "vc14".
55  * @return Compiler version
56  */
57  static std::string compilerVersion();
58 
59  /**
60  * Returns a build string composed of platform type, architecture type, compiler version and release type.
61  * @return Build string
62  */
63  static std::string buildString();
64 
65  /**
66  * Returns the date of the compiler building process as string.
67  * @param date Compiler build date which must be __DATE__
68  * @return Date of build process
69  */
70  static std::string buildDate(const char* date);
71 
72  /**
73  * Returns the time of the compiler building process as string.
74  * @param time Compiler build time which must be __TIME__
75  * @return Time of build process
76  */
77  static std::string buildTime(const char* time);
78 };
79 
80 }
81 
82 #endif // META_OCEAN_BASE_BUILD_H
This class provides compiler build support.
Definition: Build.h:21
static std::string buildTime(const char *time)
Returns the time of the compiler building process as string.
static std::string buildString()
Returns a build string composed of platform type, architecture type, compiler version and release typ...
static std::string architectureType()
Returns a string holding the target architecture type.
static std::string compilerVersion()
Returns a string holding the compiler version.
static std::string platformType()
Returns a string holding the platform type.
static std::string buildDate(const char *date)
Returns the date of the compiler building process as string.
static std::string runtimeType()
Returns a string holding the runtime type.
static std::string releaseType()
Returns a string holding the release type.
The namespace covering the entire Ocean framework.
Definition: Accessor.h:15