• Home
Name Date Size #Lines LOC

..--

include/android-base/06-Sep-2024-4,5962,350

tidy/06-Sep-2024-5313

.clang-formatD06-Sep-2024239

Android.bpD06-Sep-20247.4 KiB327304

CPPLINT.cfgD06-Sep-202490 32

NOTICED06-Sep-202412.5 KiB231193

OWNERSD06-Sep-202415 21

PREUPLOAD.cfgD06-Sep-2024246 96

README.mdD06-Sep-20241.6 KiB4330

TEST_MAPPINGD06-Sep-2024136 1312

abi_compatibility.cppD06-Sep-20242.9 KiB9053

chrono_utils.cppD06-Sep-20241.2 KiB4320

chrono_utils_test.cppD06-Sep-20242.4 KiB8151

cmsg.cppD06-Sep-20245.4 KiB176128

cmsg_test.cppD06-Sep-20245.6 KiB203143

endian_test.cppD06-Sep-20242 KiB7040

errors_test.cppD06-Sep-20241.1 KiB3511

errors_unix.cppD06-Sep-2024866 3110

errors_windows.cppD06-Sep-20242.4 KiB6933

expected_test.cppD06-Sep-202429.9 KiB1,066862

file.cppD06-Sep-202419.7 KiB699534

file_benchmark.cppD06-Sep-20241.2 KiB3918

file_test.cppD06-Sep-202413.2 KiB432325

format_benchmark.cppD06-Sep-20242.4 KiB8146

function_ref_benchmark.cppD06-Sep-20243 KiB11580

function_ref_test.cppD06-Sep-20242.4 KiB8853

hex.cppD06-Sep-20241.3 KiB4318

hex_test.cppD06-Sep-20241.9 KiB5028

logging.cppD06-Sep-202416.9 KiB586457

logging_splitters.hD06-Sep-20247.1 KiB191127

logging_splitters_test.cppD06-Sep-202412.6 KiB322231

logging_test.cppD06-Sep-202423.5 KiB711541

macros_test.cppD06-Sep-2024867 3111

mapped_file.cppD06-Sep-20243.9 KiB12994

mapped_file_test.cppD06-Sep-20241.4 KiB5023

no_destructor_test.cppD06-Sep-20241.7 KiB6740

parsebool.cppD06-Sep-20241 KiB3515

parsebool_test.cppD06-Sep-20241.3 KiB4926

parsedouble_test.cppD06-Sep-20242.5 KiB6842

parseint_test.cppD06-Sep-20245.7 KiB204156

parsenetaddress.cppD06-Sep-20242.4 KiB8353

parsenetaddress_fuzzer.cppD06-Sep-20241 KiB3010

parsenetaddress_fuzzer.dictD06-Sep-2024515 3533

parsenetaddress_test.cppD06-Sep-20243.6 KiB12886

posix_strerror_r.cppD06-Sep-20241 KiB3513

process.cppD06-Sep-2024988 4019

process_test.cppD06-Sep-2024947 3614

properties.cppD06-Sep-202411.4 KiB327244

properties_test.cppD06-Sep-202412.8 KiB347252

result.cppD06-Sep-2024891 288

result_test.cppD06-Sep-202425.5 KiB833645

result_test_constraint.cppD06-Sep-2024916 221

scopeguard_test.cppD06-Sep-20241.8 KiB6037

stringprintf.cppD06-Sep-20242.2 KiB8646

stringprintf_test.cppD06-Sep-20241.5 KiB6135

strings.cppD06-Sep-20244.5 KiB151101

strings_test.cppD06-Sep-202414.3 KiB423331

test_main.cppD06-Sep-2024851 267

test_utils.cppD06-Sep-20242 KiB7645

test_utils_test.cppD06-Sep-20243.2 KiB10469

threads.cppD06-Sep-20241.4 KiB5532

utf8.cppD06-Sep-20246.6 KiB236153

utf8_test.cppD06-Sep-202416.2 KiB489295

README.md

1# libbase
2
3## Who is this library for?
4
5This library is a collection of convenience functions to make common tasks
6easier and less error-prone.
7
8In this context, "error-prone" covers both "hard to do correctly" and
9"hard to do with good performance", but as a general purpose library,
10libbase's primary focus is on making it easier to do things easily and
11correctly when a compromise has to be made between "simplest API" on the
12one hand and "fastest implementation" on the other. Though obviously
13the ideal is to have both.
14
15## Should my routine be added?
16
17The intention is to cover the 80% use cases, not be all things to all users.
18
19If you have a routine that's really useful in your project,
20congratulations. But that doesn't mean it should be here rather than
21just in your project.
22
23The question for libbase is "should everyone be doing this?"/"does this
24make everyone's code cleaner/safer?". Historically we've considered the
25bar for inclusion to be "are there at least three *unrelated* projects
26that would be cleaned up by doing so".
27
28If your routine is actually something from a future C++ standard (that
29isn't yet in libc++), or it's widely used in another library, that helps
30show that there's precedent. Being able to say "so-and-so has used this
31API for n years" is a good way to reduce concerns about API choices.
32
33## Any other restrictions?
34
35Unlike most Android code, code in libbase has to build for Mac and
36Windows too.
37
38Code here is also expected to have good test coverage.
39
40By its nature, it's difficult to change libbase API. It's often best
41to start using your routine just in your project, and let it "graduate"
42after you're certain that the API is solid.
43