]> git.tdb.fi Git - libs/datafile.git/log
libs/datafile.git
11 years agoAdd a shortcut for wrapping data for a collection file
Mikko Rasa [Thu, 27 Sep 2012 22:31:37 +0000 (01:31 +0300)]
Add a shortcut for wrapping data for a collection file

Collections are part of the library itself, so there's no reason to
require users to write all the boilerplate to do the wrapping.

11 years agoCreate writers dynamically and delete them before deleting output
Mikko Rasa [Thu, 27 Sep 2012 22:24:13 +0000 (01:24 +0300)]
Create writers dynamically and delete them before deleting output

This ensures that the IO objects are destroyed in the correct order, and
filters won't try to access deleted objects.

11 years agoRecognize char pointers as strings
Mikko Rasa [Thu, 27 Sep 2012 22:15:32 +0000 (01:15 +0300)]
Recognize char pointers as strings

statement.append("literal") was creating a symbol value, which was not
following the principle of least surprise.

11 years agoRestructure the tool and make it able to handle multiple input files
Mikko Rasa [Thu, 27 Sep 2012 16:23:58 +0000 (19:23 +0300)]
Restructure the tool and make it able to handle multiple input files

11 years agoSimplify loading collection items
Mikko Rasa [Thu, 27 Sep 2012 13:11:56 +0000 (16:11 +0300)]
Simplify loading collection items

The ItemLoader wrapper from DirectoryCollection can be used in the base
Collection::Loader as well.  This removes the need for the kludgy struct
Add and the need for two separate loader functions.  As an added bonus,
the ItemLoader can still be used in DirectoryCollection and future derived
classes as well, further reducing duplication.

11 years agoMore unit tests for Collection, including contains and future objects
Mikko Rasa [Wed, 26 Sep 2012 20:29:57 +0000 (23:29 +0300)]
More unit tests for Collection, including contains and future objects

11 years agoFix some minor mistakes
Mikko Rasa [Wed, 26 Sep 2012 20:26:54 +0000 (23:26 +0300)]
Fix some minor mistakes

11 years agoGive DirectoryCollection the ability to add files as future objects
Mikko Rasa [Wed, 26 Sep 2012 19:18:24 +0000 (22:18 +0300)]
Give DirectoryCollection the ability to add files as future objects

11 years agoMinor reorganization
Mikko Rasa [Wed, 26 Sep 2012 18:49:22 +0000 (21:49 +0300)]
Minor reorganization

11 years agoIntroduce the concept of future objects
Mikko Rasa [Wed, 26 Sep 2012 18:36:28 +0000 (21:36 +0300)]
Introduce the concept of future objects

11 years agoMake Collection::contains check for type
Mikko Rasa [Wed, 26 Sep 2012 16:04:33 +0000 (19:04 +0300)]
Make Collection::contains check for type

Checking item existence without type information is not particularly
useful, since there's no guarantee that the object can be used for its
intended purpose.

11 years agoImprove the documentation of Collection
Mikko Rasa [Wed, 26 Sep 2012 07:43:01 +0000 (10:43 +0300)]
Improve the documentation of Collection

11 years agoRevert "Convenience function for reporting errors in loaded data"
Mikko Rasa [Thu, 30 Aug 2012 08:35:53 +0000 (11:35 +0300)]
Revert "Convenience function for reporting errors in loaded data"

This reverts commit b0b9af7216560da2a46ea38fe2df959f4dfb126f.

Why did I even add this function.  The Loader catches any exceptions and
rethrows them as data_errors with the correct line number information.

11 years agoFix some whitespace errors
Mikko Rasa [Thu, 30 Aug 2012 08:35:37 +0000 (11:35 +0300)]
Fix some whitespace errors

11 years agoChange DerivedObjectLoader to take the base loader as template argument
Mikko Rasa [Tue, 21 Aug 2012 23:15:41 +0000 (02:15 +0300)]
Change DerivedObjectLoader to take the base loader as template argument

This makes it much more versatile, as it can now be used to derive from
a protected loader or one with a nonstandard name.

11 years agoProper loading of collection-enabled objects in DirectoryCollection
Mikko Rasa [Sat, 18 Aug 2012 21:16:50 +0000 (00:16 +0300)]
Proper loading of collection-enabled objects in DirectoryCollection

11 years agoMake DirectoryCollection::lookup_file available to derived classes
Mikko Rasa [Sat, 18 Aug 2012 21:16:13 +0000 (00:16 +0300)]
Make DirectoryCollection::lookup_file available to derived classes

