Google OR-Tools: ortools/base/init_google.h Source File

Go to the documentation of this file.

1

2

3

4

5

6

7

8

9

10

11

12

13

14#ifndef ORTOOLS_BASE_INIT_GOOGLE_H_

15#define ORTOOLS_BASE_INIT_GOOGLE_H_

16

17#include "absl/flags/declare.h"

18#include "absl/flags/flag.h"

19#include "absl/flags/parse.h"

20#include "absl/flags/usage.h"

21#include "absl/log/initialize.h"

22#include "absl/strings/string_view.h"

23

25

27 absl::InitializeLog();

28 if (!usage.empty()) {

29 absl::SetProgramUsageMessage(usage);

30 }

31}

32

34

35}

36

37

38

39

40

41

42

43

44

45

46

47

48

49inline void InitGoogle(absl::string_view usage, int* argc, char*** argv,

50 bool deprecated) {

52 absl::ParseCommandLine(*argc, *argv);

53}

54

55inline void InitGoogle(const char* usage, int* argc, char*** argv,

56 bool deprecated) {

57 InitGoogle(absl::NullSafeStringView(usage), argc, argv, deprecated);

58}

59

60#endif

void InitGoogle(absl::string_view usage, int *argc, char ***argv, bool deprecated)

Definition init_google.h:49

Definition init_google.h:24

void ShutdownGoogleLogging()

Definition init_google.h:33

void InitGoogleLogging(absl::string_view usage)

Definition init_google.h:26