|
CoreComponents 3.0.0
A Modern C++ Toolkit
|
Binary input/output streams and formatted text output More...
Classes | |
| class | ByteSink |
| Byte encoding sink. More... | |
| class | ByteSource |
| Byte decoding sink. More... | |
| class | CaptureSink |
| Capture output in memory. More... | |
| class | Crc32Sink |
| CRC-32 checksum generator. More... | |
| class | Format |
| Generate formatted text. More... | |
| class | HashSink |
| Generic hashsum computing sink. More... | |
| class | IoMonitor |
| Wait for I/O events. More... | |
| class | IoStream |
| Base class for all system I/O streams. More... | |
| class | LineBuffer |
| Line output buffer. More... | |
| class | LineSource |
| Line input buffer. More... | |
| class | MemoryStream |
| Read from and write to an underlying memory buffer. More... | |
| class | NullStream |
| Read zeros and discard writes. More... | |
| class | ReplaySource |
| Feed data from an in-memory buffer. More... | |
| class | Stream |
| Abstract data stream. More... | |
| class | StreamMultiplexer |
| Parallel output to several data sinks. More... | |
| class | StreamTap |
| Bi-directional traffic redirection and duplication. More... | |
| class | TransferLimiter |
| Limit the maximum number of bytes transferred. More... | |
| class | TransferMeter |
| Transfer measuring stream More... | |
Macros | |
| #define | CC_DEBUG cc::ferr("%%\n") << cc::String{__FILE__}.fileName() << ":" << __LINE__ << ": " |
| Generate a debug message on the standard error output stream. | |
| #define | CC_INSPECT(expression) CC_DEBUG << CC_XSTR(expression) << " = " << (expression) |
| Generate a debug message for expression. | |
Enumerations | |
| enum class | FileAccess : int { None = 0 , Read = R_OK , Write = W_OK , Execute = X_OK , Exists = F_OK } |
| File access testing flags More... | |
| enum class | FileOpen : int { None = 0 , ReadOnly = O_RDONLY , WriteOnly = O_WRONLY , ReadWrite = O_RDWR , Append = O_APPEND , Create = O_CREAT , Truncate = O_TRUNC , Virgin = O_EXCL , Sync = O_SYNC , Temporary = 1 << (sizeof(int) * 8 - 2) , Overwrite = FileOpen::Create|FileOpen::WriteOnly|FileOpen::Truncate } |
| File open flags More... | |
| enum class | FileMode : mode_t { None = 0 , SetUserId = S_ISUID , SetGroupId = S_ISGID , StickyBit = S_ISVTX , UserRead = S_IRUSR , UserWrite = S_IWUSR , UserExec = S_IXUSR , GroupRead = S_IRGRP , GroupWrite = S_IWGRP , GroupExec = S_IXGRP , OtherRead = S_IROTH , OtherWrite = S_IWOTH , OtherExec = S_IXOTH , AnyExec = UserExec|GroupExec|OtherExec , Default = UserRead|UserWrite|GroupRead|OtherRead , DirDefault = UserExec|UserRead|UserWrite|GroupExec|GroupRead|OtherExec|OtherRead } |
| File permission flags More... | |
| enum class | Seek : int { Begin = SEEK_SET , Current = SEEK_CUR , End = SEEK_END } |
| Seek method. More... | |
| enum class | FileType : int { Undefined = 0 , Regular = S_IFREG , Directory = S_IFDIR , CharDevice = S_IFCHR , BlockDevice = S_IFBLK , Fifo = S_IFIFO , Symlink = S_IFLNK , Socket = S_IFSOCK } |
| File type More... | |
| enum class | IoShutdown : int { Read = 1 , Write = 2 , Full = 4 } |
| Shutdown mode for full-duplex communication channels. More... | |
| enum class | IoEvent : short { None = 0 , ReadyRead = 1 , ReadyWrite = 2 , ReadyAccept = ReadyRead , ReadyReadOrWrite = ReadyRead|ReadyWrite , Established = ReadyRead|ReadyWrite } |
| I/O event type. More... | |
Functions | |
| std::uint32_t | crc32 (const void *buffer, long size) |
| Generate CRC-32 checksum. | |
| std::uint32_t | crc32 (const char *buffer) |
| Generate CRC-32 checksum. | |
| std::uint32_t | crc32 (const Bytes &buffer) |
| Generate CRC-32 checksum. | |
Binary input/output streams and formatted text output
| #define CC_DEBUG cc::ferr("%%\n") << cc::String{__FILE__}.fileName() << ":" << __LINE__ << ": " |
Generate a debug message for expression.
Example:
|
strong |
|
strong |
File open flags
|
strong |
File permission flags
|
strong |
|
strong |
|
strong |
Shutdown mode for full-duplex communication channels.
| Enumerator | |
|---|---|
| Read | Partially shutdown the communication channel for reading. |
| Write | Partially shutdown the communication channel for writing. |
| Full | Fully shutdown the communication channel. |
|
strong |
| std::uint32_t crc32 | ( | const void * | buffer, |
| long | size ) |
Generate CRC-32 checksum.
| buffer | Input buffer |
| size | Number of bytes |
| std::uint32_t crc32 | ( | const char * | buffer | ) |
Generate CRC-32 checksum.
| buffer | Input C-string |
| std::uint32_t crc32 | ( | const Bytes & | buffer | ) |
Generate CRC-32 checksum.
| buffer | Input buffer |