11 years agoAdd support for compressed datafiles
Mikko Rasa [Fri, 3 Aug 2012 10:06:13 +0000 (13:06 +0300)]
Add support for compressed datafiles

11 years agoAdd an abstraction layer for output
Mikko Rasa [Fri, 3 Aug 2012 09:55:03 +0000 (12:55 +0300)]
Add an abstraction layer for output

11 years agoMore senseful validity checks for keyword and string definitions
Mikko Rasa [Thu, 2 Aug 2012 14:45:00 +0000 (17:45 +0300)]
More senseful validity checks for keyword and string definitions

I don't see how the original conditions could ever have been triggered,
given that arguments are parsed based on the signature, and those of the
built-in statements are fixed.

11 years agoUse custom encoding for floats in binary format
Mikko Rasa [Thu, 2 Aug 2012 08:11:40 +0000 (11:11 +0300)]
Use custom encoding for floats in binary format

This makes the binary format fully machine-independent, and provides
control over the precision of floating point values.

11 years agoUse negative integers for built-in statements for better extensibility
Mikko Rasa [Wed, 1 Aug 2012 15:52:25 +0000 (18:52 +0300)]
Use negative integers for built-in statements for better extensibility

11 years agoUse Int64 from inttypes.h, and proper defines
Mikko Rasa [Wed, 1 Aug 2012 15:46:49 +0000 (18:46 +0300)]
Use Int64 from inttypes.h, and proper defines

11 years agoRecognize floating-point literals with an exponent but no decimal point
Mikko Rasa [Wed, 1 Aug 2012 15:06:31 +0000 (18:06 +0300)]
Recognize floating-point literals with an exponent but no decimal point

11 years agoUpdate .gitignore
Mikko Rasa [Wed, 1 Aug 2012 08:54:14 +0000 (11:54 +0300)]
Update .gitignore

11 years agoBump version to 2.0 due to incompatible changes
Mikko Rasa [Wed, 1 Aug 2012 08:47:11 +0000 (11:47 +0300)]
Bump version to 2.0 due to incompatible changes

11 years agoUpdate the Build file with new Builder features
Mikko Rasa [Wed, 1 Aug 2012 08:08:08 +0000 (11:08 +0300)]
Update the Build file with new Builder features

11 years agoFix tests/Build
Mikko Rasa [Fri, 20 Jul 2012 20:55:26 +0000 (23:55 +0300)]
Fix tests/Build

11 years agoAdd facility for classes to specify what type they should be loaded as
Mikko Rasa [Wed, 18 Jul 2012 14:43:19 +0000 (17:43 +0300)]
Add facility for classes to specify what type they should be loaded as

11 years agoDon't use long long on MSVC
Mikko Rasa [Wed, 18 Jul 2012 13:01:50 +0000 (16:01 +0300)]
Don't use long long on MSVC

11 years agoUse the metadata for type.h in binary write/parse functions
Mikko Rasa [Wed, 18 Jul 2012 12:56:42 +0000 (15:56 +0300)]
Use the metadata for type.h in binary write/parse functions

11 years agoRefactor symbol handling in binary format
Mikko Rasa [Wed, 18 Jul 2012 12:00:36 +0000 (15:00 +0300)]
Refactor symbol handling in binary format

11 years agoConvenience function for reporting errors in loaded data
Mikko Rasa [Wed, 18 Jul 2012 10:09:37 +0000 (13:09 +0300)]
Convenience function for reporting errors in loaded data

11 years agoAdd DerivedObjectLoader class
Mikko Rasa [Tue, 10 Jul 2012 15:28:11 +0000 (18:28 +0300)]
Add DerivedObjectLoader class

12 years agoStyle fixes
Mikko Rasa [Tue, 17 Apr 2012 09:00:03 +0000 (12:00 +0300)]
Style fixes

12 years agoAdd DirectoryCollection class for creating directory-backed collections
Mikko Rasa [Fri, 20 Jan 2012 20:28:06 +0000 (22:28 +0200)]
Add DirectoryCollection class for creating directory-backed collections

12 years agoAllow creator function to return null to indicate failure
Mikko Rasa [Fri, 20 Jan 2012 20:27:43 +0000 (22:27 +0200)]
Allow creator function to return null to indicate failure

12 years agoFix collection necessity detection
Mikko Rasa [Sun, 15 Jan 2012 12:26:05 +0000 (14:26 +0200)]
Fix collection necessity detection

