csharp module added

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@4376 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
Tiger Feng 2003-02-21 20:34:52 +00:00
commit 22290a6768
3 changed files with 72 additions and 1 deletions

View file

@ -824,3 +824,12 @@ int CSHARP::insertDirective(Node *n) {
}
return SWIG_OK;
}
/* -----------------------------------------------------------------------------
* swig_csharp() - Instantiate module
* ----------------------------------------------------------------------------- */
extern "C" Language *
swig_csharp(void) {
return new CSHARP();
}

View file

@ -0,0 +1,60 @@
/*******************************************************************************
* Simplified Wrapper and Interface Generator (SWIG)
*
* Please read the file LICENSE for the copyright and terms by which SWIG
* can be used and distributed.
*******************************************************************************/
/**************************************************************************
* $Header$
*
* csharp.h
*
* Header file for CSharp (C#) module.
*
* Warning : this work is in progress and for test only.
*
**************************************************************************/
/*******************************************************************************
* C# (csharp) head file, csharp.h
*
* Written by Songyan Feng (Tiger)
*
* Department of Computer Science
* University of Chicago
* 1100 E 58th Street
* Chicago, IL 60637
* songyanf@cs.uchicago.edu
*
*
*******************************************************************************/
class CSHARP : public Language {
protected:
void add_method(char *name, char *function, int kw);
String *csharpcode(String *code, const String *indent);
public :
// Don't change any of this
virtual void main(int, char *argv[]);
virtual int top(Node *);
virtual int functionWrapper(Node *);
virtual int constantWrapper(Node *);
virtual int variableWrapper(Node *);
virtual int nativeWrapper(Node *);
virtual int membervariableHandler(Node *);
virtual int memberconstantHandler(Node *);
virtual int memberfunctionHandler(Node *);
virtual int constructorHandler(Node *);
virtual int destructorHandler(Node *);
virtual int classHandler(Node *);
virtual int classforwardDeclaration(Node *);
virtual int insertDirective(Node *);
virtual void import_start(char *);
virtual void import_end();
};
#define PYSHADOW_MEMBER 0x2

View file

@ -48,6 +48,7 @@ extern "C" {
Language *swig_sexp(void);
Language *swig_xml(void);
Language *swig_chicken(void);
Language *swig_csharp(void);
}
struct swig_module {
@ -60,8 +61,9 @@ struct swig_module {
Place an entry for new language modules here, keeping the
list sorted alphabetically. */
swig_module modules[] = {
swig_module modules[] = {
{"-chicken", swig_chicken, "CHICKEN"},
{"-csharp", NULL, "CSHARP"},
{"-guile", swig_guile, "Guile"},
{"-java", swig_java, "Java"},
{"-mzscheme", swig_mzscheme, "Mzscheme"},