Select Git revision
drawGlyph.cpp
Forked from
gmsh / gmsh
Source project has a limited visibility.
LuaBindings.cpp 12.64 KiB
// Gmsh - Copyright (C) 1997-2010 C. Geuzaine, J.-F. Remacle
//
// See the LICENSE.txt file for license information. Please report all
// bugs and problems to <gmsh@geuz.org>.
//
// Contributor(s):
// Jonathan Lambrechts
//
#include "GmshConfig.h"
#if defined(HAVE_LUA)
#include <iostream>
#include <string>
#include "Gmsh.h"
#include "Context.h"
#include "MVertex.h"
#include "MElement.h"
#include "GFace.h"
#include "DivideAndConquer.h"
#include "Bindings.h"
#include "luaFunction.h"
#include "function.h"
#include "GModel.h"
#include "Bindings.h"
#include "GmshMessage.h"
#include "linearSystem.h"
#if defined(HAVE_OPENGL)
#include "drawContext.h"
#endif
#if defined(HAVE_SOLVER)
#include "linearSystemCSR.h"
#endif
extern "C" {
#include "lua.h"
#include "lualib.h"
#include "lauxlib.h"
}
#if defined(HAVE_READLINE)
#include "readline.h"
#include "history.h"
#endif
//trivial class to bind options
class gmshOptions {
public:
gmshOptions(){}
void colorSet(std::string category, int index, std::string name, int value)
{
GmshSetOption(category, name, (unsigned int)(value), index);
}
int colorGet(std::string category, int index, std::string name)
{
unsigned int value;
GmshGetOption(category, name, value, index);
return value;
}
double numberGet(std::string category, int index, std::string name)
{
double value;
GmshGetOption(category, name, value, index);
return value;
}
void numberSet(std::string category, int index, std::string name, double value)
{
GmshSetOption(category, name, value, index);