• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..--

include/android-base/23-Mar-2024-

tidy/23-Mar-2024-

.clang-formatD01-Jan-19700

Android.bpD23-Mar-20245.5 KiB

CPPLINT.cfgD23-Mar-202490

OWNERSD23-Mar-202453

README.mdD23-Mar-20241.6 KiB

TEST_MAPPINGD23-Mar-202466

abi_compatibility.cppD23-Mar-20242.6 KiB

chrono_utils.cppD23-Mar-20241.2 KiB

chrono_utils_test.cppD23-Mar-20242.4 KiB

cmsg.cppD23-Mar-20245.4 KiB

cmsg_test.cppD23-Mar-20245.6 KiB

endian_test.cppD23-Mar-20242 KiB

errors_test.cppD23-Mar-20241.1 KiB

errors_unix.cppD23-Mar-2024866

errors_windows.cppD23-Mar-20242.4 KiB

expected_test.cppD23-Mar-202422.5 KiB

file.cppD23-Mar-202415.2 KiB

file_test.cppD23-Mar-202411.5 KiB

format_benchmark.cppD23-Mar-20242.4 KiB

liblog_symbols.cppD23-Mar-20243 KiB

liblog_symbols.hD23-Mar-20241.5 KiB

logging.cppD23-Mar-202416.4 KiB

logging_splitters.hD23-Mar-20247 KiB

logging_splitters_test.cppD23-Mar-202412.4 KiB

logging_test.cppD23-Mar-202422.6 KiB

macros_test.cppD23-Mar-2024867

mapped_file.cppD23-Mar-20243.9 KiB

mapped_file_test.cppD23-Mar-20241.4 KiB

no_destructor_test.cppD23-Mar-20241.7 KiB

parsebool.cppD23-Mar-20241 KiB

parsebool_test.cppD23-Mar-20241.3 KiB

parsedouble_test.cppD23-Mar-20242.5 KiB

parseint_test.cppD23-Mar-20245.7 KiB

parsenetaddress.cppD23-Mar-20242.4 KiB

parsenetaddress_test.cppD23-Mar-20243.6 KiB

process.cppD23-Mar-2024988

process_test.cppD23-Mar-2024947

properties.cppD23-Mar-20249.8 KiB

properties_test.cppD23-Mar-202410.7 KiB

result_test.cppD23-Mar-202413.4 KiB

scopeguard_test.cppD23-Mar-20241.8 KiB

stringprintf.cppD23-Mar-20242.2 KiB

stringprintf_test.cppD23-Mar-20241.5 KiB

strings.cppD23-Mar-20243.9 KiB

strings_test.cppD23-Mar-202412.4 KiB

test_main.cppD23-Mar-2024851

test_utils.cppD23-Mar-20242 KiB

test_utils_test.cppD23-Mar-20242.6 KiB

threads.cppD23-Mar-20241.3 KiB

utf8.cppD23-Mar-20246.6 KiB

utf8_test.cppD23-Mar-202416.2 KiB

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