- 20 Jan, 2009 1 commit
-
-
Mark Olesen authored
- added STL-compatible resize() method. Should this be the primary entry point? - made [DS]LListBase end iterators private
-
- 19 Jan, 2009 4 commits
-
-
mattijs authored
-
Mark Olesen authored
- 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()
-
Mark Olesen authored
-
Mark Olesen authored
-
- 16 Jan, 2009 6 commits
-
-
Mark Olesen authored
- Switch now stores its value as an unsigned char, which gives it the same storage requirement as bool (1 byte). The original implementation had both bool+word (1+XXX bytes storage), an intermediate version with bool+enum had 8 bytes (1+4 + boundary alignment). - The reading code in boolIO.C and SwitchIO.C is now identical except for the error message. This allows Switch to accept '1', '0' as logical values, and allows bool to accept 'yes', 'no' etc. as logical values. - The Switch text translation of a bool value is now true/false instead of on/off. This is partly personal preference, but we could also output the same text when writing a bool value to Ostream. - Switch gets null and integer constructors so it feels more like bool. Added Switch::operator=(const bool); - Low-level types can be used for the constructors, and low-level return values are used for the greatest flexibility (and speed). - Fixed bugginess with dictionary lookup. The previous version actually used a bool instead of a Switch and bombed on 'on/off'. TODO? perhaps don't worry about the error message and just call the Switch routines from bool.
-
Mark Olesen authored
- grammar in comments, namespace qualifiers, etc.
-
Mark Olesen authored
-
Mark Olesen authored
- put back debug switch (even although it is never used) - remove stringsGlobals.C, since it is now never used
-
Mark Olesen authored
-
Mark Olesen authored
- uniform use of reinterpret_cast<foo*>(0) instead of reinterpret_cast<foo*>(NULL) - make all static null() members inline since they are really only a cast: "*reinterpret_cast<foo*>(0)"
-
- 15 Jan, 2009 3 commits
-
-
henry authored
static const char* const typeName; static int debug; which had disappeared.
-
henry authored
Changed dotFoam function to use null-constructed strings rather that the "null" strings.
-
Mark Olesen authored
- nice idea, but need to convince compiler that division by zero doesn't occur
-
- 14 Jan, 2009 1 commit
-
-
Mark Olesen authored
-
- 12 Jan, 2009 2 commits
-
-
Mark Olesen authored
- HashTableName + StaticHashTableName continue to use debug switch regardless of FULLDEBUG setting
-
Mark Olesen authored
-
- 11 Jan, 2009 3 commits
-
-
Mark Olesen authored
- the parameter HashTable can hold arbitrary data .. just the type of keys needs to match
-
Mark Olesen authored
-
Mark Olesen authored
-
- 10 Jan, 2009 3 commits
-
-
Mark Olesen authored
-
Mark Olesen authored
- 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
-
Mark Olesen authored
-
- 09 Jan, 2009 5 commits
-
-
Mark Olesen authored
- string doesn't use any debug info, remove it - restructured the macros to add in NoDebug macro versions to className, typeInfo. Might be helpful with tackling the globals bootstrapping issue. - HashTableName + StaticHashTableName - avoid lookup of debug switch when FULLDEBUG is not defined
-
Mark Olesen authored
-
Mark Olesen authored
-
Mark Olesen authored
-
Mark Olesen authored
- avoids problems with finding files based on FOAMversion (reported by Mattijs)
-
- 08 Jan, 2009 2 commits
- 07 Jan, 2009 1 commit
-
-
Mark Olesen authored
-
- 06 Jan, 2009 1 commit
-
-
mattijs authored
-
- 31 Dec, 2008 1 commit
-
-
Mark Olesen authored
-
- 07 Jan, 2009 1 commit
-
-
Mark Olesen authored
- motivation: we could probably reuse the Switch::asBool() within boolIO.C ... and possibly make Switch is-a bool and has-a word (or has-a enum for the word) for reuse with nicer output values for bool
-
- 05 Jan, 2009 4 commits
-
-
Mark Olesen authored
- we can now use a list of words/regexp for filtering/selecting ... the first results: cellTable/boundaryRegion
-
Mark Olesen authored
regExp: - added optional ignoreCase for constructor. - the compile() methods is now exposed as set(...) method with an optional ignoreCase argument. Not currently much use for the other regex compile flags though. The set() method can be used directly instead of the operator=() assignment. keyType + wordRe: - it's not clear that any particular characters are valid/invalid (compared to string or word), so just drop the valid(char) method for now wordRe: - a bool doesn't suffice, added enum compOption (compile-option) - most constructors now have a compOption. In *all* cases it defaults to LITERAL - ie, the same behaviour for std::string and Foam::string - added set(...) methods that do much the same as operator=(...), but the compOption can be specified. In all cases, it defaults to DETECT. In Summary By default the constructors will generally preserve the argument as string literal and the assignment operators will use the wordRe::DETECT compOption to scan the string for regular expression meta characters and/or invalid word characters and react accordingly. The exceptions are when constructing/assigning from another Foam::wordRe (preserve the same type) or from a Foam::word (always literal).
-
Mark Olesen authored
- The capitalization is consistent with most other template classes, but more importantly frees up xfer() for use as method name without needing special treatment to avoid ambiguities. It seems reasonable to have different names for transfer(...) and xfer() methods, since the transfer is occuring in different directions. The xfer() method can thus replace the recently introduced zero-parameter transfer() methods. Other name candidates (eg, yield, release, etc.) were deemed too abstract.
-
Mark Olesen authored
- match() only does a full match - find() and search() do partial matches search() is similar to the name coming into C++ TR1
-
- 03 Jan, 2009 2 commits
-
-
Mark Olesen authored
- a possible future replacement for keyType, but the immediate use is the wordReList for grepping through other lists. - note that the argList treatment of '(' ... ')' yields quoted strings, which we can use for building a wordReList minor cleanup of regExp class - constructor from std::string, match std::string and operator=(std::string&) rely on automatic conversion to Foam::string - ditch partialMatch with sub-groups, it doesn't make much sense
-
Mark Olesen authored
- 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
-