|
||||
File indexing completed on 2025-01-18 09:27:25
0001 // Copyright 2021 The Abseil Authors 0002 // 0003 // Licensed under the Apache License, Version 2.0 (the "License"); 0004 // you may not use this file except in compliance with the License. 0005 // You may obtain a copy of the License at 0006 // 0007 // https://www.apache.org/licenses/LICENSE-2.0 0008 // 0009 // Unless required by applicable law or agreed to in writing, software 0010 // distributed under the License is distributed on an "AS IS" BASIS, 0011 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 0012 // See the License for the specific language governing permissions and 0013 // limitations under the License. 0014 0015 #ifndef ABSL_STRINGS_INTERNAL_CORD_REP_CONSUME_H_ 0016 #define ABSL_STRINGS_INTERNAL_CORD_REP_CONSUME_H_ 0017 0018 #include <functional> 0019 0020 #include "absl/functional/function_ref.h" 0021 #include "absl/strings/internal/cord_internal.h" 0022 0023 namespace absl { 0024 ABSL_NAMESPACE_BEGIN 0025 namespace cord_internal { 0026 0027 // Consume() and ReverseConsume() consume CONCAT based trees and invoke the 0028 // provided functor with the contained nodes in the proper forward or reverse 0029 // order, which is used to convert CONCAT trees into other tree or cord data. 0030 // All CONCAT and SUBSTRING nodes are processed internally. The 'offset` 0031 // parameter of the functor is non-zero for any nodes below SUBSTRING nodes. 0032 // It's up to the caller to form these back into SUBSTRING nodes or otherwise 0033 // store offset / prefix information. These functions are intended to be used 0034 // only for migration / transitional code where due to factors such as ODR 0035 // violations, we can not 100% guarantee that all code respects 'new format' 0036 // settings and flags, so we need to be able to parse old data on the fly until 0037 // all old code is deprecated / no longer the default format. 0038 void Consume(CordRep* rep, 0039 FunctionRef<void(CordRep*, size_t, size_t)> consume_fn); 0040 void ReverseConsume(CordRep* rep, 0041 FunctionRef<void(CordRep*, size_t, size_t)> consume_fn); 0042 0043 } // namespace cord_internal 0044 ABSL_NAMESPACE_END 0045 } // namespace absl 0046 0047 #endif // ABSL_STRINGS_INTERNAL_CORD_REP_CONSUME_H_
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |