Commit Graph

19 Commits

Author SHA1 Message Date
Mark Olesen
1f20747b1a ENH: cleanup Pstream internal names, cull unneeded parameters
- Pstreams can be ascii/binary but are always currentVersion

- rename UIPstream externalBuf_ to 'recvBuf_' for similar naming as
  PstreamBuffers and symmetry with UOPstream::sendBuf_

- specific enum size for commsType (for more compact structures in the
  future). Default construct lists items.

BUG: possible incidental indexing in UIPstream::read(char*, std::streamsize)

- raw reading had been split into beginRawRead(), readRaw().
  However, this could change the current input position (due to word
  boundary alignment), even if the expected count is zero. Make a
  no-op for count == 0. This mirrors UOPstream::write behaviour.
2021-10-29 17:04:51 +02:00
Mark Olesen
e8cf2a2c62 ENH: more consistent use of IOstreamOption
- improves interface and data consistency.
  Older signatures are still active (via the Foam_IOstream_extras
  define).

- refine internals for IOstreamOption streamFormat, versionNumber

ENH: improve data alignment for IOstream and IOobject

- fit sizeof label/scalar into unsigned char

STYLE: remove dead code
2021-03-16 08:47:59 +00:00
OpenFOAM bot
e9219558d7 GIT: Header file updates 2019-10-31 14:48:44 +00:00
OpenFOAM bot
154029ddd0 BOT: Cleaned up header files 2019-02-06 12:28:23 +00:00
mattijs
c4a4611b0f Merge remote-tracking branch 'origin/feature/procAgglom'
Conflicts:
	src/OpenFOAM/meshes/lduMesh/lduMesh.H
2013-05-02 14:44:59 +01:00
mattijs
ea8d290191 ENH: communicators: initial version - extended Pstream API 2013-02-04 10:17:37 +00:00
Henry
c2dd153a14 Copyright transfered to the OpenFOAM Foundation 2011-08-14 12:17:30 +01:00
andy
eaef8d482b STYLE: Updated 1991 start copyright year to 2004 2011-01-14 16:08:00 +00:00
andy
099cc39e2e Revert "STYLE: 2011 copyright date."
This reverts commit b18f6cc1ce.
2011-01-05 18:24:29 +00:00
graham
b18f6cc1ce STYLE: 2011 copyright date. 2011-01-05 11:14:26 +00:00
graham
d79237597e STYLE: Fixing code style requirements for all src. 2010-07-28 13:31:46 +01:00
Mark Olesen
d29c438657 STYLE: use url for FSF license instead of postal address, switch to GPL v3 2010-03-29 14:07:56 +02:00
mattijs
7e200aecbf optional no wait on Pstream::exchange 2009-10-27 13:09:08 +00:00
mattijs
46f1df810c unallocated Pstream 2009-10-26 09:59:07 +00:00
mattijs
cba2e9905c removed whitespace 2009-10-02 17:17:00 +01:00
Mark Olesen
9087cd7b8e Support for single-quoted strings
- token class handles both single and double quoted strings. Single quoted
  strings are used to tag regular expressions. At the moment this is just
  syntactical sugar and isn't (yet) treated differently than double-quoted
  strings.

- write output for std:string, with/without single quotes with the method
  writeQuoted(). Use distinct method name to avoid inadvertent compiler
  conversions.

- write wordRe and keyType using writeQuoted()
2009-01-19 11:33:37 +01:00
Mark Olesen
95dcb6ded7 Simplify checking of container (List/HashTable, strings) sizes
- can use 'XX.empty()' instead of 'XX.size() == 0', 'XX.size() < 1' or
  'XX.size() <= 0' or for simpler coding.
  It also has the same number of characters as '!XX.size()' and /might/ be
  more readable

- many size checking had 'XX.size() > 0', 'XX.size() != 0', or 'XX.size() >= 1'
  when a simple 'XX.size()' suffices
2009-01-10 20:28:06 +01:00
Mark Olesen
cdd2266467 Merge commit 'OpenCFD/master' into olesenm
Conflicts:

	src/OpenFOAM/db/IOstreams/Pstreams/IPstream.C
	src/OpenFOAM/db/IOstreams/Pstreams/OPstream.C
2009-01-07 09:39:17 +01:00
Mark Olesen
1d866d7fe8 reworked IOstreams
- Istream and Ostream now retain backslashes when reading/writing strings.
  The previous implementation simply discarded them, except when used to
  escape a double-quote or a newline. It is now vitally important to retain
  them, eg for quoting regular expression meta-characters.

  The backslash continues to be used as an escape character for double-quote
  and newline, but otherwise get passed through "as-is" without any other
  special meaning (ie, they are *NOT* C-style strings). This helps avoid
  'backslash hell'!
  For example,
     string:   "match real dots \.+, question mark \? or any char .*"
     C-style:  "match real dots \\.+, question mark \\? or any char .*"

- combined subfiles in db/IOstreams, some had more copyright info than code
- OPstreamI.H contained only private methods, moved into OPstream.C

Are these really correct?
   IOstreams/Istream.H:#   include "HashTable.C"
   token/token.H:#define NoHashTableC
2009-01-03 12:52:27 +01:00