Compare commits
11 Commits
Author | SHA1 | Date |
---|---|---|
Tomasz Sowa | 3001707c69 | |
Tomasz Sowa | 5814bfca0d | |
Tomasz Sowa | 369cefacdf | |
Tomasz Sowa | 43fbf3b56c | |
Tomasz Sowa | d023abce74 | |
Tomasz Sowa | 3095d2d31f | |
Tomasz Sowa | 08da4a56b8 | |
Tomasz Sowa | cd4d8e025d | |
Tomasz Sowa | a03e3f5d21 | |
Tomasz Sowa | c31c7dfb63 | |
Tomasz Sowa | 0c058d4313 |
|
@ -3,3 +3,12 @@
|
||||||
.settings/
|
.settings/
|
||||||
*.o
|
*.o
|
||||||
*.a
|
*.a
|
||||||
|
.clangd
|
||||||
|
.qtc_clangd/
|
||||||
|
ezc.cflags
|
||||||
|
ezc.config
|
||||||
|
ezc.creator
|
||||||
|
ezc.creator.user
|
||||||
|
ezc.cxxflags
|
||||||
|
ezc.files
|
||||||
|
ezc.includes
|
||||||
|
|
|
@ -1,28 +1,24 @@
|
||||||
Copyright (c) 2007-2016, Tomasz Sowa
|
Copyright (c) 2007-2022, Tomasz Sowa
|
||||||
All rights reserved.
|
All rights reserved.
|
||||||
|
|
||||||
Redistribution and use in source and binary forms, with or without
|
Redistribution and use in source and binary forms, with or without
|
||||||
modification, are permitted provided that the following conditions are met:
|
modification, are permitted provided that the following conditions are met:
|
||||||
|
|
||||||
* Redistributions of source code must retain the above copyright notice,
|
1. Redistributions of source code must retain the above copyright notice,
|
||||||
this list of conditions and the following disclaimer.
|
this list of conditions and the following disclaimer.
|
||||||
|
|
||||||
* Redistributions in binary form must reproduce the above copyright
|
2. Redistributions in binary form must reproduce the above copyright
|
||||||
notice, this list of conditions and the following disclaimer in the
|
notice, this list of conditions and the following disclaimer in the
|
||||||
documentation and/or other materials provided with the distribution.
|
documentation and/or other materials provided with the distribution.
|
||||||
|
|
||||||
* Neither the name Tomasz Sowa nor the names of contributors to this
|
|
||||||
project may be used to endorse or promote products derived
|
|
||||||
from this software without specific prior written permission.
|
|
||||||
|
|
||||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||||
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||||
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||||
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
|
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
|
||||||
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||||
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||||
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||||
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||||
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||||
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
|
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||||
THE POSSIBILITY OF SUCH DAMAGE.
|
POSSIBILITY OF SUCH DAMAGE.
|
|
@ -0,0 +1,25 @@
|
||||||
|
|
||||||
|
|
||||||
|
export CXX
|
||||||
|
export CXXFLAGS
|
||||||
|
export AR
|
||||||
|
|
||||||
|
|
||||||
|
all: src
|
||||||
|
|
||||||
|
|
||||||
|
src: FORCE
|
||||||
|
$(MAKE) -C src
|
||||||
|
|
||||||
|
|
||||||
|
clean: FORCE
|
||||||
|
$(MAKE) -C src clean
|
||||||
|
|
||||||
|
|
||||||
|
depend: FORCE
|
||||||
|
$(MAKE) -C src depend
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
FORCE:
|
||||||
|
|
46
src/Makefile
46
src/Makefile
|
@ -1,39 +1,45 @@
|
||||||
include Makefile.o.dep
|
sourcefiles:=$(shell find . -name "*.cpp")
|
||||||
|
objfiles:=$(patsubst %.cpp,%.o,$(sourcefiles))
|
||||||
|
|
||||||
libname=ezc.a
|
|
||||||
|
|
||||||
ifndef GLOBAL_WORKING_DIR
|
|
||||||
GLOBAL_WORKING_DIR := $(shell pwd)/../..
|
ifndef CXX
|
||||||
|
CXX = g++
|
||||||
endif
|
endif
|
||||||
|
|
||||||
current_path := $(shell pwd)
|
ifndef CXXFLAGS
|
||||||
global_relative_working_dir := $(shell relative_path $(current_path) $(GLOBAL_WORKING_DIR))
|
CXXFLAGS = -Wall -pedantic -O2 -std=c++20 -I../../pikotools/src -I/usr/local/include
|
||||||
|
endif
|
||||||
|
|
||||||
|
ifndef AR
|
||||||
|
AR = ar
|
||||||
|
endif
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
libname = ezc.a
|
||||||
|
|
||||||
|
|
||||||
all: $(libname)
|
all: $(libname)
|
||||||
|
|
||||||
$(libname): $(o)
|
|
||||||
ar rcs $(libname) $(o)
|
|
||||||
|
|
||||||
|
|
||||||
|
$(libname): $(objfiles)
|
||||||
|
$(AR) rcs $(libname) $(objfiles)
|
||||||
|
|
||||||
|
|
||||||
%.o: %.cpp
|
%.o: %.cpp
|
||||||
$(CXX) -c $(CXXFLAGS) -I$(GLOBAL_WORKING_DIR)/pikotools/src $<
|
$(CXX) -c $(CXXFLAGS) -o $@ $<
|
||||||
|
|
||||||
|
|
||||||
depend:
|
|
||||||
# !! IMPROVE ME
|
|
||||||
# as Ezc is a different project we rather shoudn't use '-I$(global_relative_working_dir)/pikotools' here?
|
|
||||||
makedepend -Y. -I$(global_relative_working_dir)/pikotools/src -f- *.cpp > Makefile.dep
|
|
||||||
echo -n "o = " > Makefile.o.dep
|
|
||||||
ls -1 *.cpp | xargs -I foo echo -n foo " " | sed -E "s/([^\.]*)\.cpp[ ]/\1\.o/g" >> Makefile.o.dep
|
|
||||||
|
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm -f *.o
|
rm -f $(objfiles)
|
||||||
rm -f $(libname)
|
rm -f $(libname)
|
||||||
|
|
||||||
|
|
||||||
include Makefile.dep
|
depend:
|
||||||
|
makedepend -Y. -I../../pikotools/src -f- $(sourcefiles) > Makefile.dep
|
||||||
|
|
||||||
|
|
||||||
|
-include Makefile.dep
|
||||||
|
|
||||||
|
|
104
src/Makefile.dep
104
src/Makefile.dep
|
@ -1,66 +1,42 @@
|
||||||
# DO NOT DELETE
|
# DO NOT DELETE
|
||||||
|
|
||||||
blocks.o: blocks.h item.h cache.h functions.h ../../pikotools/src/utf8/utf8.h
|
./blocks.o: blocks.h item.h cache.h functions.h
|
||||||
blocks.o: ../../pikotools/src/textstream/stream.h
|
./blocks.o: ../../pikotools/src/utf8/utf8.h
|
||||||
blocks.o: ../../pikotools/src/utf8/utf8_templates.h
|
./blocks.o: ../../pikotools/src/textstream/stream.h
|
||||||
blocks.o: ../../pikotools/src/utf8/utf8_private.h env.h var.h
|
./blocks.o: ../../pikotools/src/utf8/utf8_templates.h
|
||||||
blocks.o: ../../pikotools/src/date/date.h
|
./blocks.o: ../../pikotools/src/utf8/utf8_private.h funinfo.h objects.h
|
||||||
blocks.o: ../../pikotools/src/convert/inttostr.h
|
./cache.o: cache.h item.h functions.h ../../pikotools/src/utf8/utf8.h
|
||||||
blocks.o: ../../pikotools/src/textstream/textstream.h
|
./cache.o: ../../pikotools/src/textstream/stream.h
|
||||||
blocks.o: ../../pikotools/src/textstream/stream.h
|
./cache.o: ../../pikotools/src/utf8/utf8_templates.h
|
||||||
blocks.o: ../../pikotools/src/space/space.h
|
./cache.o: ../../pikotools/src/utf8/utf8_private.h funinfo.h objects.h
|
||||||
blocks.o: ../../pikotools/src/textstream/types.h
|
./cache.o: blocks.h
|
||||||
blocks.o: ../../pikotools/src/membuffer/membuffer.h
|
./item.o: item.h
|
||||||
blocks.o: ../../pikotools/src/textstream/types.h
|
./pattern.o: pattern.h item.h cache.h functions.h
|
||||||
blocks.o: ../../pikotools/src/utf8/utf8_stream.h objects.h
|
./pattern.o: ../../pikotools/src/utf8/utf8.h
|
||||||
cache.o: cache.h item.h functions.h ../../pikotools/src/utf8/utf8.h
|
./pattern.o: ../../pikotools/src/textstream/stream.h
|
||||||
cache.o: ../../pikotools/src/textstream/stream.h
|
./pattern.o: ../../pikotools/src/utf8/utf8_templates.h
|
||||||
cache.o: ../../pikotools/src/utf8/utf8_templates.h
|
./pattern.o: ../../pikotools/src/utf8/utf8_private.h funinfo.h objects.h
|
||||||
cache.o: ../../pikotools/src/utf8/utf8_private.h env.h var.h
|
./pattern.o: blocks.h
|
||||||
cache.o: ../../pikotools/src/date/date.h
|
./patternparser.o: patternparser.h blocks.h item.h cache.h functions.h
|
||||||
cache.o: ../../pikotools/src/convert/inttostr.h
|
./patternparser.o: ../../pikotools/src/utf8/utf8.h
|
||||||
cache.o: ../../pikotools/src/textstream/textstream.h
|
./patternparser.o: ../../pikotools/src/textstream/stream.h
|
||||||
cache.o: ../../pikotools/src/textstream/stream.h
|
./patternparser.o: ../../pikotools/src/utf8/utf8_templates.h
|
||||||
cache.o: ../../pikotools/src/space/space.h
|
./patternparser.o: ../../pikotools/src/utf8/utf8_private.h funinfo.h
|
||||||
cache.o: ../../pikotools/src/textstream/types.h
|
./patternparser.o: objects.h pattern.h ../../pikotools/src/log/log.h
|
||||||
cache.o: ../../pikotools/src/membuffer/membuffer.h
|
./patternparser.o: ../../pikotools/src/textstream/textstream.h
|
||||||
cache.o: ../../pikotools/src/textstream/types.h
|
./patternparser.o: ../../pikotools/src/textstream/stream.h
|
||||||
cache.o: ../../pikotools/src/utf8/utf8_stream.h objects.h blocks.h
|
./patternparser.o: ../../pikotools/src/space/space.h
|
||||||
item.o: item.h
|
./patternparser.o: ../../pikotools/src/textstream/types.h
|
||||||
pattern.o: pattern.h item.h cache.h functions.h
|
./patternparser.o: ../../pikotools/src/convert/inttostr.h
|
||||||
pattern.o: ../../pikotools/src/utf8/utf8.h
|
./patternparser.o: ../../pikotools/src/date/date.h
|
||||||
pattern.o: ../../pikotools/src/textstream/stream.h
|
./patternparser.o: ../../pikotools/src/membuffer/membuffer.h
|
||||||
pattern.o: ../../pikotools/src/utf8/utf8_templates.h
|
./patternparser.o: ../../pikotools/src/textstream/types.h
|
||||||
pattern.o: ../../pikotools/src/utf8/utf8_private.h env.h var.h
|
./patternparser.o: ../../pikotools/src/log/filelog.h
|
||||||
pattern.o: ../../pikotools/src/date/date.h
|
./patternparser.o: ../../pikotools/src/convert/convert.h
|
||||||
pattern.o: ../../pikotools/src/convert/inttostr.h
|
./patternparser.o: ../../pikotools/src/convert/inttostr.h
|
||||||
pattern.o: ../../pikotools/src/textstream/textstream.h
|
./patternparser.o: ../../pikotools/src/convert/patternreplacer.h
|
||||||
pattern.o: ../../pikotools/src/textstream/stream.h
|
./patternparser.o: ../../pikotools/src/convert/strtoint.h
|
||||||
pattern.o: ../../pikotools/src/space/space.h
|
./patternparser.o: ../../pikotools/src/convert/text.h
|
||||||
pattern.o: ../../pikotools/src/textstream/types.h
|
./patternparser.o: ../../pikotools/src/convert/misc.h
|
||||||
pattern.o: ../../pikotools/src/membuffer/membuffer.h
|
./patternparser.o: ../../pikotools/src/convert/double.h
|
||||||
pattern.o: ../../pikotools/src/textstream/types.h
|
./models.o: models.h
|
||||||
pattern.o: ../../pikotools/src/utf8/utf8_stream.h objects.h blocks.h
|
|
||||||
patternparser.o: patternparser.h blocks.h item.h cache.h functions.h
|
|
||||||
patternparser.o: ../../pikotools/src/utf8/utf8.h
|
|
||||||
patternparser.o: ../../pikotools/src/textstream/stream.h
|
|
||||||
patternparser.o: ../../pikotools/src/utf8/utf8_templates.h
|
|
||||||
patternparser.o: ../../pikotools/src/utf8/utf8_private.h env.h var.h
|
|
||||||
patternparser.o: ../../pikotools/src/date/date.h
|
|
||||||
patternparser.o: ../../pikotools/src/convert/inttostr.h
|
|
||||||
patternparser.o: ../../pikotools/src/textstream/textstream.h
|
|
||||||
patternparser.o: ../../pikotools/src/textstream/stream.h
|
|
||||||
patternparser.o: ../../pikotools/src/space/space.h
|
|
||||||
patternparser.o: ../../pikotools/src/textstream/types.h
|
|
||||||
patternparser.o: ../../pikotools/src/membuffer/membuffer.h
|
|
||||||
patternparser.o: ../../pikotools/src/textstream/types.h
|
|
||||||
patternparser.o: ../../pikotools/src/utf8/utf8_stream.h objects.h pattern.h
|
|
||||||
patternparser.o: ../../pikotools/src/log/log.h
|
|
||||||
patternparser.o: ../../pikotools/src/log/filelog.h
|
|
||||||
patternparser.o: ../../pikotools/src/convert/convert.h
|
|
||||||
patternparser.o: ../../pikotools/src/convert/inttostr.h
|
|
||||||
patternparser.o: ../../pikotools/src/convert/patternreplacer.h
|
|
||||||
patternparser.o: ../../pikotools/src/convert/strtoint.h
|
|
||||||
patternparser.o: ../../pikotools/src/convert/text.h
|
|
||||||
patternparser.o: ../../pikotools/src/convert/misc.h
|
|
||||||
patternparser.o: ../../pikotools/src/convert/double.h
|
|
||||||
|
|
|
@ -1 +0,0 @@
|
||||||
o = blocks.o cache.o item.o pattern.o patternparser.o
|
|
|
@ -1,38 +1,35 @@
|
||||||
/*
|
/*
|
||||||
* This file is a part of EZC -- Easy templating in C++ library
|
* This file is a part of EZC -- Easy templating in C++ library
|
||||||
* and is distributed under the BSD 3-Clause licence.
|
* and is distributed under the 2-Clause BSD licence.
|
||||||
* Author: Tomasz Sowa <t.sowa@ttmath.org>
|
* Author: Tomasz Sowa <t.sowa@ttmath.org>
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2014-2021, Tomasz Sowa
|
* Copyright (c) 2014, Tomasz Sowa
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
* modification, are permitted provided that the following conditions are met:
|
* modification, are permitted provided that the following conditions are met:
|
||||||
*
|
*
|
||||||
* * Redistributions of source code must retain the above copyright notice,
|
* 1. Redistributions of source code must retain the above copyright notice,
|
||||||
* this list of conditions and the following disclaimer.
|
* this list of conditions and the following disclaimer.
|
||||||
*
|
*
|
||||||
* * Redistributions in binary form must reproduce the above copyright
|
* 2. Redistributions in binary form must reproduce the above copyright
|
||||||
* notice, this list of conditions and the following disclaimer in the
|
* notice, this list of conditions and the following disclaimer in the
|
||||||
* documentation and/or other materials provided with the distribution.
|
* documentation and/or other materials provided with the distribution.
|
||||||
*
|
|
||||||
* * Neither the name Tomasz Sowa nor the names of contributors to this
|
|
||||||
* project may be used to endorse or promote products derived
|
|
||||||
* from this software without specific prior written permission.
|
|
||||||
*
|
*
|
||||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||||
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
|
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
|
||||||
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||||
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||||
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||||
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
|
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||||
* THE POSSIBILITY OF SUCH DAMAGE.
|
* POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "blocks.h"
|
#include "blocks.h"
|
||||||
|
@ -90,12 +87,10 @@ void Blocks::ClearCache()
|
||||||
|
|
||||||
void Blocks::CacheBlocks(Blocks & blocks)
|
void Blocks::CacheBlocks(Blocks & blocks)
|
||||||
{
|
{
|
||||||
/*
|
|
||||||
BlocksTable::iterator i = blocks_tab.begin();
|
BlocksTable::iterator i = blocks_tab.begin();
|
||||||
|
|
||||||
for( ; i != blocks_tab.end() ; ++i)
|
for( ; i != blocks_tab.end() ; ++i)
|
||||||
Cache(blocks, i->second);
|
Cache(blocks, i->second);
|
||||||
*/
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
23
src/blocks.h
23
src/blocks.h
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
* This file is a part of EZC -- Easy templating in C++ library
|
* This file is a part of EZC -- Easy templating in C++ library
|
||||||
* and is distributed under the BSD 3-Clause licence.
|
* and is distributed under the 2-Clause BSD licence.
|
||||||
* Author: Tomasz Sowa <t.sowa@ttmath.org>
|
* Author: Tomasz Sowa <t.sowa@ttmath.org>
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -11,28 +11,25 @@
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
* modification, are permitted provided that the following conditions are met:
|
* modification, are permitted provided that the following conditions are met:
|
||||||
*
|
*
|
||||||
* * Redistributions of source code must retain the above copyright notice,
|
* 1. Redistributions of source code must retain the above copyright notice,
|
||||||
* this list of conditions and the following disclaimer.
|
* this list of conditions and the following disclaimer.
|
||||||
*
|
*
|
||||||
* * Redistributions in binary form must reproduce the above copyright
|
* 2. Redistributions in binary form must reproduce the above copyright
|
||||||
* notice, this list of conditions and the following disclaimer in the
|
* notice, this list of conditions and the following disclaimer in the
|
||||||
* documentation and/or other materials provided with the distribution.
|
* documentation and/or other materials provided with the distribution.
|
||||||
*
|
|
||||||
* * Neither the name Tomasz Sowa nor the names of contributors to this
|
|
||||||
* project may be used to endorse or promote products derived
|
|
||||||
* from this software without specific prior written permission.
|
|
||||||
*
|
*
|
||||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||||
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
|
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
|
||||||
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||||
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||||
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||||
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
|
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||||
* THE POSSIBILITY OF SUCH DAMAGE.
|
* POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef headerfile_ezc_blocks
|
#ifndef headerfile_ezc_blocks
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
* This file is a part of EZC -- Easy templating in C++ library
|
* This file is a part of EZC -- Easy templating in C++ library
|
||||||
* and is distributed under the BSD 3-Clause licence.
|
* and is distributed under the 2-Clause BSD licence.
|
||||||
* Author: Tomasz Sowa <t.sowa@ttmath.org>
|
* Author: Tomasz Sowa <t.sowa@ttmath.org>
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -10,29 +10,26 @@
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
* modification, are permitted provided that the following conditions are met:
|
* modification, are permitted provided that the following conditions are met:
|
||||||
*
|
*
|
||||||
* * Redistributions of source code must retain the above copyright notice,
|
* 1. Redistributions of source code must retain the above copyright notice,
|
||||||
* this list of conditions and the following disclaimer.
|
* this list of conditions and the following disclaimer.
|
||||||
*
|
*
|
||||||
* * Redistributions in binary form must reproduce the above copyright
|
* 2. Redistributions in binary form must reproduce the above copyright
|
||||||
* notice, this list of conditions and the following disclaimer in the
|
* notice, this list of conditions and the following disclaimer in the
|
||||||
* documentation and/or other materials provided with the distribution.
|
* documentation and/or other materials provided with the distribution.
|
||||||
*
|
|
||||||
* * Neither the name Tomasz Sowa nor the names of contributors to this
|
|
||||||
* project may be used to endorse or promote products derived
|
|
||||||
* from this software without specific prior written permission.
|
|
||||||
*
|
*
|
||||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||||
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
|
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
|
||||||
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||||
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||||
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||||
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
|
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||||
* THE POSSIBILITY OF SUCH DAMAGE.
|
* POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "cache.h"
|
#include "cache.h"
|
||||||
|
@ -43,7 +40,7 @@
|
||||||
namespace Ezc
|
namespace Ezc
|
||||||
{
|
{
|
||||||
|
|
||||||
/*
|
|
||||||
void Cache(Blocks & blocks, Item::Function & function)
|
void Cache(Blocks & blocks, Item::Function & function)
|
||||||
{
|
{
|
||||||
function.item_block = 0;
|
function.item_block = 0;
|
||||||
|
@ -69,7 +66,7 @@ void Cache(Blocks & blocks, Item & item)
|
||||||
for(size_t i=0; i < item.item_tab.size() ; ++i)
|
for(size_t i=0; i < item.item_tab.size() ; ++i)
|
||||||
Cache(blocks, *item.item_tab[i]);
|
Cache(blocks, *item.item_tab[i]);
|
||||||
}
|
}
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
31
src/cache.h
31
src/cache.h
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
* This file is a part of EZC -- Easy templating in C++ library
|
* This file is a part of EZC -- Easy templating in C++ library
|
||||||
* and is distributed under the BSD 3-Clause licence.
|
* and is distributed under the 2-Clause BSD licence.
|
||||||
* Author: Tomasz Sowa <t.sowa@ttmath.org>
|
* Author: Tomasz Sowa <t.sowa@ttmath.org>
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -10,29 +10,26 @@
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
* modification, are permitted provided that the following conditions are met:
|
* modification, are permitted provided that the following conditions are met:
|
||||||
*
|
*
|
||||||
* * Redistributions of source code must retain the above copyright notice,
|
* 1. Redistributions of source code must retain the above copyright notice,
|
||||||
* this list of conditions and the following disclaimer.
|
* this list of conditions and the following disclaimer.
|
||||||
*
|
*
|
||||||
* * Redistributions in binary form must reproduce the above copyright
|
* 2. Redistributions in binary form must reproduce the above copyright
|
||||||
* notice, this list of conditions and the following disclaimer in the
|
* notice, this list of conditions and the following disclaimer in the
|
||||||
* documentation and/or other materials provided with the distribution.
|
* documentation and/or other materials provided with the distribution.
|
||||||
*
|
|
||||||
* * Neither the name Tomasz Sowa nor the names of contributors to this
|
|
||||||
* project may be used to endorse or promote products derived
|
|
||||||
* from this software without specific prior written permission.
|
|
||||||
*
|
*
|
||||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||||
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
|
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
|
||||||
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||||
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||||
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||||
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
|
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||||
* THE POSSIBILITY OF SUCH DAMAGE.
|
* POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
@ -51,7 +48,7 @@ namespace Ezc
|
||||||
|
|
||||||
class Blocks;
|
class Blocks;
|
||||||
|
|
||||||
/*
|
|
||||||
template<class StreamType>
|
template<class StreamType>
|
||||||
void Cache(Functions<StreamType> & fun, Item::Function & function)
|
void Cache(Functions<StreamType> & fun, Item::Function & function)
|
||||||
{
|
{
|
||||||
|
@ -114,7 +111,7 @@ void Cache(Objects<StreamType> & objects, Item & item)
|
||||||
for(size_t i=0; i < item.item_tab.size() ; ++i)
|
for(size_t i=0; i < item.item_tab.size() ; ++i)
|
||||||
Cache(objects, *item.item_tab[i]);
|
Cache(objects, *item.item_tab[i]);
|
||||||
}
|
}
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
} // namespace Ezc
|
} // namespace Ezc
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
* This file is a part of EZC -- Easy templating in C++ library
|
* This file is a part of EZC -- Easy templating in C++ library
|
||||||
* and is distributed under the BSD 3-Clause licence.
|
* and is distributed under the 2-Clause BSD licence.
|
||||||
* Author: Tomasz Sowa <t.sowa@ttmath.org>
|
* Author: Tomasz Sowa <t.sowa@ttmath.org>
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -11,28 +11,25 @@
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
* modification, are permitted provided that the following conditions are met:
|
* modification, are permitted provided that the following conditions are met:
|
||||||
*
|
*
|
||||||
* * Redistributions of source code must retain the above copyright notice,
|
* 1. Redistributions of source code must retain the above copyright notice,
|
||||||
* this list of conditions and the following disclaimer.
|
* this list of conditions and the following disclaimer.
|
||||||
*
|
*
|
||||||
* * Redistributions in binary form must reproduce the above copyright
|
* 2. Redistributions in binary form must reproduce the above copyright
|
||||||
* notice, this list of conditions and the following disclaimer in the
|
* notice, this list of conditions and the following disclaimer in the
|
||||||
* documentation and/or other materials provided with the distribution.
|
* documentation and/or other materials provided with the distribution.
|
||||||
*
|
|
||||||
* * Neither the name Tomasz Sowa nor the names of contributors to this
|
|
||||||
* project may be used to endorse or promote products derived
|
|
||||||
* from this software without specific prior written permission.
|
|
||||||
*
|
*
|
||||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||||
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
|
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
|
||||||
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||||
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||||
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||||
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
|
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||||
* THE POSSIBILITY OF SUCH DAMAGE.
|
* POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
|
30
src/ezc.h
30
src/ezc.h
|
@ -1,44 +1,42 @@
|
||||||
/*
|
/*
|
||||||
* This file is a part of EZC -- Easy templating in C++ library
|
* This file is a part of EZC -- Easy templating in C++ library
|
||||||
* and is distributed under the BSD 3-Clause licence.
|
* and is distributed under the 2-Clause BSD licence.
|
||||||
* Author: Tomasz Sowa <t.sowa@ttmath.org>
|
* Author: Tomasz Sowa <t.sowa@ttmath.org>
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2007-2014, Tomasz Sowa
|
* Copyright (c) 2007-2022, Tomasz Sowa
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
* modification, are permitted provided that the following conditions are met:
|
* modification, are permitted provided that the following conditions are met:
|
||||||
*
|
*
|
||||||
* * Redistributions of source code must retain the above copyright notice,
|
* 1. Redistributions of source code must retain the above copyright notice,
|
||||||
* this list of conditions and the following disclaimer.
|
* this list of conditions and the following disclaimer.
|
||||||
*
|
*
|
||||||
* * Redistributions in binary form must reproduce the above copyright
|
* 2. Redistributions in binary form must reproduce the above copyright
|
||||||
* notice, this list of conditions and the following disclaimer in the
|
* notice, this list of conditions and the following disclaimer in the
|
||||||
* documentation and/or other materials provided with the distribution.
|
* documentation and/or other materials provided with the distribution.
|
||||||
*
|
|
||||||
* * Neither the name Tomasz Sowa nor the names of contributors to this
|
|
||||||
* project may be used to endorse or promote products derived
|
|
||||||
* from this software without specific prior written permission.
|
|
||||||
*
|
*
|
||||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||||
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
|
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
|
||||||
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||||
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||||
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||||
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
|
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||||
* THE POSSIBILITY OF SUCH DAMAGE.
|
* POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
#ifndef headerfile_ezc_ezc
|
#ifndef headerfile_ezc_ezc
|
||||||
#define headerfile_ezc_ezc
|
#define headerfile_ezc_ezc
|
||||||
|
|
||||||
|
#include "version.h"
|
||||||
#include "generator.h"
|
#include "generator.h"
|
||||||
#include "patternparser.h"
|
#include "patternparser.h"
|
||||||
|
|
||||||
|
|
|
@ -1,38 +1,35 @@
|
||||||
/*
|
/*
|
||||||
* This file is a part of EZC -- Easy templating in C++ library
|
* This file is a part of EZC -- Easy templating in C++ library
|
||||||
* and is distributed under the BSD 3-Clause licence.
|
* and is distributed under the 2-Clause BSD licence.
|
||||||
* Author: Tomasz Sowa <t.sowa@ttmath.org>
|
* Author: Tomasz Sowa <t.sowa@ttmath.org>
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2007-2021, Tomasz Sowa
|
* Copyright (c) 2007-2015, Tomasz Sowa
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
* modification, are permitted provided that the following conditions are met:
|
* modification, are permitted provided that the following conditions are met:
|
||||||
*
|
*
|
||||||
* * Redistributions of source code must retain the above copyright notice,
|
* 1. Redistributions of source code must retain the above copyright notice,
|
||||||
* this list of conditions and the following disclaimer.
|
* this list of conditions and the following disclaimer.
|
||||||
*
|
*
|
||||||
* * Redistributions in binary form must reproduce the above copyright
|
* 2. Redistributions in binary form must reproduce the above copyright
|
||||||
* notice, this list of conditions and the following disclaimer in the
|
* notice, this list of conditions and the following disclaimer in the
|
||||||
* documentation and/or other materials provided with the distribution.
|
* documentation and/or other materials provided with the distribution.
|
||||||
*
|
|
||||||
* * Neither the name Tomasz Sowa nor the names of contributors to this
|
|
||||||
* project may be used to endorse or promote products derived
|
|
||||||
* from this software without specific prior written permission.
|
|
||||||
*
|
*
|
||||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||||
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
|
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
|
||||||
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||||
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||||
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||||
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
|
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||||
* THE POSSIBILITY OF SUCH DAMAGE.
|
* POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef headerfile_ezc_functions
|
#ifndef headerfile_ezc_functions
|
||||||
|
@ -40,7 +37,7 @@
|
||||||
|
|
||||||
#include <map>
|
#include <map>
|
||||||
#include "utf8/utf8.h"
|
#include "utf8/utf8.h"
|
||||||
#include "env.h"
|
#include "funinfo.h"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -56,7 +53,7 @@ class Functions
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
|
||||||
typedef void (*UserFunction)(Env<StreamType> &);
|
typedef void (*UserFunction)(FunInfo<StreamType> &);
|
||||||
typedef std::map<std::wstring, UserFunction> FunctionsTable;
|
typedef std::map<std::wstring, UserFunction> FunctionsTable;
|
||||||
typedef typename FunctionsTable::iterator Iterator;
|
typedef typename FunctionsTable::iterator Iterator;
|
||||||
|
|
||||||
|
|
|
@ -1,58 +1,74 @@
|
||||||
/*
|
/*
|
||||||
* This file is a part of EZC -- Easy templating in C++ library
|
* This file is a part of EZC -- Easy templating in C++ library
|
||||||
* and is distributed under the BSD 3-Clause licence.
|
* and is distributed under the 2-Clause BSD licence.
|
||||||
* Author: Tomasz Sowa <t.sowa@ttmath.org>
|
* Author: Tomasz Sowa <t.sowa@ttmath.org>
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2007-2021, Tomasz Sowa
|
* Copyright (c) 2007-2023, Tomasz Sowa
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
* modification, are permitted provided that the following conditions are met:
|
* modification, are permitted provided that the following conditions are met:
|
||||||
*
|
*
|
||||||
* * Redistributions of source code must retain the above copyright notice,
|
* 1. Redistributions of source code must retain the above copyright notice,
|
||||||
* this list of conditions and the following disclaimer.
|
* this list of conditions and the following disclaimer.
|
||||||
*
|
*
|
||||||
* * Redistributions in binary form must reproduce the above copyright
|
* 2. Redistributions in binary form must reproduce the above copyright
|
||||||
* notice, this list of conditions and the following disclaimer in the
|
* notice, this list of conditions and the following disclaimer in the
|
||||||
* documentation and/or other materials provided with the distribution.
|
* documentation and/or other materials provided with the distribution.
|
||||||
*
|
|
||||||
* * Neither the name Tomasz Sowa nor the names of contributors to this
|
|
||||||
* project may be used to endorse or promote products derived
|
|
||||||
* from this software without specific prior written permission.
|
|
||||||
*
|
*
|
||||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||||
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
|
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
|
||||||
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||||
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||||
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||||
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
|
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||||
* THE POSSIBILITY OF SUCH DAMAGE.
|
* POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
#ifndef headerfile_ezc_env
|
#ifndef headerfile_ezc_funinfo
|
||||||
#define headerfile_ezc_env
|
#define headerfile_ezc_funinfo
|
||||||
|
|
||||||
#include <vector>
|
#include <vector>
|
||||||
#include <map>
|
#include <map>
|
||||||
#include "item.h"
|
#include "item.h"
|
||||||
#include "modelcontainerwrapper.h"
|
|
||||||
#include "var.h"
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
namespace Ezc
|
namespace Ezc
|
||||||
{
|
{
|
||||||
|
|
||||||
|
/*
|
||||||
|
a variable
|
||||||
|
*/
|
||||||
|
struct Var
|
||||||
|
{
|
||||||
|
/*
|
||||||
|
* if true then means 'str' is a function name and should be called (res is ignored)
|
||||||
|
*
|
||||||
|
* if false then means 'str' is a string value and res is a boolean value
|
||||||
|
*/
|
||||||
|
bool is_function;
|
||||||
|
|
||||||
|
std::wstring str; // a string value
|
||||||
|
bool res; // a boolean value
|
||||||
|
|
||||||
|
Var()
|
||||||
|
{
|
||||||
|
res = false;
|
||||||
|
is_function = false;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
//typedef std::map<std::wstring, Var<StreamType>> Vars;
|
typedef std::map<std::wstring, Var> Vars;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -124,27 +140,30 @@ struct Stack
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
// !! IMPROVE ME
|
||||||
|
// the name is bad
|
||||||
|
// may it should be called Env (environment) or FunEnv
|
||||||
template<class StreamType>
|
template<class StreamType>
|
||||||
struct Env
|
struct FunInfo
|
||||||
{
|
{
|
||||||
// an alias to res.stream
|
// a result consists of a string and a boolean value
|
||||||
|
// output stream
|
||||||
StreamType & out;
|
StreamType & out;
|
||||||
|
// return value from a user's function (default false if not set directly by the function)
|
||||||
// result
|
bool res;
|
||||||
Var<StreamType> & res;
|
|
||||||
|
|
||||||
// table of parameters
|
// table of parameters
|
||||||
// the table can be empty
|
// the table can be empty
|
||||||
std::vector<Var<StreamType>> & params;
|
std::vector<Var> & params;
|
||||||
|
|
||||||
// the first parameter
|
// the first parameter
|
||||||
// you can always use it even if there are not any parameters (params is empty)
|
// you can always use it even if there are not any parameters (params is empty)
|
||||||
// in such a way the reference points to an empty string
|
// in such a way the reference points to an empty string
|
||||||
//const std::wstring & par;
|
const std::wstring & par;
|
||||||
|
|
||||||
// an input stream used in [filter] statement
|
// an input stream used in [filter] statement
|
||||||
// and when methods/functions are chained
|
// if there is other statement than [filter] then this is an empty stream
|
||||||
Var<StreamType> & in;
|
const StreamType & in;
|
||||||
|
|
||||||
// indicates that this function is from [for ...] statement
|
// indicates that this function is from [for ...] statement
|
||||||
bool is_for;
|
bool is_for;
|
||||||
|
@ -182,23 +201,26 @@ struct Env
|
||||||
// for other statements than [for] this is always zero
|
// for other statements than [for] this is always zero
|
||||||
size_t iter;
|
size_t iter;
|
||||||
|
|
||||||
//
|
// an item from the tree
|
||||||
const Item & item;
|
const Item & item;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Env(Var<StreamType> & result,
|
// arguments: output_stream, table_of_parameters, the_first_parameter
|
||||||
std::vector<Var<StreamType>> & pars,
|
FunInfo(StreamType & o,
|
||||||
Var<StreamType> & input_stream,
|
std::vector<Var> & pars,
|
||||||
Stack & s,
|
const std::wstring & first_par,
|
||||||
const Item & item_) : out(result.stream), res(result), params(pars), in(input_stream), stack(s), item(item_)
|
const StreamType & input_stream,
|
||||||
|
Stack & s,
|
||||||
|
const Item & item_) : out(o), params(pars), par(first_par), in(input_stream), stack(s), item(item_)
|
||||||
{
|
{
|
||||||
clear();
|
Clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void clear()
|
void Clear()
|
||||||
{
|
{
|
||||||
|
res = false; // result is false by default
|
||||||
is_for = false;
|
is_for = false;
|
||||||
is_if = false;
|
is_if = false;
|
||||||
is_if_def = false;
|
is_if_def = false;
|
||||||
|
@ -206,10 +228,70 @@ struct Env
|
||||||
is_normal = false;
|
is_normal = false;
|
||||||
is_filter = false;
|
is_filter = false;
|
||||||
iter = 0;
|
iter = 0;
|
||||||
stack_tab = nullptr;
|
stack_tab = 0;
|
||||||
stack_index = 0;
|
stack_index = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* CHECK ME can it be done only for [for] statements?
|
||||||
|
*
|
||||||
|
* can return a null pointer if there is no such an item on the stack
|
||||||
|
*
|
||||||
|
* add a function with const wchar_t *
|
||||||
|
*/
|
||||||
|
Stack * FindLastFor(const std::wstring & name)
|
||||||
|
{
|
||||||
|
for(size_t i = stack_index ; i > 0 ; --i)
|
||||||
|
{
|
||||||
|
if( stack_tab[i-1].is_for && stack_tab[i-1].item->has_function )
|
||||||
|
{
|
||||||
|
if( stack_tab[i-1].item->function.name == name )
|
||||||
|
{
|
||||||
|
return &stack_tab[i-1];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Stack * FindLastFor(const std::wstring & name, const std::wstring & postfix)
|
||||||
|
{
|
||||||
|
for(size_t i = stack_index ; i > 0 ; --i)
|
||||||
|
{
|
||||||
|
if( stack_tab[i-1].is_for && stack_tab[i-1].item->has_function )
|
||||||
|
{
|
||||||
|
if( stack_tab[i-1].item->function.name == name && stack_tab[i-1].item->function.postfix == postfix )
|
||||||
|
{
|
||||||
|
return &stack_tab[i-1];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
template<class FunUserObject>
|
||||||
|
FunUserObject * FindUserObject(const std::wstring & function_name, Stack ** ezc_stack = 0)
|
||||||
|
{
|
||||||
|
Stack * stack;
|
||||||
|
|
||||||
|
if( item.has_function && item.function.is_function )
|
||||||
|
stack = FindLastFor(function_name, item.function.postfix);
|
||||||
|
else
|
||||||
|
stack = FindLastFor(function_name);
|
||||||
|
|
||||||
|
if( ezc_stack )
|
||||||
|
*ezc_stack = stack;
|
||||||
|
|
||||||
|
if( stack && stack->fun_data )
|
||||||
|
return dynamic_cast<FunUserObject*>(stack->fun_data);
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
1763
src/generator.h
1763
src/generator.h
File diff suppressed because it is too large
Load Diff
37
src/item.cpp
37
src/item.cpp
|
@ -1,38 +1,35 @@
|
||||||
/*
|
/*
|
||||||
* This file is a part of EZC -- Easy templating in C++ library
|
* This file is a part of EZC -- Easy templating in C++ library
|
||||||
* and is distributed under the BSD 3-Clause licence.
|
* and is distributed under the 2-Clause BSD licence.
|
||||||
* Author: Tomasz Sowa <t.sowa@ttmath.org>
|
* Author: Tomasz Sowa <t.sowa@ttmath.org>
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2007-2021, Tomasz Sowa
|
* Copyright (c) 2007-2018, Tomasz Sowa
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
* modification, are permitted provided that the following conditions are met:
|
* modification, are permitted provided that the following conditions are met:
|
||||||
*
|
*
|
||||||
* * Redistributions of source code must retain the above copyright notice,
|
* 1. Redistributions of source code must retain the above copyright notice,
|
||||||
* this list of conditions and the following disclaimer.
|
* this list of conditions and the following disclaimer.
|
||||||
*
|
*
|
||||||
* * Redistributions in binary form must reproduce the above copyright
|
* 2. Redistributions in binary form must reproduce the above copyright
|
||||||
* notice, this list of conditions and the following disclaimer in the
|
* notice, this list of conditions and the following disclaimer in the
|
||||||
* documentation and/or other materials provided with the distribution.
|
* documentation and/or other materials provided with the distribution.
|
||||||
*
|
|
||||||
* * Neither the name Tomasz Sowa nor the names of contributors to this
|
|
||||||
* project may be used to endorse or promote products derived
|
|
||||||
* from this software without specific prior written permission.
|
|
||||||
*
|
*
|
||||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||||
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
|
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
|
||||||
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||||
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||||
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||||
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
|
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||||
* THE POSSIBILITY OF SUCH DAMAGE.
|
* POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
@ -168,10 +165,10 @@ Item::~Item()
|
||||||
|
|
||||||
void Item::ClearCache(Item::Function & function)
|
void Item::ClearCache(Item::Function & function)
|
||||||
{
|
{
|
||||||
// function.base_obj = 0;
|
function.base_obj = 0;
|
||||||
// function.method_index = -1;
|
function.method_index = -1;
|
||||||
// function.fun_cache = 0;
|
function.fun_cache = 0;
|
||||||
// function.item_block = 0;
|
function.item_block = 0;
|
||||||
|
|
||||||
for(size_t i=0 ; i<function.parameters.size() ; ++i)
|
for(size_t i=0 ; i<function.parameters.size() ; ++i)
|
||||||
ClearCache(*function.parameters[i]);
|
ClearCache(*function.parameters[i]);
|
||||||
|
|
51
src/item.h
51
src/item.h
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
* This file is a part of EZC -- Easy templating in C++ library
|
* This file is a part of EZC -- Easy templating in C++ library
|
||||||
* and is distributed under the BSD 3-Clause licence.
|
* and is distributed under the 2-Clause BSD licence.
|
||||||
* Author: Tomasz Sowa <t.sowa@ttmath.org>
|
* Author: Tomasz Sowa <t.sowa@ttmath.org>
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -10,29 +10,26 @@
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
* modification, are permitted provided that the following conditions are met:
|
* modification, are permitted provided that the following conditions are met:
|
||||||
*
|
*
|
||||||
* * Redistributions of source code must retain the above copyright notice,
|
* 1. Redistributions of source code must retain the above copyright notice,
|
||||||
* this list of conditions and the following disclaimer.
|
* this list of conditions and the following disclaimer.
|
||||||
*
|
*
|
||||||
* * Redistributions in binary form must reproduce the above copyright
|
* 2. Redistributions in binary form must reproduce the above copyright
|
||||||
* notice, this list of conditions and the following disclaimer in the
|
* notice, this list of conditions and the following disclaimer in the
|
||||||
* documentation and/or other materials provided with the distribution.
|
* documentation and/or other materials provided with the distribution.
|
||||||
*
|
|
||||||
* * Neither the name Tomasz Sowa nor the names of contributors to this
|
|
||||||
* project may be used to endorse or promote products derived
|
|
||||||
* from this software without specific prior written permission.
|
|
||||||
*
|
*
|
||||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||||
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
|
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
|
||||||
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||||
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||||
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||||
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
|
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||||
* THE POSSIBILITY OF SUCH DAMAGE.
|
* POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
@ -69,16 +66,20 @@ struct Item
|
||||||
// e.g. [my_function:my_postfix]
|
// e.g. [my_function:my_postfix]
|
||||||
std::vector<Function*> parameters; // if is_function is true then it is a function and can have 'parameters'
|
std::vector<Function*> parameters; // if is_function is true then it is a function and can have 'parameters'
|
||||||
// if is_function is empty then 'parameters' is empty too
|
// if is_function is empty then 'parameters' is empty too
|
||||||
//void * fun_cache; // only valid if is_function is true
|
void * fun_cache; // only valid if is_function is true
|
||||||
//Item * item_block;
|
Item * item_block;
|
||||||
|
void * base_obj;
|
||||||
|
int method_index;
|
||||||
int arg; // used if name is numeric (if no then is equal -1)
|
int arg; // used if name is numeric (if no then is equal -1)
|
||||||
|
|
||||||
|
|
||||||
Function()
|
Function()
|
||||||
{
|
{
|
||||||
is_function = false;
|
is_function = false;
|
||||||
//fun_cache = 0;
|
fun_cache = 0;
|
||||||
//item_block = 0;
|
item_block = 0;
|
||||||
|
base_obj = 0;
|
||||||
|
method_index = -1;
|
||||||
arg = -1;
|
arg = -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -98,8 +99,10 @@ struct Item
|
||||||
name = f.name;
|
name = f.name;
|
||||||
fields = f.fields;
|
fields = f.fields;
|
||||||
postfix = f.postfix;
|
postfix = f.postfix;
|
||||||
//fun_cache = f.fun_cache;
|
fun_cache = f.fun_cache;
|
||||||
//item_block = f.item_block;
|
item_block = f.item_block;
|
||||||
|
base_obj = f.base_obj;
|
||||||
|
method_index = f.method_index;
|
||||||
arg = f.arg;
|
arg = f.arg;
|
||||||
|
|
||||||
for(size_t i=0 ; i<f.parameters.size() ; ++i)
|
for(size_t i=0 ; i<f.parameters.size() ; ++i)
|
||||||
|
@ -124,8 +127,10 @@ struct Item
|
||||||
parameters.clear();
|
parameters.clear();
|
||||||
name.clear();
|
name.clear();
|
||||||
postfix.clear();
|
postfix.clear();
|
||||||
//fun_cache = 0;
|
fun_cache = 0;
|
||||||
//item_block = 0;
|
item_block = 0;
|
||||||
|
base_obj = 0;
|
||||||
|
method_index = -1;
|
||||||
arg = -1;
|
arg = -1;
|
||||||
is_function = false;
|
is_function = false;
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,136 @@
|
||||||
|
/*
|
||||||
|
* This file is a part of EZC -- Easy templating in C++ library
|
||||||
|
* and is distributed under the 2-Clause BSD licence.
|
||||||
|
* Author: Tomasz Sowa <t.sowa@ttmath.org>
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Copyright (c) 2021, Tomasz Sowa
|
||||||
|
* All rights reserved.
|
||||||
|
*
|
||||||
|
* Redistribution and use in source and binary forms, with or without
|
||||||
|
* modification, are permitted provided that the following conditions are met:
|
||||||
|
*
|
||||||
|
* 1. Redistributions of source code must retain the above copyright notice,
|
||||||
|
* this list of conditions and the following disclaimer.
|
||||||
|
*
|
||||||
|
* 2. Redistributions in binary form must reproduce the above copyright
|
||||||
|
* notice, this list of conditions and the following disclaimer in the
|
||||||
|
* documentation and/or other materials provided with the distribution.
|
||||||
|
*
|
||||||
|
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||||
|
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||||
|
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||||
|
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
|
||||||
|
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||||
|
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||||
|
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||||
|
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||||
|
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||||
|
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||||
|
* POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "models.h"
|
||||||
|
|
||||||
|
|
||||||
|
#ifdef EZC_HAS_MORM_LIBRARY
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
namespace Ezc
|
||||||
|
{
|
||||||
|
|
||||||
|
|
||||||
|
Models::Models()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Models::~Models()
|
||||||
|
{
|
||||||
|
Clear();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void Models::Clear()
|
||||||
|
{
|
||||||
|
models_map.clear();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
void Models::Add(const std::wstring & name, morm::Model & model)
|
||||||
|
{
|
||||||
|
morm::Wrapper wrapper;
|
||||||
|
wrapper.model = &model;
|
||||||
|
models_map[name] = wrapper;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void Models::Add(const std::wstring & name, morm::Model * model)
|
||||||
|
{
|
||||||
|
morm::Wrapper wrapper;
|
||||||
|
wrapper.model = model;
|
||||||
|
models_map[name] = wrapper;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void Models::Add(const std::wstring & name, pt::Space & space)
|
||||||
|
{
|
||||||
|
morm::Wrapper wrapper;
|
||||||
|
wrapper.space_wrapper = new morm::SpaceWrapper(&space);
|
||||||
|
models_map[name] = wrapper;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void Models::Add(const std::wstring & name, pt::Space * space)
|
||||||
|
{
|
||||||
|
morm::Wrapper wrapper;
|
||||||
|
wrapper.space_wrapper = new morm::SpaceWrapper(space);
|
||||||
|
models_map[name] = wrapper;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void Models::Add(const std::wstring & name, pt::Date & date)
|
||||||
|
{
|
||||||
|
morm::Wrapper wrapper;
|
||||||
|
wrapper.date = &date;
|
||||||
|
models_map[name] = wrapper;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void Models::Add(const std::wstring & name, pt::Date * date)
|
||||||
|
{
|
||||||
|
morm::Wrapper wrapper;
|
||||||
|
wrapper.date = date;
|
||||||
|
models_map[name] = wrapper;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
morm::Wrapper * Models::Find(const std::wstring & name)
|
||||||
|
{
|
||||||
|
auto iterator = models_map.find(name);
|
||||||
|
|
||||||
|
if( iterator != models_map.end() )
|
||||||
|
{
|
||||||
|
return &iterator->second;
|
||||||
|
}
|
||||||
|
|
||||||
|
return nullptr;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Models::ModelsMap & Models::GetMap()
|
||||||
|
{
|
||||||
|
return models_map;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
|
@ -0,0 +1,148 @@
|
||||||
|
/*
|
||||||
|
* This file is a part of EZC -- Easy templating in C++ library
|
||||||
|
* and is distributed under the 2-Clause BSD licence.
|
||||||
|
* Author: Tomasz Sowa <t.sowa@ttmath.org>
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Copyright (c) 2021, Tomasz Sowa
|
||||||
|
* All rights reserved.
|
||||||
|
*
|
||||||
|
* Redistribution and use in source and binary forms, with or without
|
||||||
|
* modification, are permitted provided that the following conditions are met:
|
||||||
|
*
|
||||||
|
* 1. Redistributions of source code must retain the above copyright notice,
|
||||||
|
* this list of conditions and the following disclaimer.
|
||||||
|
*
|
||||||
|
* 2. Redistributions in binary form must reproduce the above copyright
|
||||||
|
* notice, this list of conditions and the following disclaimer in the
|
||||||
|
* documentation and/or other materials provided with the distribution.
|
||||||
|
*
|
||||||
|
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||||
|
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||||
|
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||||
|
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
|
||||||
|
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||||
|
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||||
|
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||||
|
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||||
|
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||||
|
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||||
|
* POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef headerfile_ezc_models
|
||||||
|
#define headerfile_ezc_models
|
||||||
|
|
||||||
|
#ifdef EZC_HAS_MORM_LIBRARY
|
||||||
|
|
||||||
|
#include "wrapper.h"
|
||||||
|
#include "funinfo.h"
|
||||||
|
#include "space/space.h"
|
||||||
|
|
||||||
|
|
||||||
|
namespace Ezc
|
||||||
|
{
|
||||||
|
|
||||||
|
|
||||||
|
class Models
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
|
||||||
|
typedef std::map<std::wstring, morm::Wrapper> ModelsMap;
|
||||||
|
|
||||||
|
Models();
|
||||||
|
~Models();
|
||||||
|
|
||||||
|
void Add(const std::wstring & name, morm::Model & model);
|
||||||
|
void Add(const std::wstring & name, morm::Model * model);
|
||||||
|
|
||||||
|
void Add(const std::wstring & name, pt::Space & space);
|
||||||
|
void Add(const std::wstring & name, pt::Space * space);
|
||||||
|
|
||||||
|
void Add(const std::wstring & name, pt::Date & space);
|
||||||
|
void Add(const std::wstring & name, pt::Date * space);
|
||||||
|
|
||||||
|
template<typename VectorType>
|
||||||
|
void Add(const std::wstring & name, std::vector<VectorType> & container)
|
||||||
|
{
|
||||||
|
morm::Wrapper wrapper;
|
||||||
|
wrapper.model_container_wrapper = new morm::ModelWrapperVector<VectorType>(&container);
|
||||||
|
models_map[name] = wrapper;
|
||||||
|
}
|
||||||
|
|
||||||
|
template<typename VectorType>
|
||||||
|
void Add(const std::wstring & name, std::vector<VectorType> * container)
|
||||||
|
{
|
||||||
|
morm::Wrapper wrapper;
|
||||||
|
wrapper.model_container_wrapper = new morm::ModelWrapperVector<VectorType>(container);
|
||||||
|
models_map[name] = wrapper;
|
||||||
|
}
|
||||||
|
|
||||||
|
template<typename VectorType>
|
||||||
|
void Add(const std::wstring & name, std::vector<VectorType*> & container)
|
||||||
|
{
|
||||||
|
morm::Wrapper wrapper;
|
||||||
|
wrapper.model_container_wrapper = new morm::ModelWrapperVectorPointer<VectorType>(&container);
|
||||||
|
models_map[name] = wrapper;
|
||||||
|
}
|
||||||
|
|
||||||
|
template<typename VectorType>
|
||||||
|
void Add(const std::wstring & name, std::vector<VectorType*> * container)
|
||||||
|
{
|
||||||
|
morm::Wrapper wrapper;
|
||||||
|
wrapper.model_container_wrapper = new morm::ModelWrapperVectorPointer<VectorType>(container);
|
||||||
|
models_map[name] = wrapper;
|
||||||
|
}
|
||||||
|
|
||||||
|
template<typename ListType>
|
||||||
|
void Add(const std::wstring & name, std::list<ListType> & container)
|
||||||
|
{
|
||||||
|
morm::Wrapper wrapper;
|
||||||
|
wrapper.model_container_wrapper = new morm::ModelWrapperList<ListType>(&container);
|
||||||
|
models_map[name] = wrapper;
|
||||||
|
}
|
||||||
|
|
||||||
|
template<typename ListType>
|
||||||
|
void Add(const std::wstring & name, std::list<ListType> * container)
|
||||||
|
{
|
||||||
|
morm::Wrapper wrapper;
|
||||||
|
wrapper.model_container_wrapper = new morm::ModelWrapperList<ListType>(container);
|
||||||
|
models_map[name] = wrapper;
|
||||||
|
}
|
||||||
|
|
||||||
|
template<typename ListType>
|
||||||
|
void Add(const std::wstring & name, std::list<ListType*> & container)
|
||||||
|
{
|
||||||
|
morm::Wrapper wrapper;
|
||||||
|
wrapper.model_container_wrapper = new morm::ModelWrapperListPointer<ListType>(&container);
|
||||||
|
models_map[name] = wrapper;
|
||||||
|
}
|
||||||
|
|
||||||
|
template<typename ListType>
|
||||||
|
void Add(const std::wstring & name, std::list<ListType*> * container)
|
||||||
|
{
|
||||||
|
morm::Wrapper wrapper;
|
||||||
|
wrapper.model_container_wrapper = new morm::ModelWrapperListPointer<ListType>(container);
|
||||||
|
models_map[name] = wrapper;
|
||||||
|
}
|
||||||
|
|
||||||
|
morm::Wrapper * Find(const std::wstring & name);
|
||||||
|
ModelsMap & GetMap();
|
||||||
|
void Clear();
|
||||||
|
|
||||||
|
|
||||||
|
protected:
|
||||||
|
|
||||||
|
ModelsMap models_map;
|
||||||
|
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
|
@ -1,38 +1,35 @@
|
||||||
/*
|
/*
|
||||||
* This file is a part of EZC -- Easy templating in C++ library
|
* This file is a part of EZC -- Easy templating in C++ library
|
||||||
* and is distributed under the BSD 3-Clause licence.
|
* and is distributed under the 2-Clause BSD licence.
|
||||||
* Author: Tomasz Sowa <t.sowa@ttmath.org>
|
* Author: Tomasz Sowa <t.sowa@ttmath.org>
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2015-2021, Tomasz Sowa
|
* Copyright (c) 2015, Tomasz Sowa
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
* modification, are permitted provided that the following conditions are met:
|
* modification, are permitted provided that the following conditions are met:
|
||||||
*
|
*
|
||||||
* * Redistributions of source code must retain the above copyright notice,
|
* 1. Redistributions of source code must retain the above copyright notice,
|
||||||
* this list of conditions and the following disclaimer.
|
* this list of conditions and the following disclaimer.
|
||||||
*
|
*
|
||||||
* * Redistributions in binary form must reproduce the above copyright
|
* 2. Redistributions in binary form must reproduce the above copyright
|
||||||
* notice, this list of conditions and the following disclaimer in the
|
* notice, this list of conditions and the following disclaimer in the
|
||||||
* documentation and/or other materials provided with the distribution.
|
* documentation and/or other materials provided with the distribution.
|
||||||
*
|
|
||||||
* * Neither the name Tomasz Sowa nor the names of contributors to this
|
|
||||||
* project may be used to endorse or promote products derived
|
|
||||||
* from this software without specific prior written permission.
|
|
||||||
*
|
*
|
||||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||||
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
|
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
|
||||||
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||||
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||||
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||||
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
|
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||||
* THE POSSIBILITY OF SUCH DAMAGE.
|
* POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef headerfile_ezc_objects
|
#ifndef headerfile_ezc_objects
|
||||||
|
@ -72,7 +69,7 @@ public:
|
||||||
/*
|
/*
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
virtual void CallFun(int fun_index, Env<StreamType> &) = 0;
|
virtual void CallFun(int fun_index, FunInfo<StreamType> &) = 0;
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
* This file is a part of EZC -- Easy templating in C++ library
|
* This file is a part of EZC -- Easy templating in C++ library
|
||||||
* and is distributed under the BSD 3-Clause licence.
|
* and is distributed under the 2-Clause BSD licence.
|
||||||
* Author: Tomasz Sowa <t.sowa@ttmath.org>
|
* Author: Tomasz Sowa <t.sowa@ttmath.org>
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -11,28 +11,25 @@
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
* modification, are permitted provided that the following conditions are met:
|
* modification, are permitted provided that the following conditions are met:
|
||||||
*
|
*
|
||||||
* * Redistributions of source code must retain the above copyright notice,
|
* 1. Redistributions of source code must retain the above copyright notice,
|
||||||
* this list of conditions and the following disclaimer.
|
* this list of conditions and the following disclaimer.
|
||||||
*
|
*
|
||||||
* * Redistributions in binary form must reproduce the above copyright
|
* 2. Redistributions in binary form must reproduce the above copyright
|
||||||
* notice, this list of conditions and the following disclaimer in the
|
* notice, this list of conditions and the following disclaimer in the
|
||||||
* documentation and/or other materials provided with the distribution.
|
* documentation and/or other materials provided with the distribution.
|
||||||
*
|
|
||||||
* * Neither the name Tomasz Sowa nor the names of contributors to this
|
|
||||||
* project may be used to endorse or promote products derived
|
|
||||||
* from this software without specific prior written permission.
|
|
||||||
*
|
*
|
||||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||||
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
|
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
|
||||||
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||||
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||||
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||||
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
|
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||||
* THE POSSIBILITY OF SUCH DAMAGE.
|
* POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef headerfile_ezc_outstreams
|
#ifndef headerfile_ezc_outstreams
|
||||||
|
|
|
@ -1,38 +1,35 @@
|
||||||
/*
|
/*
|
||||||
* This file is a part of EZC -- Easy templating in C++ library
|
* This file is a part of EZC -- Easy templating in C++ library
|
||||||
* and is distributed under the BSD 3-Clause licence.
|
* and is distributed under the 2-Clause BSD licence.
|
||||||
* Author: Tomasz Sowa <t.sowa@ttmath.org>
|
* Author: Tomasz Sowa <t.sowa@ttmath.org>
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2007-2021, Tomasz Sowa
|
* Copyright (c) 2007-2012, Tomasz Sowa
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
* modification, are permitted provided that the following conditions are met:
|
* modification, are permitted provided that the following conditions are met:
|
||||||
*
|
*
|
||||||
* * Redistributions of source code must retain the above copyright notice,
|
* 1. Redistributions of source code must retain the above copyright notice,
|
||||||
* this list of conditions and the following disclaimer.
|
* this list of conditions and the following disclaimer.
|
||||||
*
|
*
|
||||||
* * Redistributions in binary form must reproduce the above copyright
|
* 2. Redistributions in binary form must reproduce the above copyright
|
||||||
* notice, this list of conditions and the following disclaimer in the
|
* notice, this list of conditions and the following disclaimer in the
|
||||||
* documentation and/or other materials provided with the distribution.
|
* documentation and/or other materials provided with the distribution.
|
||||||
*
|
|
||||||
* * Neither the name Tomasz Sowa nor the names of contributors to this
|
|
||||||
* project may be used to endorse or promote products derived
|
|
||||||
* from this software without specific prior written permission.
|
|
||||||
*
|
*
|
||||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||||
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
|
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
|
||||||
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||||
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||||
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||||
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
|
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||||
* THE POSSIBILITY OF SUCH DAMAGE.
|
* POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "pattern.h"
|
#include "pattern.h"
|
||||||
|
@ -60,7 +57,7 @@ void Pattern::Clear()
|
||||||
|
|
||||||
void Pattern::CacheBlocks(Blocks & blocks)
|
void Pattern::CacheBlocks(Blocks & blocks)
|
||||||
{
|
{
|
||||||
//Cache(blocks, item_root);
|
Cache(blocks, item_root);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
* This file is a part of EZC -- Easy templating in C++ library
|
* This file is a part of EZC -- Easy templating in C++ library
|
||||||
* and is distributed under the BSD 3-Clause licence.
|
* and is distributed under the 2-Clause BSD licence.
|
||||||
* Author: Tomasz Sowa <t.sowa@ttmath.org>
|
* Author: Tomasz Sowa <t.sowa@ttmath.org>
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -10,29 +10,26 @@
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
* modification, are permitted provided that the following conditions are met:
|
* modification, are permitted provided that the following conditions are met:
|
||||||
*
|
*
|
||||||
* * Redistributions of source code must retain the above copyright notice,
|
* 1. Redistributions of source code must retain the above copyright notice,
|
||||||
* this list of conditions and the following disclaimer.
|
* this list of conditions and the following disclaimer.
|
||||||
*
|
*
|
||||||
* * Redistributions in binary form must reproduce the above copyright
|
* 2. Redistributions in binary form must reproduce the above copyright
|
||||||
* notice, this list of conditions and the following disclaimer in the
|
* notice, this list of conditions and the following disclaimer in the
|
||||||
* documentation and/or other materials provided with the distribution.
|
* documentation and/or other materials provided with the distribution.
|
||||||
*
|
|
||||||
* * Neither the name Tomasz Sowa nor the names of contributors to this
|
|
||||||
* project may be used to endorse or promote products derived
|
|
||||||
* from this software without specific prior written permission.
|
|
||||||
*
|
*
|
||||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||||
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
|
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
|
||||||
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||||
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||||
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||||
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
|
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||||
* THE POSSIBILITY OF SUCH DAMAGE.
|
* POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
* This file is a part of EZC -- Easy templating in C++ library
|
* This file is a part of EZC -- Easy templating in C++ library
|
||||||
* and is distributed under the BSD 3-Clause licence.
|
* and is distributed under the 2-Clause BSD licence.
|
||||||
* Author: Tomasz Sowa <t.sowa@ttmath.org>
|
* Author: Tomasz Sowa <t.sowa@ttmath.org>
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -10,29 +10,26 @@
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
* modification, are permitted provided that the following conditions are met:
|
* modification, are permitted provided that the following conditions are met:
|
||||||
*
|
*
|
||||||
* * Redistributions of source code must retain the above copyright notice,
|
* 1. Redistributions of source code must retain the above copyright notice,
|
||||||
* this list of conditions and the following disclaimer.
|
* this list of conditions and the following disclaimer.
|
||||||
*
|
*
|
||||||
* * Redistributions in binary form must reproduce the above copyright
|
* 2. Redistributions in binary form must reproduce the above copyright
|
||||||
* notice, this list of conditions and the following disclaimer in the
|
* notice, this list of conditions and the following disclaimer in the
|
||||||
* documentation and/or other materials provided with the distribution.
|
* documentation and/or other materials provided with the distribution.
|
||||||
*
|
|
||||||
* * Neither the name Tomasz Sowa nor the names of contributors to this
|
|
||||||
* project may be used to endorse or promote products derived
|
|
||||||
* from this software without specific prior written permission.
|
|
||||||
*
|
*
|
||||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||||
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
|
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
|
||||||
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||||
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||||
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||||
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
|
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||||
* THE POSSIBILITY OF SUCH DAMAGE.
|
* POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
* This file is a part of EZC -- Easy templating in C++ library
|
* This file is a part of EZC -- Easy templating in C++ library
|
||||||
* and is distributed under the BSD 3-Clause licence.
|
* and is distributed under the 2-Clause BSD licence.
|
||||||
* Author: Tomasz Sowa <t.sowa@ttmath.org>
|
* Author: Tomasz Sowa <t.sowa@ttmath.org>
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -10,29 +10,26 @@
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
* modification, are permitted provided that the following conditions are met:
|
* modification, are permitted provided that the following conditions are met:
|
||||||
*
|
*
|
||||||
* * Redistributions of source code must retain the above copyright notice,
|
* 1. Redistributions of source code must retain the above copyright notice,
|
||||||
* this list of conditions and the following disclaimer.
|
* this list of conditions and the following disclaimer.
|
||||||
*
|
*
|
||||||
* * Redistributions in binary form must reproduce the above copyright
|
* 2. Redistributions in binary form must reproduce the above copyright
|
||||||
* notice, this list of conditions and the following disclaimer in the
|
* notice, this list of conditions and the following disclaimer in the
|
||||||
* documentation and/or other materials provided with the distribution.
|
* documentation and/or other materials provided with the distribution.
|
||||||
*
|
|
||||||
* * Neither the name Tomasz Sowa nor the names of contributors to this
|
|
||||||
* project may be used to endorse or promote products derived
|
|
||||||
* from this software without specific prior written permission.
|
|
||||||
*
|
*
|
||||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||||
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
|
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
|
||||||
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||||
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||||
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||||
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
|
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||||
* THE POSSIBILITY OF SUCH DAMAGE.
|
* POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
|
493
src/vars.h
493
src/vars.h
|
@ -1,493 +0,0 @@
|
||||||
/*
|
|
||||||
* This file is a part of EZC -- Easy templating in C++ library
|
|
||||||
* and is distributed under the BSD 3-Clause licence.
|
|
||||||
* Author: Tomasz Sowa <t.sowa@ttmath.org>
|
|
||||||
*/
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Copyright (c) 2021, Tomasz Sowa
|
|
||||||
* All rights reserved.
|
|
||||||
*
|
|
||||||
* Redistribution and use in source and binary forms, with or without
|
|
||||||
* modification, are permitted provided that the following conditions are met:
|
|
||||||
*
|
|
||||||
* * Redistributions of source code must retain the above copyright notice,
|
|
||||||
* this list of conditions and the following disclaimer.
|
|
||||||
*
|
|
||||||
* * Redistributions in binary form must reproduce the above copyright
|
|
||||||
* notice, this list of conditions and the following disclaimer in the
|
|
||||||
* documentation and/or other materials provided with the distribution.
|
|
||||||
*
|
|
||||||
* * Neither the name Tomasz Sowa nor the names of contributors to this
|
|
||||||
* project may be used to endorse or promote products derived
|
|
||||||
* from this software without specific prior written permission.
|
|
||||||
*
|
|
||||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
|
||||||
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
||||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
|
||||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
|
|
||||||
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
|
||||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
|
||||||
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
|
||||||
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
|
||||||
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
|
||||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
|
|
||||||
* THE POSSIBILITY OF SUCH DAMAGE.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifndef headerfile_ezc_vars
|
|
||||||
#define headerfile_ezc_vars
|
|
||||||
|
|
||||||
#include "var.h"
|
|
||||||
#include "utf8/utf8.h"
|
|
||||||
#include "env.h"
|
|
||||||
#include <string>
|
|
||||||
#include <map>
|
|
||||||
#include <list>
|
|
||||||
|
|
||||||
|
|
||||||
namespace Ezc
|
|
||||||
{
|
|
||||||
|
|
||||||
// rename to something like Object? or a better name?
|
|
||||||
template<typename StreamType>
|
|
||||||
class Vars
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
|
|
||||||
typedef void (*UserFunction)(Env<StreamType> &);
|
|
||||||
|
|
||||||
|
|
||||||
Var<StreamType> & add(const char * name);
|
|
||||||
Var<StreamType> & add(const wchar_t * name);
|
|
||||||
Var<StreamType> & add(const std::string & name);
|
|
||||||
Var<StreamType> & add(const std::wstring & name);
|
|
||||||
|
|
||||||
void add(const char * name, const Var<StreamType> & var);
|
|
||||||
void add(const wchar_t * name, const Var<StreamType> & var);
|
|
||||||
void add(const std::string & name, const Var<StreamType> & var);
|
|
||||||
void add(const std::wstring & name, const Var<StreamType> & var);
|
|
||||||
|
|
||||||
Var<StreamType> & add(const char * name, UserFunction user_function);
|
|
||||||
Var<StreamType> & add(const wchar_t * name, UserFunction user_function);
|
|
||||||
Var<StreamType> & add(const std::string & name, UserFunction user_function);
|
|
||||||
Var<StreamType> & add(const std::wstring & name, UserFunction user_function);
|
|
||||||
|
|
||||||
Var<StreamType> & add(const char * name, morm::Model & model);
|
|
||||||
Var<StreamType> & add(const wchar_t * name, morm::Model & model);
|
|
||||||
Var<StreamType> & add(const std::string & name, morm::Model & model);
|
|
||||||
Var<StreamType> & add(const std::wstring & name, morm::Model & model);
|
|
||||||
|
|
||||||
template<typename ModelType>
|
|
||||||
Var<StreamType> & add(const char * name, std::vector<ModelType> & model_container);
|
|
||||||
|
|
||||||
template<typename ModelType>
|
|
||||||
Var<StreamType> & add(const wchar_t * name, std::vector<ModelType> & model_container);
|
|
||||||
|
|
||||||
template<typename ModelType>
|
|
||||||
Var<StreamType> & add(const std::string & name, std::vector<ModelType> & model_container);
|
|
||||||
|
|
||||||
template<typename ModelType>
|
|
||||||
Var<StreamType> & add(const std::wstring & name, std::vector<ModelType> & model_container);
|
|
||||||
|
|
||||||
template<typename ModelType>
|
|
||||||
Var<StreamType> & add(const char * name, std::list<ModelType> & model_container);
|
|
||||||
|
|
||||||
template<typename ModelType>
|
|
||||||
Var<StreamType> & add(const wchar_t * name, std::list<ModelType> & model_container);
|
|
||||||
|
|
||||||
template<typename ModelType>
|
|
||||||
Var<StreamType> & add(const std::string & name, std::list<ModelType> & model_container);
|
|
||||||
|
|
||||||
template<typename ModelType>
|
|
||||||
Var<StreamType> & add(const std::wstring & name, std::list<ModelType> & model_container);
|
|
||||||
|
|
||||||
|
|
||||||
template<typename ModelType>
|
|
||||||
Var<StreamType> & add(const char * name, std::vector<ModelType*> & model_container);
|
|
||||||
|
|
||||||
template<typename ModelType>
|
|
||||||
Var<StreamType> & add(const wchar_t * name, std::vector<ModelType*> & model_container);
|
|
||||||
|
|
||||||
template<typename ModelType>
|
|
||||||
Var<StreamType> & add(const std::string & name, std::vector<ModelType*> & model_container);
|
|
||||||
|
|
||||||
template<typename ModelType>
|
|
||||||
Var<StreamType> & add(const std::wstring & name, std::vector<ModelType*> & model_container);
|
|
||||||
|
|
||||||
template<typename ModelType>
|
|
||||||
Var<StreamType> & add(const char * name, std::list<ModelType*> & model_container);
|
|
||||||
|
|
||||||
template<typename ModelType>
|
|
||||||
Var<StreamType> & add(const wchar_t * name, std::list<ModelType*> & model_container);
|
|
||||||
|
|
||||||
template<typename ModelType>
|
|
||||||
Var<StreamType> & add(const std::string & name, std::list<ModelType*> & model_container);
|
|
||||||
|
|
||||||
template<typename ModelType>
|
|
||||||
Var<StreamType> & add(const std::wstring & name, std::list<ModelType*> & model_container);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Var<StreamType> * find(const char * name) const;
|
|
||||||
Var<StreamType> * find(const wchar_t * name) const;
|
|
||||||
Var<StreamType> * find(const std::string & name) const;
|
|
||||||
Var<StreamType> * find(const std::wstring & name) const;
|
|
||||||
|
|
||||||
|
|
||||||
private:
|
|
||||||
|
|
||||||
typedef std::list<Var<StreamType>> VarList;
|
|
||||||
VarList var_list;
|
|
||||||
|
|
||||||
typedef std::map<std::wstring, Var<StreamType>*> VarMap;
|
|
||||||
VarMap var_map;
|
|
||||||
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
template<typename StreamType>
|
|
||||||
Var<StreamType> & Vars<StreamType>::add(const char * name)
|
|
||||||
{
|
|
||||||
std::wstring name_wide;
|
|
||||||
pt::utf8_to_wide(name, name_wide);
|
|
||||||
add(name_wide);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
template<typename StreamType>
|
|
||||||
Var<StreamType> & Vars<StreamType>::add(const wchar_t * name)
|
|
||||||
{
|
|
||||||
std::wstring name_str(name);
|
|
||||||
return add(name_str);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
template<typename StreamType>
|
|
||||||
Var<StreamType> & Vars<StreamType>::add(const std::string & name)
|
|
||||||
{
|
|
||||||
std::wstring name_wide;
|
|
||||||
pt::utf8_to_wide(name, name_wide);
|
|
||||||
return add(name_wide);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
template<typename StreamType>
|
|
||||||
Var<StreamType> & Vars<StreamType>::add(const std::wstring & name)
|
|
||||||
{
|
|
||||||
auto i = var_map.insert(std::make_pair(name, nullptr));
|
|
||||||
|
|
||||||
if( i.second )
|
|
||||||
{
|
|
||||||
Var<StreamType> & var = var_list.emplace_back();
|
|
||||||
i.first->second = &var;
|
|
||||||
}
|
|
||||||
|
|
||||||
i.first->second->clear();
|
|
||||||
return *(i.first->second);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
template<typename StreamType>
|
|
||||||
void Vars<StreamType>::add(const char * name, const Var<StreamType> & var)
|
|
||||||
{
|
|
||||||
std::wstring name_wide;
|
|
||||||
pt::utf8_to_wide(name, name_wide);
|
|
||||||
add(name_wide, var);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
template<typename StreamType>
|
|
||||||
void Vars<StreamType>::add(const wchar_t * name, const Var<StreamType> & var)
|
|
||||||
{
|
|
||||||
std::wstring name_str(name);
|
|
||||||
add(name_str, var);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
template<typename StreamType>
|
|
||||||
void Vars<StreamType>::add(const std::string & name, const Var<StreamType> & var)
|
|
||||||
{
|
|
||||||
std::wstring name_wide;
|
|
||||||
pt::utf8_to_wide(name, name_wide);
|
|
||||||
add(name_wide, var);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
template<typename StreamType>
|
|
||||||
void Vars<StreamType>::add(const std::wstring & name, const Var<StreamType> & var)
|
|
||||||
{
|
|
||||||
var_list.push_back(var);
|
|
||||||
var_map[name] = &var_list.back();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
template<typename StreamType>
|
|
||||||
Var<StreamType> & Vars<StreamType>::add(const char * name, UserFunction user_function)
|
|
||||||
{
|
|
||||||
Var<StreamType> & var = add(name);
|
|
||||||
var.set(user_function);
|
|
||||||
return var;
|
|
||||||
}
|
|
||||||
|
|
||||||
template<typename StreamType>
|
|
||||||
Var<StreamType> & Vars<StreamType>::add(const wchar_t * name, UserFunction user_function)
|
|
||||||
{
|
|
||||||
Var<StreamType> & var = add(name);
|
|
||||||
var.set(user_function);
|
|
||||||
return var;
|
|
||||||
}
|
|
||||||
|
|
||||||
template<typename StreamType>
|
|
||||||
Var<StreamType> & Vars<StreamType>::add(const std::string & name, UserFunction user_function)
|
|
||||||
{
|
|
||||||
Var<StreamType> & var = add(name);
|
|
||||||
var.set(user_function);
|
|
||||||
return var;
|
|
||||||
}
|
|
||||||
|
|
||||||
template<typename StreamType>
|
|
||||||
Var<StreamType> & Vars<StreamType>::add(const std::wstring & name, UserFunction user_function)
|
|
||||||
{
|
|
||||||
Var<StreamType> & var = add(name);
|
|
||||||
var.set(user_function);
|
|
||||||
return var;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
template<typename StreamType>
|
|
||||||
Var<StreamType> & Vars<StreamType>::add(const char * name, morm::Model & model)
|
|
||||||
{
|
|
||||||
Var<StreamType> & var = add(name);
|
|
||||||
var.set(model);
|
|
||||||
return var;
|
|
||||||
}
|
|
||||||
|
|
||||||
template<typename StreamType>
|
|
||||||
Var<StreamType> & Vars<StreamType>::add(const wchar_t * name, morm::Model & model)
|
|
||||||
{
|
|
||||||
Var<StreamType> & var = add(name);
|
|
||||||
var.set(model);
|
|
||||||
return var;
|
|
||||||
}
|
|
||||||
|
|
||||||
template<typename StreamType>
|
|
||||||
Var<StreamType> & Vars<StreamType>::add(const std::string & name, morm::Model & model)
|
|
||||||
{
|
|
||||||
Var<StreamType> & var = add(name);
|
|
||||||
var.set(model);
|
|
||||||
return var;
|
|
||||||
}
|
|
||||||
|
|
||||||
template<typename StreamType>
|
|
||||||
Var<StreamType> & Vars<StreamType>::add(const std::wstring & name, morm::Model & model)
|
|
||||||
{
|
|
||||||
Var<StreamType> & var = add(name);
|
|
||||||
var.set(model);
|
|
||||||
return var;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
template<typename StreamType>
|
|
||||||
template<typename ModelType>
|
|
||||||
Var<StreamType> & Vars<StreamType>::add(const char * name, std::vector<ModelType> & model_container)
|
|
||||||
{
|
|
||||||
Var<StreamType> & var = add(name);
|
|
||||||
var.set(model_container);
|
|
||||||
return var;
|
|
||||||
}
|
|
||||||
|
|
||||||
template<typename StreamType>
|
|
||||||
template<typename ModelType>
|
|
||||||
Var<StreamType> & Vars<StreamType>::add(const wchar_t * name, std::vector<ModelType> & model_container)
|
|
||||||
{
|
|
||||||
Var<StreamType> & var = add(name);
|
|
||||||
var.set(model_container);
|
|
||||||
return var;
|
|
||||||
}
|
|
||||||
|
|
||||||
template<typename StreamType>
|
|
||||||
template<typename ModelType>
|
|
||||||
Var<StreamType> & Vars<StreamType>::add(const std::string & name, std::vector<ModelType> & model_container)
|
|
||||||
{
|
|
||||||
Var<StreamType> & var = add(name);
|
|
||||||
var.set(model_container);
|
|
||||||
return var;
|
|
||||||
}
|
|
||||||
|
|
||||||
template<typename StreamType>
|
|
||||||
template<typename ModelType>
|
|
||||||
Var<StreamType> & Vars<StreamType>::add(const std::wstring & name, std::vector<ModelType> & model_container)
|
|
||||||
{
|
|
||||||
Var<StreamType> & var = add(name);
|
|
||||||
var.set(model_container);
|
|
||||||
return var;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
template<typename StreamType>
|
|
||||||
template<typename ModelType>
|
|
||||||
Var<StreamType> & Vars<StreamType>::add(const char * name, std::list<ModelType> & model_container)
|
|
||||||
{
|
|
||||||
Var<StreamType> & var = add(name);
|
|
||||||
var.set(model_container);
|
|
||||||
return var;
|
|
||||||
}
|
|
||||||
|
|
||||||
template<typename StreamType>
|
|
||||||
template<typename ModelType>
|
|
||||||
Var<StreamType> & Vars<StreamType>::add(const wchar_t * name, std::list<ModelType> & model_container)
|
|
||||||
{
|
|
||||||
Var<StreamType> & var = add(name);
|
|
||||||
var.set(model_container);
|
|
||||||
return var;
|
|
||||||
}
|
|
||||||
|
|
||||||
template<typename StreamType>
|
|
||||||
template<typename ModelType>
|
|
||||||
Var<StreamType> & Vars<StreamType>::add(const std::string & name, std::list<ModelType> & model_container)
|
|
||||||
{
|
|
||||||
Var<StreamType> & var = add(name);
|
|
||||||
var.set(model_container);
|
|
||||||
return var;
|
|
||||||
}
|
|
||||||
|
|
||||||
template<typename StreamType>
|
|
||||||
template<typename ModelType>
|
|
||||||
Var<StreamType> & Vars<StreamType>::add(const std::wstring & name, std::list<ModelType> & model_container)
|
|
||||||
{
|
|
||||||
Var<StreamType> & var = add(name);
|
|
||||||
var.set(model_container);
|
|
||||||
return var;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
template<typename StreamType>
|
|
||||||
template<typename ModelType>
|
|
||||||
Var<StreamType> & Vars<StreamType>::add(const char * name, std::vector<ModelType*> & model_container)
|
|
||||||
{
|
|
||||||
Var<StreamType> & var = add(name);
|
|
||||||
var.set(model_container);
|
|
||||||
return var;
|
|
||||||
}
|
|
||||||
|
|
||||||
template<typename StreamType>
|
|
||||||
template<typename ModelType>
|
|
||||||
Var<StreamType> & Vars<StreamType>::add(const wchar_t * name, std::vector<ModelType*> & model_container)
|
|
||||||
{
|
|
||||||
Var<StreamType> & var = add(name);
|
|
||||||
var.set(model_container);
|
|
||||||
return var;
|
|
||||||
}
|
|
||||||
|
|
||||||
template<typename StreamType>
|
|
||||||
template<typename ModelType>
|
|
||||||
Var<StreamType> & Vars<StreamType>::add(const std::string & name, std::vector<ModelType*> & model_container)
|
|
||||||
{
|
|
||||||
Var<StreamType> & var = add(name);
|
|
||||||
var.set(model_container);
|
|
||||||
return var;
|
|
||||||
}
|
|
||||||
|
|
||||||
template<typename StreamType>
|
|
||||||
template<typename ModelType>
|
|
||||||
Var<StreamType> & Vars<StreamType>::add(const std::wstring & name, std::vector<ModelType*> & model_container)
|
|
||||||
{
|
|
||||||
Var<StreamType> & var = add(name);
|
|
||||||
var.set(model_container);
|
|
||||||
return var;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
template<typename StreamType>
|
|
||||||
template<typename ModelType>
|
|
||||||
Var<StreamType> & Vars<StreamType>::add(const char * name, std::list<ModelType*> & model_container)
|
|
||||||
{
|
|
||||||
Var<StreamType> & var = add(name);
|
|
||||||
var.set(model_container);
|
|
||||||
return var;
|
|
||||||
}
|
|
||||||
|
|
||||||
template<typename StreamType>
|
|
||||||
template<typename ModelType>
|
|
||||||
Var<StreamType> & Vars<StreamType>::add(const wchar_t * name, std::list<ModelType*> & model_container)
|
|
||||||
{
|
|
||||||
Var<StreamType> & var = add(name);
|
|
||||||
var.set(model_container);
|
|
||||||
return var;
|
|
||||||
}
|
|
||||||
|
|
||||||
template<typename StreamType>
|
|
||||||
template<typename ModelType>
|
|
||||||
Var<StreamType> & Vars<StreamType>::add(const std::string & name, std::list<ModelType*> & model_container)
|
|
||||||
{
|
|
||||||
Var<StreamType> & var = add(name);
|
|
||||||
var.set(model_container);
|
|
||||||
return var;
|
|
||||||
}
|
|
||||||
|
|
||||||
template<typename StreamType>
|
|
||||||
template<typename ModelType>
|
|
||||||
Var<StreamType> & Vars<StreamType>::add(const std::wstring & name, std::list<ModelType*> & model_container)
|
|
||||||
{
|
|
||||||
Var<StreamType> & var = add(name);
|
|
||||||
var.set(model_container);
|
|
||||||
return var;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
template<typename StreamType>
|
|
||||||
Var<StreamType> * Vars<StreamType>::find(const char * name) const
|
|
||||||
{
|
|
||||||
std::wstring name_wide;
|
|
||||||
pt::utf8_to_wide(name, name_wide);
|
|
||||||
return find(name_wide);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
template<typename StreamType>
|
|
||||||
Var<StreamType> * Vars<StreamType>::find(const wchar_t * name) const
|
|
||||||
{
|
|
||||||
typename VarMap::const_iterator i = var_map.find(name);
|
|
||||||
|
|
||||||
if( i != var_map.end() )
|
|
||||||
{
|
|
||||||
return i->second;
|
|
||||||
}
|
|
||||||
|
|
||||||
return nullptr;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
template<typename StreamType>
|
|
||||||
Var<StreamType> * Vars<StreamType>::find(const std::string & name) const
|
|
||||||
{
|
|
||||||
std::wstring name_wide;
|
|
||||||
pt::utf8_to_wide(name, name_wide);
|
|
||||||
return find(name_wide);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
template<typename StreamType>
|
|
||||||
Var<StreamType> * Vars<StreamType>::find(const std::wstring & name) const
|
|
||||||
{
|
|
||||||
typename VarMap::const_iterator i = var_map.find(name);
|
|
||||||
|
|
||||||
if( i != var_map.end() )
|
|
||||||
{
|
|
||||||
return i->second;
|
|
||||||
}
|
|
||||||
|
|
||||||
return nullptr;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
} // namespace
|
|
||||||
|
|
||||||
#endif
|
|
|
@ -0,0 +1,44 @@
|
||||||
|
/*
|
||||||
|
* This file is a part of EZC -- Easy templating in C++ library
|
||||||
|
* and is distributed under the 2-Clause BSD licence.
|
||||||
|
* Author: Tomasz Sowa <t.sowa@ttmath.org>
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Copyright (c) 2022, Tomasz Sowa
|
||||||
|
* All rights reserved.
|
||||||
|
*
|
||||||
|
* Redistribution and use in source and binary forms, with or without
|
||||||
|
* modification, are permitted provided that the following conditions are met:
|
||||||
|
*
|
||||||
|
* 1. Redistributions of source code must retain the above copyright notice,
|
||||||
|
* this list of conditions and the following disclaimer.
|
||||||
|
*
|
||||||
|
* 2. Redistributions in binary form must reproduce the above copyright
|
||||||
|
* notice, this list of conditions and the following disclaimer in the
|
||||||
|
* documentation and/or other materials provided with the distribution.
|
||||||
|
*
|
||||||
|
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||||
|
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||||
|
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||||
|
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
|
||||||
|
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||||
|
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||||
|
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||||
|
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||||
|
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||||
|
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||||
|
* POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef headerfile_ezc_version
|
||||||
|
#define headerfile_ezc_version
|
||||||
|
|
||||||
|
|
||||||
|
#define EZC_VERSION_MAJOR 0
|
||||||
|
#define EZC_VERSION_MINOR 9
|
||||||
|
#define EZC_VERSION_PATCH 5
|
||||||
|
|
||||||
|
|
||||||
|
#endif
|
Loading…
Reference in New Issue