Skip to content

Commit 9c507bc

Browse files
committed
wip
1 parent 5ad7cc1 commit 9c507bc

File tree

3 files changed

+123
-219
lines changed

3 files changed

+123
-219
lines changed

CMakeLists.txt

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -105,11 +105,11 @@ set(SPARROW_IPC_HEADERS
105105
${SPARROW_IPC_INCLUDE_DIR}/sparrow_ipc/chunk_memory_serializer.hpp
106106
${SPARROW_IPC_INCLUDE_DIR}/sparrow_ipc/config/config.hpp
107107
${SPARROW_IPC_INCLUDE_DIR}/sparrow_ipc/config/sparrow_ipc_version.hpp
108-
${SPARROW_IPC_INCLUDE_DIR}/sparrow_ipc/deserialize_variable_size_binary_array.hpp
109108
${SPARROW_IPC_INCLUDE_DIR}/sparrow_ipc/deserialize_fixedsizebinary_array.hpp
110109
${SPARROW_IPC_INCLUDE_DIR}/sparrow_ipc/deserialize_primitive_array.hpp
111110
${SPARROW_IPC_INCLUDE_DIR}/sparrow_ipc/deserialize_utils.hpp
112111
${SPARROW_IPC_INCLUDE_DIR}/sparrow_ipc/deserialize_variable_size_binary_array.hpp
112+
${SPARROW_IPC_INCLUDE_DIR}/sparrow_ipc/deserialize_variable_size_binary_array.hpp
113113
${SPARROW_IPC_INCLUDE_DIR}/sparrow_ipc/deserialize.hpp
114114
${SPARROW_IPC_INCLUDE_DIR}/sparrow_ipc/encapsulated_message.hpp
115115
${SPARROW_IPC_INCLUDE_DIR}/sparrow_ipc/flatbuffer_utils.hpp
@@ -121,7 +121,6 @@ set(SPARROW_IPC_HEADERS
121121
${SPARROW_IPC_INCLUDE_DIR}/sparrow_ipc/serialize.hpp
122122
${SPARROW_IPC_INCLUDE_DIR}/sparrow_ipc/serializer.hpp
123123
${SPARROW_IPC_INCLUDE_DIR}/sparrow_ipc/utils.hpp
124-
${SPARROW_IPC_INCLUDE_DIR}/sparrow_ipc/concepts.hpp
125124
)
126125

127126
set(SPARROW_IPC_SRC

include/sparrow_ipc/any_output_stream.hpp

Lines changed: 0 additions & 61 deletions
Original file line numberDiff line numberDiff line change
@@ -124,23 +124,6 @@ namespace sparrow_ipc
124124
*/
125125
[[nodiscard]] size_t size() const;
126126

127-
/**
128-
* @brief Flushes buffered data to the underlying destination.
129-
*/
130-
void flush();
131-
132-
/**
133-
* @brief Closes the stream and releases resources.
134-
*/
135-
void close();
136-
137-
/**
138-
* @brief Checks if the stream is open.
139-
*
140-
* @return true if open, false otherwise
141-
*/
142-
[[nodiscard]] bool is_open() const;
143-
144127
/**
145128
* @brief Gets a reference to the underlying stream cast to the specified type.
146129
*
@@ -177,9 +160,6 @@ namespace sparrow_ipc
177160
virtual void reserve(std::size_t size) = 0;
178161
virtual void reserve(const std::function<std::size_t()>& calculate_reserve_size) = 0;
179162
[[nodiscard]] virtual size_t size() const = 0;
180-
virtual void flush() = 0;
181-
virtual void close() = 0;
182-
[[nodiscard]] virtual bool is_open() const = 0;
183163
};
184164

185165
/**
@@ -210,12 +190,6 @@ namespace sparrow_ipc
210190

211191
[[nodiscard]] size_t size() const final;
212192

213-
void flush() final;
214-
215-
void close() final;
216-
217-
[[nodiscard]] bool is_open() const final;
218-
219193
TStream& get_stream();
220194

221195
const TStream& get_stream() const;
@@ -363,41 +337,6 @@ namespace sparrow_ipc
363337
}
364338
}
365339

366-
template <typename TStream>
367-
void any_output_stream::stream_model<TStream>::flush()
368-
{
369-
if constexpr (requires(TStream& t) { t.flush(); })
370-
{
371-
m_stream->flush();
372-
}
373-
// If no flush method, do nothing
374-
}
375-
376-
template <typename TStream>
377-
void any_output_stream::stream_model<TStream>::close()
378-
{
379-
if constexpr (requires(TStream& t) { t.close(); })
380-
{
381-
m_stream->close();
382-
}
383-
// If no close method, do nothing
384-
}
385-
386-
template <typename TStream>
387-
bool any_output_stream::stream_model<TStream>::is_open() const
388-
{
389-
if constexpr (requires(const TStream& t) {
390-
{ t.is_open() } -> std::convertible_to<bool>;
391-
})
392-
{
393-
return m_stream->is_open();
394-
}
395-
else
396-
{
397-
return true; // Assume open if no method available
398-
}
399-
}
400-
401340
template <typename TStream>
402341
TStream& any_output_stream::stream_model<TStream>::get_stream()
403342
{

0 commit comments

Comments
 (0)