12 years agoFix pointer loading
Mikko Rasa [Thu, 8 Sep 2011 07:07:32 +0000 (10:07 +0300)]
Fix pointer loading

12 years agoFix a stray header name
Mikko Rasa [Tue, 6 Sep 2011 08:37:57 +0000 (11:37 +0300)]
Fix a stray header name

12 years agoThe fs library was absorbed into core
Mikko Rasa [Wed, 31 Aug 2011 21:43:29 +0000 (00:43 +0300)]
The fs library was absorbed into core

12 years agoRename CollectionItemType::create method to creator
Mikko Rasa [Tue, 26 Jul 2011 10:09:07 +0000 (13:09 +0300)]
Rename CollectionItemType::create method to creator

12 years agoUpdate .gitignore
Mikko Rasa [Mon, 25 Jul 2011 14:55:33 +0000 (17:55 +0300)]
Update .gitignore

12 years agoAdd unit tests
Mikko Rasa [Mon, 25 Jul 2011 14:55:27 +0000 (17:55 +0300)]
Add unit tests

12 years agoRedesign the Collection class
Mikko Rasa [Mon, 25 Jul 2011 14:54:16 +0000 (17:54 +0300)]
Redesign the Collection class

12 years agoException rework for loader components
Mikko Rasa [Mon, 25 Jul 2011 14:28:18 +0000 (17:28 +0300)]
Exception rework for loader components

12 years agoUpdate the tool to use the new RegisteredApplication class
Mikko Rasa [Mon, 25 Jul 2011 14:24:22 +0000 (17:24 +0300)]
Update the tool to use the new RegisteredApplication class

12 years agoRemove dependencies on discontinued packages
Mikko Rasa [Mon, 25 Jul 2011 14:23:33 +0000 (17:23 +0300)]
Remove dependencies on discontinued packages

12 years agoRemove pointer reload prevention feature; the purpose it was added for is now gone
Mikko Rasa [Mon, 25 Jul 2011 14:20:41 +0000 (17:20 +0300)]
Remove pointer reload prevention feature; the purpose it was added for is now gone

12 years agoRemove deprecated BasicLoader classes
Mikko Rasa [Mon, 25 Jul 2011 14:12:40 +0000 (17:12 +0300)]
Remove deprecated BasicLoader classes

12 years agoException rework for parser components
Mikko Rasa [Mon, 25 Jul 2011 14:10:57 +0000 (17:10 +0300)]
Exception rework for parser components

12 years agoLet Variant take care of detecting type mismatches
Mikko Rasa [Mon, 25 Jul 2011 14:10:01 +0000 (17:10 +0300)]
Let Variant take care of detecting type mismatches

12 years agoStyle update: remove alignment
Mikko Rasa [Mon, 25 Jul 2011 14:07:49 +0000 (17:07 +0300)]
Style update: remove alignment

12 years agoUse the functions from maputils.h in various places
Mikko Rasa [Mon, 25 Jul 2011 14:02:34 +0000 (17:02 +0300)]
Use the functions from maputils.h in various places

12 years agoUpdate formatter.h -> format.h
Mikko Rasa [Mon, 25 Jul 2011 09:30:43 +0000 (12:30 +0300)]
Update formatter.h -> format.h

12 years agoDrop copyright and license notices from source files
Mikko Rasa [Sat, 25 Jun 2011 13:34:22 +0000 (16:34 +0300)]
Drop copyright and license notices from source files

12 years agoUse IO::BufferedFile instead of separate File and Buffered objects
Mikko Rasa [Sat, 18 Jun 2011 18:31:27 +0000 (21:31 +0300)]
Use IO::BufferedFile instead of separate File and Buffered objects

12 years agoConvert svn:ignore to .gitignore
Mikko Rasa [Sat, 18 Jun 2011 14:04:29 +0000 (17:04 +0300)]
Convert svn:ignore to .gitignore

13 years agoFix creating Symbols from arbitary types
Mikko Rasa [Wed, 27 Oct 2010 20:24:17 +0000 (20:24 +0000)]
Fix creating Symbols from arbitary types
Allow a few other delimiters in symbols
Allow symbols to begin with a non-alphanumeric if escaped
Fix a bug where another token was accepted immediately after a string

13 years agoDon't throw on empty files
Mikko Rasa [Sun, 26 Sep 2010 09:29:47 +0000 (09:29 +0000)]
Don't throw on empty files

14 years agoMake ignored keywords work properly
Mikko Rasa [Tue, 23 Feb 2010 14:39:45 +0000 (14:39 +0000)]
Make ignored keywords work properly

