factor out placeholder for a (planned) Symbol datatype

This commit is contained in:
Fischlurch 2008-11-30 06:46:32 +01:00 committed by Christian Thaeter
parent b14d711146
commit 98005b10ae
2 changed files with 59 additions and 4 deletions

View file

@ -30,15 +30,16 @@
#include <boost/format.hpp>
#include "include/symbol.hpp"
namespace lumiera {
namespace lumiera
{
using std::string;
using boost::format;
/* ==== comon definitions for rule based queries ==== */
/* ==== common definitions for rule based queries ==== */
typedef const char * const Symbol;
/**

54
src/include/symbol.hpp Normal file
View file

@ -0,0 +1,54 @@
/*
SYMBOL.hpp - symbolic constant datatype
Copyright (C) Lumiera.org
2008, Hermann Vosseler <Ichthyostega@web.de>
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License as
published by the Free Software Foundation; either version 2 of the
License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
/** @file symbol.hpp
** WIP placeholder definition for a planned Symbol datatype.
**
** @todo the (currently just planned as of 11/08) rules based configuration
** in the Proc-Layer a explicit Symbol datatype will probably very helpful.
** For now we just a typedef is sufficient. A real Symbol datatype should
** - be definable by string constant
** - integrate smoothly with std::string
** - provide a unique numeric index for each distinct Symbol
** - automatically maintain a symbol table at runtime to support this
** - provide some magic (macros) allowing to build distinct types based on symbols.
**
** @see configrules.hpp
** @see query.hpp
*/
#ifndef LUMIERA_SYMBOL_H
#define LUMIERA_SYMBOL_H
namespace lumiera {
typedef const char * const Symbol; //TODO define a real Symbol class, i.e. same literal string==same pointer,
} // namespace lumiera
#endif