remove some old values from Type enum

types
Tomasz Sowa 1 year ago
parent b9f1fa913e
commit 41ac172b91

@ -11,7 +11,8 @@ blocks.o: ../../pikotools/src/textstream/stream.h
blocks.o: ../../pikotools/src/space/space.h
blocks.o: ../../pikotools/src/textstream/types.h
blocks.o: ../../pikotools/src/membuffer/membuffer.h
blocks.o: ../../pikotools/src/textstream/types.h objects.h
blocks.o: ../../pikotools/src/textstream/types.h
blocks.o: ../../pikotools/src/utf8/utf8_stream.h objects.h
cache.o: cache.h item.h functions.h ../../pikotools/src/utf8/utf8.h
cache.o: ../../pikotools/src/textstream/stream.h
cache.o: ../../pikotools/src/utf8/utf8_templates.h
@ -23,7 +24,8 @@ cache.o: ../../pikotools/src/textstream/stream.h
cache.o: ../../pikotools/src/space/space.h
cache.o: ../../pikotools/src/textstream/types.h
cache.o: ../../pikotools/src/membuffer/membuffer.h
cache.o: ../../pikotools/src/textstream/types.h objects.h blocks.h
cache.o: ../../pikotools/src/textstream/types.h
cache.o: ../../pikotools/src/utf8/utf8_stream.h objects.h blocks.h
item.o: item.h
pattern.o: pattern.h item.h cache.h functions.h
pattern.o: ../../pikotools/src/utf8/utf8.h
@ -37,7 +39,8 @@ pattern.o: ../../pikotools/src/textstream/stream.h
pattern.o: ../../pikotools/src/space/space.h
pattern.o: ../../pikotools/src/textstream/types.h
pattern.o: ../../pikotools/src/membuffer/membuffer.h
pattern.o: ../../pikotools/src/textstream/types.h objects.h blocks.h
pattern.o: ../../pikotools/src/textstream/types.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
@ -50,7 +53,8 @@ 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 objects.h pattern.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
@ -59,16 +63,4 @@ 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/utf8/utf8_stream.h
patternparser.o: ../../pikotools/src/convert/double.h
var.o: var.h ../../pikotools/src/date/date.h
var.o: ../../pikotools/src/convert/inttostr.h
var.o: ../../pikotools/src/textstream/textstream.h
var.o: ../../pikotools/src/textstream/stream.h
var.o: ../../pikotools/src/space/space.h
var.o: ../../pikotools/src/textstream/types.h ../../pikotools/src/utf8/utf8.h
var.o: ../../pikotools/src/textstream/stream.h
var.o: ../../pikotools/src/utf8/utf8_templates.h
var.o: ../../pikotools/src/utf8/utf8_private.h
var.o: ../../pikotools/src/membuffer/membuffer.h
var.o: ../../pikotools/src/textstream/types.h

@ -1 +1 @@
o = blocks.o cache.o item.o pattern.o patternparser.o var.o
o = blocks.o cache.o item.o pattern.o patternparser.o

@ -5,7 +5,7 @@
*/
/*
* Copyright (c) 2007-2021, Tomasz Sowa
* Copyright (c) 2007-2022, Tomasz Sowa
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@ -143,6 +143,8 @@ private:
//typename Functions<StreamType>::UserFunction * function;
//Item * item_block;
Var<StreamType> * variable;
#ifdef EZC_HAS_MORM_LIBRARY
@ -150,6 +152,8 @@ private:
size_t field_index;
#endif
FindHelperOld()
{
//fun_name = nullptr;
@ -2281,26 +2285,17 @@ bool Generator<StreamType, is_pikotools_stream, is_autoescape_stream>::Call(
Var<StreamType> & result,
StreamType & in_stream)
{
//FindHelperOld find_helper;
std::vector<Var<StreamType>> parameters;
// if( clear_out_stream )
// ClearStream(out_stream);
// FIXME where to set this?
// if constexpr(is_autoescape_stream)
// out_stream.Escape(true);
const std::wstring * name = (fun_name)? fun_name : &item_fun.name;
Var<StreamType> * var = nullptr;
const std::wstring * name = nullptr;
if( pvars )
{
if( fun_name )
name = fun_name;
else
name = &item_fun.name;
var = pvars->find(*name);
}

@ -1,52 +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.
*/
#include "var.h"
#include "utf8/utf8.h"
namespace Ezc
{
}

@ -5,7 +5,7 @@
*/
/*
* Copyright (c) 2021, Tomasz Sowa
* Copyright (c) 2021-2022, Tomasz Sowa
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@ -70,27 +70,15 @@ public:
enum Type
{
// string or wstring from space_local
TYPE_VOID,
TYPE_SPACE_LOCAL,
// TYPE_BOOL,
// TYPE_LONG,
// TYPE_DOUBLE,
// TYPE_STRING,
TYPE_STREAM,
TYPE_FUNCTION,
TYPE_DATE,
TYPE_MODEL,
TYPE_MODEL_CONTAINER_WRAPPER,
TYPE_SPACE_WRAPPER,
TYPE_SPACE,
};
@ -102,6 +90,7 @@ public:
Var * add_child(const std::wstring & child_name, const Var & var);
Var * find_child(const std::wstring & child_name);
bool has_object();
bool has_model_object();
@ -117,9 +106,6 @@ public:
void set(const std::string & str);
void set(const std::wstring & str);
// void set(char val);
// void set(unsigned char val);
// void set(wchar_t val);
void set(bool val);
void set(short val);
void set(int val);
@ -396,10 +382,6 @@ bool Var<StreamType>::to_bool() const
case TYPE_VOID:
return false;
// case TYPE_BOOL:
// case TYPE_LONG:
// case TYPE_DOUBLE:
// case TYPE_STRING:
case TYPE_SPACE_LOCAL:
return space_local.to_bool();
@ -465,32 +447,6 @@ void Var<StreamType>::set(const std::wstring & str)
space_local.set(str);
}
/*
template<typename StreamType>
void Var<StreamType>::set(char val)
{
clear();
type = TYPE_SPACE_LOCAL;
space_local.set(str);
}
template<typename StreamType>
void Var<StreamType>::set(unsigned char val)
{
clear();
type = TYPE_SPACE_LOCAL;
space_local.set(str);
}
template<typename StreamType>
void Var<StreamType>::set(wchar_t val)
{
clear();
type = TYPE_SPACE_LOCAL;
space_local.set(str);
}
*/
template<typename StreamType>
void Var<StreamType>::set(bool val)

Loading…
Cancel
Save