blob: 7fe74f2af248fd1b46c9f1477b69baae69de6685 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
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
57
58
59
60
61
|
// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
#pragma once
#include <cstdint>
/**
* This class provides overall information about the FNET
* implementation.
**/
class FNET_Info
{
public:
/**
* Host endian enum. See @ref GetEndian method below.
**/
enum {
ENDIAN_UNKNOWN,
ENDIAN_LITTLE,
ENDIAN_BIG
};
private:
static uint32_t _endian;
public:
/**
* A static instance of the FNET_Info class is used to ensure that
* this method is run (once) on application startup. It performs
* some probing to obtain information about the host.
**/
FNET_Info();
/**
* @return true if we have support for threads
**/
static bool HasThreads() { return true; }
/**
* @return the host endian (unknown/little/big)
**/
static uint32_t GetEndian() { return _endian; }
/**
* This method may be used to obtain a string describing the
* FNET version.
*
* @return a string indicating the FNET version.
**/
static const char *GetFNETVersion();
/**
* This method is deprecated. Use the FNET_Info::LogInfo method
* instead.
**/
static void PrintInfo();
/**
* Invoking this method logs various information about FNET.
**/
static void LogInfo();
};
|