All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Restrictions.h
Go to the documentation of this file.
/* -*- mode: c++; indent-tabs-mode: nil -*- */
/*
Restrictions.h
QORE programming language
Copyright 2003 - 2013 David Nichols
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library 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
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
#ifndef _QORE_RESTRICTIONS_H
#define _QORE_RESTRICTIONS_H
#define PO_NO_GLOBAL_VARS (1 << 0)
#define PO_NO_SUBROUTINE_DEFS (1 << 1)
#define PO_NO_THREAD_CONTROL (1 << 2)
#define PO_NO_THREAD_CLASSES (1 << 3)
#define PO_NO_TOP_LEVEL_STATEMENTS (1 << 4)
#define PO_NO_CLASS_DEFS (1 << 5)
#define PO_NO_NAMESPACE_DEFS (1 << 6)
#define PO_NO_CONSTANT_DEFS (1 << 7)
#define PO_NO_NEW (1 << 8)
#define PO_NO_SYSTEM_CLASSES (1 << 9)
#define PO_NO_USER_CLASSES (1 << 10)
#define PO_NO_CHILD_PO_RESTRICTIONS (1 << 11)
#define PO_NO_EXTERNAL_PROCESS (1 << 12)
#define PO_REQUIRE_OUR (1 << 13)
#define PO_NO_PROCESS_CONTROL (1 << 14)
#define PO_NO_NETWORK (1 << 15)
#define PO_NO_FILESYSTEM (1 << 16)
#define PO_LOCK_WARNINGS (1 << 17)
#define PO_NO_DATABASE (1 << 18)
#define PO_NO_GUI (1 << 19)
#define PO_NO_TERMINAL_IO (1 << 20)
#define PO_REQUIRE_TYPES (1 << 21)
#define PO_NO_EXTERNAL_INFO (1 << 22)
#define PO_NO_THREAD_INFO (1 << 23)
#define PO_NO_LOCALE_CONTROL (1 << 24)
#define PO_REQUIRE_PROTOTYPES (1 << 25)
#define PO_STRICT_ARGS (1 << 26)
#define PO_REQUIRE_BARE_REFS (1 << 27)
#define PO_ASSUME_LOCAL (1 << 28)
#define PO_NO_MODULES (1 << 29)
#define PO_NO_INHERIT_USER_FUNC_VARIANTS (1 << 30)
#define PO_NO_SYSTEM_FUNC_VARIANTS (1LL << 31)
#define PO_NO_INHERIT_GLOBAL_VARS (1LL << 32)
#define PO_IN_MODULE (1LL << 33)
#define PO_NO_EMBEDDED_LOGIC (1LL << 34)
#define PO_STRICT_BOOLEAN_EVAL (1LL << 35)
#define PO_DEFAULT 0
#define PO_SYSTEM_OPS (PO_IN_MODULE)
#define PO_ALLOW_BARE_REFS PO_REQUIRE_BARE_REFS
// combination options
#define PO_NO_THREADS (PO_NO_THREAD_CONTROL|PO_NO_THREAD_CLASSES|PO_NO_THREAD_INFO)
#define PO_NO_EXTERNAL_ACCESS (PO_NO_PROCESS_CONTROL|PO_NO_NETWORK|PO_NO_FILESYSTEM|PO_NO_DATABASE|PO_NO_EXTERNAL_INFO|PO_NO_EXTERNAL_PROCESS|PO_NO_MODULES)
#define PO_NO_IO (PO_NO_GUI|PO_NO_TERMINAL_IO|PO_NO_FILESYSTEM|PO_NO_NETWORK|PO_NO_DATABASE)
#define PO_LOCKDOWN (PO_NO_EXTERNAL_ACCESS|PO_NO_THREADS|PO_NO_IO)
#define PO_NEW_STYLE (PO_ALLOW_BARE_REFS|PO_ASSUME_LOCAL)
#define PO_POSITIVE_OPTIONS (PO_NO_CHILD_PO_RESTRICTIONS)
#define PO_FREE_OPTIONS (PO_ALLOW_BARE_REFS|PO_ASSUME_LOCAL|PO_STRICT_BOOLEAN_EVAL)
#define PO_INHERITANCE_OPTIONS (PO_NO_SYSTEM_CLASSES|PO_NO_USER_CLASSES|PO_INHERIT_USER_FUNC_VARIANTS|PO_NO_SYSTEM_FUNC_VARIANTS|PO_INHERIT_GLOBAL_VARS)
#define QDOM_DEFAULT 0
#define QDOM_PROCESS PO_NO_PROCESS_CONTROL
#define QDOM_NETWORK PO_NO_NETWORK
#define QDOM_EXTERNAL_PROCESS PO_NO_EXTERNAL_PROCESS
#define QDOM_FILESYSTEM PO_NO_FILESYSTEM
#define QDOM_THREAD_CLASS PO_NO_THREAD_CLASSES
#define QDOM_THREAD_CONTROL PO_NO_THREAD_CONTROL
#define QDOM_DATABASE PO_NO_DATABASE
#define QDOM_GUI PO_NO_GUI
#define QDOM_TERMINAL_IO PO_NO_TERMINAL_IO
#define QDOM_EXTERNAL_INFO PO_NO_EXTERNAL_INFO
#define QDOM_THREAD_INFO PO_NO_THREAD_INFO
#define QDOM_LOCALE_CONTROL PO_NO_LOCALE_CONTROL
#define QDOM_MODULES PO_NO_MODULES
#define QDOM_IN_MODULE PO_IN_MODULE
#define QDOM_EMBEDDED_LOGIC PO_NO_EMBEDDED_LOGIC
#endif //_QORE_DOMAIN_H