iscriptnew.cpp 1.57 KB
Newer Older
Mark Hymers's avatar
Mark Hymers committed
1 2 3 4 5 6
/*=========================================================================

  Program:   Ionization FRont Interactive Tool (IFRIT)
  Language:  C++


7
Copyright (c) 2002-2012 Nick Gnedin 
Mark Hymers's avatar
Mark Hymers committed
8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
All rights reserved.

This file may be distributed and/or modified under the terms of the
GNU General Public License version 2 as published by the Free Software
Foundation and appearing in the file LICENSE.GPL included in the
packaging of this file.

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 AUTHORS 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.

=========================================================================*/
27 28


Adam Borowski's avatar
Adam Borowski committed
29 30
#include "iconfigure.h"
#include "iscript.h"
31 32


Adam Borowski's avatar
Adam Borowski committed
33
#include "ierror.h"
34 35


Adam Borowski's avatar
Adam Borowski committed
36 37 38 39 40 41
//
//  Factory method (move somewhere else?)
//
#if ISCRIPT_INCLUDED(ISCRIPT_PYTHON)
#include "../scripts/python/ipyscript.h"
#endif
42

43

Adam Borowski's avatar
Adam Borowski committed
44 45 46
iScript* iScript::New(iShell *s)
{
	IASSERT(s);
47

Adam Borowski's avatar
Adam Borowski committed
48 49 50
#if ISCRIPT_INCLUDED(ISCRIPT_PYTHON)
	return new ipyScript(s);
#endif
51

Adam Borowski's avatar
Adam Borowski committed
52 53
	return 0;
}
54