14 years agoAdd some optional (for now) extra checks for Loader
Mikko Rasa [Sat, 20 Feb 2010 19:05:09 +0000 (19:05 +0000)]
Add some optional (for now) extra checks for Loader
Remove argument count checks from LoaderActions, the signatures take care of that now

14 years agoCreate improvement replacements for BasicLoader* in objectloader.h
Mikko Rasa [Thu, 4 Feb 2010 17:58:31 +0000 (17:58 +0000)]
Create improvement replacements for BasicLoader* in objectloader.h
Mark the old ones as deprecated

14 years agoAllow overloading keywords with different signatures
Mikko Rasa [Thu, 4 Feb 2010 13:17:48 +0000 (13:17 +0000)]
Allow overloading keywords with different signatures

14 years agoSome more code reformatting
Mikko Rasa [Thu, 4 Feb 2010 11:06:40 +0000 (11:06 +0000)]
Some more code reformatting
Remove an old and incomplete file that was not used for anything

14 years agoRewrite the type system
Mikko Rasa [Thu, 4 Feb 2010 10:18:10 +0000 (10:18 +0000)]
Rewrite the type system
Values are now stored as native types instead of strings
Value stores its signature instead of an arbitary enum value
Statement can now report its signature directly

14 years agoStyle update: add spaces around assignments
Mikko Rasa [Wed, 3 Feb 2010 11:54:06 +0000 (11:54 +0000)]
Style update: add spaces around assignments

14 years agoBump version to 1.1.1 1.1.1
Mikko Rasa [Mon, 21 Sep 2009 16:57:45 +0000 (16:57 +0000)]
Bump version to 1.1.1
Update Build file for upcoming Builder release

15 years agoUse lexical_cast instead of istringstream in Value::get
Mikko Rasa [Mon, 15 Dec 2008 11:49:33 +0000 (11:49 +0000)]
Use lexical_cast instead of istringstream in Value::get

15 years agoAdd Changelog.txt 1.1
Mikko Rasa [Tue, 14 Oct 2008 15:29:05 +0000 (15:29 +0000)]
Add Changelog.txt
Bump version

15 years agoEmit source file markers in compiled files
Mikko Rasa [Sat, 13 Sep 2008 18:03:04 +0000 (18:03 +0000)]
Emit source file markers in compiled files
Use said markers in reporting errors

15 years agoAdd a compile mode to mspdatatool
Mikko Rasa [Fri, 12 Sep 2008 18:58:06 +0000 (18:58 +0000)]
Add a compile mode to mspdatatool

15 years agoMove mspdatatool source to its own directory
Mikko Rasa [Fri, 12 Sep 2008 16:07:50 +0000 (16:07 +0000)]
Move mspdatatool source to its own directory
Add an overload of LoaderFunc1 that passes the statement as-is
Make Loader::load(const Statement &) private since it's called through a base class reference now

15 years agoMove LoaderActions to loaderaction.h
Mikko Rasa [Thu, 11 Sep 2008 19:04:35 +0000 (19:04 +0000)]
Move LoaderActions to loaderaction.h
Add basic loader classes to derive from
Update Loader documentation

15 years agoRemove libpath from mspdatatool build info for correct linking with non-default outdir
Mikko Rasa [Wed, 3 Sep 2008 16:56:56 +0000 (16:56 +0000)]
Remove libpath from mspdatatool build info for correct linking with non-default outdir
Fix a bug where a non-buffered File was passed to Parser

15 years agoImprove and update Readme.txt 1.0
Mikko Rasa [Mon, 11 Aug 2008 17:05:51 +0000 (17:05 +0000)]
Improve and update Readme.txt
Add Readme.txt and License.txt to tarball
Bump version number for release
Update svn:ignore
Remove outdated Makefile

15 years agoRefactor exceptions
Mikko Rasa [Wed, 6 Aug 2008 16:35:21 +0000 (16:35 +0000)]
Refactor exceptions
Attach statement location to exceptions thrown by loading handlers

15 years agoFix EOF handling
Mikko Rasa [Wed, 23 Jul 2008 13:02:32 +0000 (13:02 +0000)]
Fix EOF handling

15 years agoAdd reverse name lookup to Collection
Mikko Rasa [Tue, 22 Jul 2008 15:34:59 +0000 (15:34 +0000)]
Add reverse name lookup to Collection
Make the two-parameter global load function take a reference as the second parameter
Use numeric IDs for short strings in binary mode

