Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
gmsh
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Larry Price
gmsh
Commits
9db76cec
Commit
9db76cec
authored
15 years ago
by
Jonathan Lambrechts
Browse files
Options
Downloads
Patches
Plain Diff
compile again without HAVE_LUA (sorry)
parent
5abc9934
No related branches found
No related tags found
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
Common/Bindings.h
+69
-5
69 additions, 5 deletions
Common/Bindings.h
Solver/dgConservationLaw.h
+0
-6
0 additions, 6 deletions
Solver/dgConservationLaw.h
Solver/function.h
+2
-0
2 additions, 0 deletions
Solver/function.h
with
71 additions
and
11 deletions
Common/Bindings.h
+
69
−
5
View file @
9db76cec
#ifndef _LUNA_SIGNATURE_H_
#define _LUNA_SIGNATURE_H_
#ifndef _BINDINGS_H_
#define _BINDINGS_H_
#ifndef HAVE_LUA //no bindings
class
methodBinding
{};
class
constructorBinding
{};
template
<
class
objectType
,
class
returnType
=
void
,
class
arg0Type
=
void
,
class
arg1Type
=
void
,
class
arg2Type
=
void
,
class
arg3Type
=
void
>
class
methodBindingTemplate
:
public
methodBinding
{
typedef
returnType
(
objectType
::*
callback
)(
arg0Type
,
arg1Type
,
arg2Type
,
arg3Type
);
public:
methodBindingTemplate
(
const
std
::
string
luaname
,
callback
f
){}
};
template
<
class
objectType
,
class
returnType
,
class
arg0Type
,
class
arg1Type
,
class
arg2Type
>
class
methodBindingTemplate
<
objectType
,
returnType
,
arg0Type
,
arg1Type
,
arg2Type
,
void
>:
public
methodBinding
{
typedef
returnType
(
objectType
::*
callback
)(
arg0Type
,
arg1Type
,
arg2Type
);
public:
methodBindingTemplate
(
const
std
::
string
luaname
,
callback
f
){}
};
template
<
class
objectType
,
class
returnType
,
class
arg0Type
,
class
arg1Type
>
class
methodBindingTemplate
<
objectType
,
returnType
,
arg0Type
,
arg1Type
,
void
,
void
>:
public
methodBinding
{
typedef
returnType
(
objectType
::*
callback
)(
arg0Type
,
arg1Type
);
public:
methodBindingTemplate
(
const
std
::
string
luaname
,
callback
f
){}
};
template
<
class
objectType
,
class
returnType
,
class
arg0Type
>
class
methodBindingTemplate
<
objectType
,
returnType
,
arg0Type
,
void
,
void
,
void
>:
public
methodBinding
{
typedef
returnType
(
objectType
::*
callback
)(
arg0Type
);
public:
methodBindingTemplate
(
const
std
::
string
luaname
,
callback
f
){}
};
template
<
class
objectType
,
class
returnType
>
class
methodBindingTemplate
<
objectType
,
returnType
,
void
,
void
,
void
,
void
>:
public
methodBinding
{
typedef
returnType
(
objectType
::*
callback
)();
public:
methodBindingTemplate
(
const
std
::
string
luaname
,
callback
f
){}
};
template
<
class
objectType
,
class
arg0Type
,
class
arg1Type
,
class
arg2Type
>
class
methodBindingTemplate
<
objectType
,
void
,
arg0Type
,
arg1Type
,
arg2Type
,
void
>:
public
methodBinding
{
typedef
void
(
objectType
::*
callback
)(
arg0Type
,
arg1Type
,
arg2Type
);
public:
methodBindingTemplate
(
const
std
::
string
luaname
,
callback
f
){}
};
template
<
class
objectType
,
class
arg0Type
,
class
arg1Type
>
class
methodBindingTemplate
<
objectType
,
void
,
arg0Type
,
arg1Type
,
void
,
void
>:
public
methodBinding
{
typedef
void
(
objectType
::*
callback
)(
arg0Type
,
arg1Type
);
public:
methodBindingTemplate
(
const
std
::
string
luaname
,
callback
f
){}
};
template
<
class
objectType
,
class
arg0Type
>
class
methodBindingTemplate
<
objectType
,
void
,
arg0Type
,
void
,
void
,
void
>:
public
methodBinding
{
typedef
void
(
objectType
::*
callback
)(
arg0Type
);
public:
methodBindingTemplate
(
const
std
::
string
luaname
,
callback
f
){}
};
template
<
class
objectType
>
class
methodBindingTemplate
<
objectType
,
void
,
void
,
void
,
void
,
void
>:
public
methodBinding
{
typedef
void
(
objectType
::*
callback
)();
public:
methodBindingTemplate
(
const
std
::
string
luaname
,
callback
f
){}
};
template
<
class
objectType
,
class
arg0Type
=
void
,
class
arg1Type
=
void
,
class
arg2Type
=
void
,
class
arg3Type
=
void
>
class
constructorBindingTemplate
:
public
constructorBinding
{};
#else // HAVE_LUA
extern
"C"
{
#include
"lua.h"
...
...
@@ -8,9 +71,6 @@ extern "C" {
#include
<vector>
class
binding
{
};
class
methodBinding
{
public:
std
::
string
_luaname
;
...
...
@@ -25,6 +85,9 @@ class constructorBinding {
virtual
int
call
(
lua_State
*
L
)
=
0
;
};
// this class is largely copied from luna
// todo : add reference to luna and check luna licence
template
<
typename
T
>
class
classBinding
{
typedef
struct
{
T
*
pT
;
bool
owned
;}
userdataType
;
public
:
...
...
@@ -455,3 +518,4 @@ class constructorBindingTemplate<objectType,void,void,void,void>:public construc
}
};
#endif
#endif
This diff is collapsed.
Click to expand it.
Solver/dgConservationLaw.h
+
0
−
6
View file @
9db76cec
...
...
@@ -9,10 +9,8 @@
#include
"fullMatrix.h"
class
dataCacheDouble
;
class
dataCacheMap
;
#ifdef HAVE_LUA
class
constructorBinding
;
class
methodBinding
;
#endif
class
dgConservationLaw
;
...
...
@@ -20,12 +18,10 @@ class dgBoundaryCondition {
public:
virtual
~
dgBoundaryCondition
()
{}
virtual
dataCacheDouble
*
newBoundaryTerm
(
dataCacheMap
&
cacheMapLeft
)
const
=
0
;
#if defined(HAVE_LUA)
static
const
char
className
[];
static
const
char
parentClassName
[];
static
methodBinding
*
methods
[];
static
constructorBinding
*
constructorMethod
;
#endif
};
class
dgConservationLaw
{
...
...
@@ -62,12 +58,10 @@ class dgConservationLaw {
dgBoundaryCondition
*
newOutsideValueBoundary
(
std
::
string
outsideValueFunctionName
);
dgBoundaryCondition
*
new0FluxBoundary
();
#ifdef HAVE_LUA
static
const
char
className
[];
static
const
char
parentClassName
[];
static
methodBinding
*
methods
[];
static
constructorBinding
*
constructorMethod
;
#endif
};
dgConservationLaw
*
dgNewPerfectGasLaw2d
();
...
...
This diff is collapsed.
Click to expand it.
Solver/function.h
+
2
−
0
View file @
9db76cec
...
...
@@ -7,6 +7,8 @@
#include
<fullMatrix.h>
class
dataCacheMap
;
class
MElement
;
class
methodBinding
;
class
constructorBinding
;
// those classes manage complex function dependencies and keep their values in cache so that they are not recomputed when it is not necessary. To do this, we use three classes : function, dataCache and dataCacheMap. The workflow is :
//
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment