Name | Date | Size | #Lines | LOC | ||
---|---|---|---|---|---|---|
.. | - | - | ||||
include/android-base/ | 06-Sep-2024 | - | 4,596 | 2,350 | ||
tidy/ | 06-Sep-2024 | - | 53 | 13 | ||
.clang-format | D | 06-Sep-2024 | 239 | |||
Android.bp | D | 06-Sep-2024 | 7.4 KiB | 327 | 304 | |
CPPLINT.cfg | D | 06-Sep-2024 | 90 | 3 | 2 | |
NOTICE | D | 06-Sep-2024 | 12.5 KiB | 231 | 193 | |
OWNERS | D | 06-Sep-2024 | 15 | 2 | 1 | |
PREUPLOAD.cfg | D | 06-Sep-2024 | 246 | 9 | 6 | |
README.md | D | 06-Sep-2024 | 1.6 KiB | 43 | 30 | |
TEST_MAPPING | D | 06-Sep-2024 | 136 | 13 | 12 | |
abi_compatibility.cpp | D | 06-Sep-2024 | 2.9 KiB | 90 | 53 | |
chrono_utils.cpp | D | 06-Sep-2024 | 1.2 KiB | 43 | 20 | |
chrono_utils_test.cpp | D | 06-Sep-2024 | 2.4 KiB | 81 | 51 | |
cmsg.cpp | D | 06-Sep-2024 | 5.4 KiB | 176 | 128 | |
cmsg_test.cpp | D | 06-Sep-2024 | 5.6 KiB | 203 | 143 | |
endian_test.cpp | D | 06-Sep-2024 | 2 KiB | 70 | 40 | |
errors_test.cpp | D | 06-Sep-2024 | 1.1 KiB | 35 | 11 | |
errors_unix.cpp | D | 06-Sep-2024 | 866 | 31 | 10 | |
errors_windows.cpp | D | 06-Sep-2024 | 2.4 KiB | 69 | 33 | |
expected_test.cpp | D | 06-Sep-2024 | 29.9 KiB | 1,066 | 862 | |
file.cpp | D | 06-Sep-2024 | 19.7 KiB | 699 | 534 | |
file_benchmark.cpp | D | 06-Sep-2024 | 1.2 KiB | 39 | 18 | |
file_test.cpp | D | 06-Sep-2024 | 13.2 KiB | 432 | 325 | |
format_benchmark.cpp | D | 06-Sep-2024 | 2.4 KiB | 81 | 46 | |
function_ref_benchmark.cpp | D | 06-Sep-2024 | 3 KiB | 115 | 80 | |
function_ref_test.cpp | D | 06-Sep-2024 | 2.4 KiB | 88 | 53 | |
hex.cpp | D | 06-Sep-2024 | 1.3 KiB | 43 | 18 | |
hex_test.cpp | D | 06-Sep-2024 | 1.9 KiB | 50 | 28 | |
logging.cpp | D | 06-Sep-2024 | 16.9 KiB | 586 | 457 | |
logging_splitters.h | D | 06-Sep-2024 | 7.1 KiB | 191 | 127 | |
logging_splitters_test.cpp | D | 06-Sep-2024 | 12.6 KiB | 322 | 231 | |
logging_test.cpp | D | 06-Sep-2024 | 23.5 KiB | 711 | 541 | |
macros_test.cpp | D | 06-Sep-2024 | 867 | 31 | 11 | |
mapped_file.cpp | D | 06-Sep-2024 | 3.9 KiB | 129 | 94 | |
mapped_file_test.cpp | D | 06-Sep-2024 | 1.4 KiB | 50 | 23 | |
no_destructor_test.cpp | D | 06-Sep-2024 | 1.7 KiB | 67 | 40 | |
parsebool.cpp | D | 06-Sep-2024 | 1 KiB | 35 | 15 | |
parsebool_test.cpp | D | 06-Sep-2024 | 1.3 KiB | 49 | 26 | |
parsedouble_test.cpp | D | 06-Sep-2024 | 2.5 KiB | 68 | 42 | |
parseint_test.cpp | D | 06-Sep-2024 | 5.7 KiB | 204 | 156 | |
parsenetaddress.cpp | D | 06-Sep-2024 | 2.4 KiB | 83 | 53 | |
parsenetaddress_fuzzer.cpp | D | 06-Sep-2024 | 1 KiB | 30 | 10 | |
parsenetaddress_fuzzer.dict | D | 06-Sep-2024 | 515 | 35 | 33 | |
parsenetaddress_test.cpp | D | 06-Sep-2024 | 3.6 KiB | 128 | 86 | |
posix_strerror_r.cpp | D | 06-Sep-2024 | 1 KiB | 35 | 13 | |
process.cpp | D | 06-Sep-2024 | 988 | 40 | 19 | |
process_test.cpp | D | 06-Sep-2024 | 947 | 36 | 14 | |
properties.cpp | D | 06-Sep-2024 | 11.4 KiB | 327 | 244 | |
properties_test.cpp | D | 06-Sep-2024 | 12.8 KiB | 347 | 252 | |
result.cpp | D | 06-Sep-2024 | 891 | 28 | 8 | |
result_test.cpp | D | 06-Sep-2024 | 25.5 KiB | 833 | 645 | |
result_test_constraint.cpp | D | 06-Sep-2024 | 916 | 22 | 1 | |
scopeguard_test.cpp | D | 06-Sep-2024 | 1.8 KiB | 60 | 37 | |
stringprintf.cpp | D | 06-Sep-2024 | 2.2 KiB | 86 | 46 | |
stringprintf_test.cpp | D | 06-Sep-2024 | 1.5 KiB | 61 | 35 | |
strings.cpp | D | 06-Sep-2024 | 4.5 KiB | 151 | 101 | |
strings_test.cpp | D | 06-Sep-2024 | 14.3 KiB | 423 | 331 | |
test_main.cpp | D | 06-Sep-2024 | 851 | 26 | 7 | |
test_utils.cpp | D | 06-Sep-2024 | 2 KiB | 76 | 45 | |
test_utils_test.cpp | D | 06-Sep-2024 | 3.2 KiB | 104 | 69 | |
threads.cpp | D | 06-Sep-2024 | 1.4 KiB | 55 | 32 | |
utf8.cpp | D | 06-Sep-2024 | 6.6 KiB | 236 | 153 | |
utf8_test.cpp | D | 06-Sep-2024 | 16.2 KiB | 489 | 295 |
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