15 years agoMore flexible framework for loading substatements with custom loaders
Mikko Rasa [Sun, 13 Jul 2008 00:01:23 +0000 (00:01 +0000)]
More flexible framework for loading substatements with custom loaders

15 years agoFix a memory leak
Mikko Rasa [Tue, 8 Jul 2008 15:23:07 +0000 (15:23 +0000)]
Fix a memory leak

15 years agoAdd back support for stdin/out to datatool
Mikko Rasa [Thu, 26 Jun 2008 10:51:27 +0000 (10:51 +0000)]
Add back support for stdin/out to datatool
Make sure the buffers won't outlive their underlying objects

15 years agoFix gcc 4.3 style warnings
Mikko Rasa [Sun, 8 Jun 2008 15:58:44 +0000 (15:58 +0000)]
Fix gcc 4.3 style warnings

16 years agoAdd an easier way to construct statements for writing
Mikko Rasa [Sun, 9 Mar 2008 01:02:43 +0000 (01:02 +0000)]
Add an easier way to construct statements for writing

16 years agoUse libmspio instead of C++ iostreams
Mikko Rasa [Mon, 4 Feb 2008 15:00:02 +0000 (15:00 +0000)]
Use libmspio instead of C++ iostreams

16 years agoAdd missing virtual destructor to Collection::ItemKeywordBase
Mikko Rasa [Thu, 27 Dec 2007 17:07:35 +0000 (17:07 +0000)]
Add missing virtual destructor to Collection::ItemKeywordBase
Add Loader::finish() to handle finishing actions in an exception-safe way

16 years agoMake use of KeyError's key parameter
Mikko Rasa [Thu, 13 Dec 2007 15:02:57 +0000 (15:02 +0000)]
Make use of KeyError's key parameter

16 years agoBugfixes
Mikko Rasa [Fri, 2 Nov 2007 20:14:36 +0000 (20:14 +0000)]
Bugfixes

16 years agoChange Collection interface to use pointers consistently
Mikko Rasa [Fri, 2 Nov 2007 19:43:21 +0000 (19:43 +0000)]
Change Collection interface to use pointers consistently
Make it possible for creators to return 0 pointers successfully
Add LoaderFunc5

16 years agoAdd Collection::get_list
Mikko Rasa [Thu, 18 Oct 2007 13:43:18 +0000 (13:43 +0000)]
Add Collection::get_list

16 years agoSupport const types with Collection properly
Mikko Rasa [Tue, 16 Oct 2007 19:48:31 +0000 (19:48 +0000)]
Support const types with Collection properly
Delete old action in Loader if a new one replaces it
Add a namespace-scope load function taking an extra argument

16 years agoRemove a stale #include
Mikko Rasa [Mon, 15 Oct 2007 19:42:10 +0000 (19:42 +0000)]
Remove a stale #include

16 years agoAdd Collection
Mikko Rasa [Mon, 15 Oct 2007 14:16:41 +0000 (14:16 +0000)]
Add Collection
Support for loading pointers

16 years agoRename error.h to except.h
Mikko Rasa [Thu, 4 Oct 2007 20:16:17 +0000 (20:16 +0000)]
Rename error.h to except.h
Make datatool support reading from stdin

16 years agoFix binary format
Mikko Rasa [Thu, 27 Sep 2007 20:22:41 +0000 (20:22 +0000)]
Fix binary format
Use c_escape and c_unescape functions from mspstrings

16 years agoAdd Loader::get_source
Mikko Rasa [Sat, 22 Sep 2007 17:04:16 +0000 (17:04 +0000)]
Add Loader::get_source
Add a version of the two-parameter load_sub function that determines the loader class automatically

16 years agoAdd Readme.txt and some other documentation
Mikko Rasa [Mon, 17 Sep 2007 17:09:56 +0000 (17:09 +0000)]
Add Readme.txt and some other documentation

16 years agoAdd binary data format
Mikko Rasa [Mon, 17 Sep 2007 13:58:50 +0000 (13:58 +0000)]
Add binary data format
Add writing support
Add a tool for conversion and validation
Some refactoring

16 years agoSwitch template parameters of load_sub around to allow automatic deduction
Mikko Rasa [Thu, 6 Sep 2007 04:55:45 +0000 (04:55 +0000)]
Switch template parameters of load_sub around to allow automatic deduction

16 years agoFix the n-ary loader
Mikko Rasa [Mon, 3 Sep 2007 14:28:02 +0000 (14:28 +0000)]
Fix the n-ary loader