nearby: snapshot as of cl/296436629

Signed-off-by: Alexey Polyudov <apolyudov@google.com>
Change-Id: I2cf5bf225b76f4c1541954651f3a7544a14e0cec
This commit is contained in:
Alexey Polyudov
2020-04-04 12:52:31 -07:00
parent 598516303b
commit 204f76077d
195 changed files with 27318 additions and 0 deletions
+38
View File
@@ -0,0 +1,38 @@
cc_library(
name = "config",
hdrs = [
"config.h",
],
visibility = [
"//visibility:private",
],
)
cc_library(
name = "string",
hdrs = [
"string.h",
],
visibility = [
"//core:__subpackages__",
"//platform:__subpackages__",
"//location/nearby/setup/core:__subpackages__",
],
deps = [
":config",
],
)
cc_library(
name = "down_cast",
hdrs = [
"down_cast.h",
],
visibility = [
"//core:__subpackages__",
"//platform:__subpackages__",
],
deps = [
":config",
],
)
+22
View File
@@ -0,0 +1,22 @@
#ifndef PLATFORM_PORT_CONFIG_H_
#define PLATFORM_PORT_CONFIG_H_
// Clients can modify this file to customize the Nearby C++ codebase as per
// their particular constraints and environments.
// Note: Every entry in this file should conform to the following format, to
// give precedence to command-line options (-D) that set these symbols:
//
// #ifndef XXX
// #define XXX 0/1
// #endif
#ifndef NEARBY_USE_STD_STRING
#define NEARBY_USE_STD_STRING 0
#endif
#ifndef NEARBY_USE_RTTI
#define NEARBY_USE_RTTI 1
#endif
#endif // PLATFORM_PORT_CONFIG_H_
+12
View File
@@ -0,0 +1,12 @@
#ifndef PLATFORM_PORT_DOWN_CAST_H_
#define PLATFORM_PORT_DOWN_CAST_H_
#include "platform/port/config.h"
#if NEARBY_USE_RTTI
#define DOWN_CAST dynamic_cast
#else
#define DOWN_CAST static_cast
#endif
#endif // PLATFORM_PORT_DOWN_CAST_H_
+12
View File
@@ -0,0 +1,12 @@
#ifndef PLATFORM_PORT_STRING_H_
#define PLATFORM_PORT_STRING_H_
#include <string>
#include "platform/port/config.h"
#if NEARBY_USE_STD_STRING
using std::string;
#endif
#endif // PLATFORM_PORT_STRING_H_