javabind.h revision 6c3e745a94ef6b25a4ef9f018d350a7535aa45af
/**
* @file
* @brief This is a simple mechanism to bind Inkscape to Java, and thence
* to all of the nice things that can be layered upon that.
*
* Authors:
* Bob Jamison
*
* Copyright (C) 2007-2008 Bob Jamison
*
* 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 __JAVABIND_H__
#define __JAVABIND_H__
#include <glibmm.h>
#include <vector>
{
{
/**
* Select which String implementation we want to use
*/
/**
* This is the base class of all things which will be C++ object
* instances
*/
{
/**
* Simple constructor
*/
{}
/**
* Destructor
*/
{}
};
/**
*
*/
{
/**
* Types for this value
*/
typedef enum
{
} ValueType;
/**
*
*/
Value()
{
init();
}
/**
*
*/
{
init();
}
/**
*
*/
{
init();
}
/**
*
*/
{
init();
}
/**
*
*/
{
init();
}
/**
*
*/
{
}
/**
*
*/
{
return *this;
}
/**
*
*/
{
}
/**
*
*/
int getType()
{ return type; }
/**
*
*/
void setBoolean(bool val)
/**
*
*/
bool getBoolean()
{
if (type == BIND_BOOLEAN)
return (bool)ival;
else
return false;
}
/**
*
*/
/**
*
*/
bool getInt()
{
return ival;
else
return 0;
}
/**
*
*/
/**
*
*/
double getDouble()
{
if (type == BIND_DOUBLE)
return dval;
else
return 0.0;
}
/**
*
*/
/**
*
*/
{
if (type == BIND_STRING)
return sval;
else
return "";
}
void init()
{
ival = 0;
dval = 0.0;
sval = "";
}
{
}
int type;
long ival;
double dval;
};
/**
*
*/
{
/**
*
*/
{}
/**
*
*/
{}
/**
*
*/
{
return false;
}
/**
*
*/
const String &/*className*/,
const String &/*methodName*/,
const String &/*signature*/,
Value &/*retval*/)
{
return false;
}
/**
*
*/
{
return false;
}
/**
*
*/
{
return false;
}
/**
*
*/
{
return false;
}
/**
*
*/
{
return false;
}
/**
*
*/
virtual bool showConsole()
{
return false;
}
/**
*
*/
{
return false;
}
/**
*
*/
{
return "";
}
{
return logBuf;
}
{
}
{
{
}
}
/**
* Return a singleton instance of this bindery
*/
static JavaBindery *getInstance();
};
} // namespace Bind
} // namespace Inkscape
#endif /* __JAVABIND_H__ */
//########################################################################
//# E N D O F F I L E
//########################################################################