Commit Graph

29 Commits

Author SHA1 Message Date
be9051d375 Merge commit 'OpenCFD/master' into HEAD 2009-01-16 12:26:11 +01:00
bd04dc7b59 Some stuff 2009-01-15 16:45:44 +00:00
4f5f66e759 Reverted change concerning the location of the construction of the "null" strings.
Changed dotFoam function to use null-constructed strings rather that the "null" strings.
2009-01-15 16:41:08 +00:00
81184573c8 added regExp::empty() method 2009-01-14 14:45:25 +01:00
a53b47355a rename Foam::size() -> Foam::fileSize() for carity 2009-01-11 16:44:11 +01:00
c826865f92 using .xfer() method instead of xferMoveTo<...> in a few places 2009-01-11 00:35:40 +01:00
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
b85c9a7487 avoided some unneeded conversions of string::npos, minor cleanup of className
- 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
2009-01-09 15:15:21 +01:00
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
3c5852ebfc reworked regExp + wordRe a bit, minor change to keyType
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).
2009-01-05 17:02:58 +01:00
461ac4b4cc regExp - separate full match from partial match, add find()
- match() only does a full match
  - find() and search() do partial matches
    search() is similar to the name coming into C++ TR1
2009-01-05 09:37:52 +01:00
2717aa5c7d new wordRe class - a word that holds a regExp
- 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
2009-01-04 00:33:27 +01:00
28b200bcd9 update copyrights for 2009 2008-12-31 19:01:56 +01:00
61aadcdbf0 handling [(nil)] from sicortex 2008-12-31 11:10:50 +00:00
a43b7a916e handle NULL pointer in regExp 2008-12-18 09:30:06 +01:00
0571f5393e rename Foam::dotFoam() -> Foam::findEtcFile() with an optional 'mandatory' argument
- if mandatory is true, findEtcFile() will abort with a message (via cerr).
  This allows a non-existent file to be caught at the lowest level and avoid
  error handling in IFstream, which might not be initialized at that stage.
2008-12-12 19:16:32 +01:00
c6cf2e539a - dropped regularExpression in favour of regExp
- moved findStrings from stringList to new stringListOps
  (helps reduce the influence on dependencies)
- findStrings can also do partial matches
2008-12-10 14:29:19 +01:00
4aaa07cc14 cosmetic changes 2008-12-10 13:34:52 +01:00
d017697b04 regExp class added - enhanced and with minor bugfixes 2008-12-10 12:44:12 +01:00
7c9f49b98f full match 2008-11-24 16:35:18 +00:00
b973a688d3 added constness 2008-09-28 19:26:15 +01:00
cbda73951c regular expression wrapping 2008-09-26 10:33:46 +01:00
9a3f933288 General tidy-up 2008-07-09 15:26:16 +01:00
02cabc3cf2 updated Copyright (C) \d+-2008 OpenCFD Ltd. 2008-06-25 15:01:46 +02:00
1025c3c4d3 eliminate .OpenFOAM-VERSION references in dotFoam and other files 2008-06-16 10:39:22 +02:00
d25d392c9f removed call to putenv since incorrect 2008-06-05 13:09:20 +01:00
abf89a7fd2 I changed my mind 2008-05-21 17:38:43 +01:00
1c4d2a97a5 Remove the #include <execinfo.h> on darwin OS 2008-05-21 16:58:38 +01:00
3170c7c0c9 Creation of OpenFOAM-dev repository 15/04/2008 2008-04-15 18:56:58 +01:00