/*
* @author Mário Soares
* @contributors Jefferson González
*
* @license
* This file is part of wxPHP check the LICENSE file for information.
*
* @note
* This file was auto-generated by the wxPHP source maker
*/
#include "php_wxwidgets.h"
#include "appmanagement.h"
#include "cfg.h"
#include "bookctrl.h"
#include "dnd.h"
#include "cmndlg.h"
#include "containers.h"
#include "ctrl.h"
#include "data.h"
#include "dc.h"
#include "docview.h"
#include "events.h"
#include "file.h"
#include "gdi.h"
#include "grid.h"
#include "html.h"
#include "help.h"
#include "logging.h"
#include "managedwnd.h"
#include "menus.h"
#include "misc.h"
#include "miscwnd.h"
#include "media.h"
#include "pickers.h"
#include "printing.h"
#include "ribbon.h"
#include "richtext.h"
#include "rtti.h"
#include "stc.h"
#include "streams.h"
#include "threading.h"
#include "validator.h"
#include "vfs.h"
#include "aui.h"
#include "winlayout.h"
#include "xml.h"
#include "xrc.h"
#include "dvc.h"
#include "others.h"
void php_wxEventLoopBase_destruction_handler(zend_rsrc_list_entry *rsrc TSRMLS_DC)
{
#ifdef USE_WXPHP_DEBUG
php_printf("Calling php_wxEventLoopBase_destruction_handler on %s at line %i\n", zend_get_executed_filename(TSRMLS_C), zend_get_executed_lineno(TSRMLS_C));
php_printf("===========================================\n");
#endif
wxEventLoopBase_php* object = static_cast<wxEventLoopBase_php*>(rsrc->ptr);
if(rsrc->ptr != NULL)
{
#ifdef USE_WXPHP_DEBUG
php_printf("Pointer not null\n");
php_printf("Pointer address %x\n", (unsigned int)(size_t)rsrc->ptr);
#endif
if(object->references.IsUserInitialized())
{
#ifdef USE_WXPHP_DEBUG
php_printf("Deleting pointer with delete\n");
#endif
delete object;
rsrc->ptr = NULL;
}
#ifdef USE_WXPHP_DEBUG
php_printf("Deletion of wxEventLoopBase done\n");
php_printf("===========================================\n\n");
#endif
}
else
{
#ifdef USE_WXPHP_DEBUG
php_printf("Not user space initialized\n");
#endif
}
}
bool wxEventLoopBase_php::Dispatch()
{
#ifdef USE_WXPHP_DEBUG
php_printf("Invoking virtual wxEventLoopBase::Dispatch\n");
php_printf("===========================================\n");
#endif
zval* arguments[1];
arguments[0] = NULL;
zval* return_value;
MAKE_STD_ZVAL(return_value);
zval function_name;
ZVAL_STRING(&function_name, "Dispatch", 0);
char* temp_string;
char _wxResource[] = "wxResource";
zval **tmp;
int id_to_find;
void* return_object;
int rsrc_type;
//Parameters for conversion
#ifdef USE_WXPHP_DEBUG
php_printf("Trying to call user defined method\n");
#endif
if(call_user_function(NULL, (zval**) &this->phpObj, &function_name, return_value, 0, arguments TSRMLS_CC) == FAILURE)
{
#ifdef USE_WXPHP_DEBUG
php_printf("Invocation of user defined method failed\n");
#endif
wxMessageBox("Failed to call virtual method 'wxEventLoopBase::Dispatch'!", "Error");
}
#ifdef USE_WXPHP_DEBUG
php_printf("Returning userspace value.\n");
#endif
return Z_BVAL_P(return_value);
}
int wxEventLoopBase_php::DispatchTimeout(unsigned long timeout)
{
#ifdef USE_WXPHP_DEBUG
php_printf("Invoking virtual wxEventLoopBase::DispatchTimeout\n");
php_printf("===========================================\n");
#endif
zval *arguments[1];
//Initilize arguments array
for(int i=0; i<1; i++)
{
MAKE_STD_ZVAL(arguments[i]);
}
zval* return_value;
MAKE_STD_ZVAL(return_value);
zval function_name;
ZVAL_STRING(&function_name, "DispatchTimeout", 0);
char* temp_string;
char _wxResource[] = "wxResource";
zval **tmp;
int id_to_find;
void* return_object;
int rsrc_type;
//Parameters for conversion
ZVAL_LONG(arguments[0], timeout);
#ifdef USE_WXPHP_DEBUG
php_printf("Trying to call user defined method\n");
#endif
if(call_user_function(NULL, (zval**) &this->phpObj, &function_name, return_value, 1, arguments TSRMLS_CC) == FAILURE)
{
#ifdef USE_WXPHP_DEBUG
php_printf("Invocation of user defined method failed\n");
#endif
wxMessageBox("Failed to call virtual method 'wxEventLoopBase::DispatchTimeout'!", "Error");
}
#ifdef USE_WXPHP_DEBUG
php_printf("Returning userspace value.\n");
#endif
return (int) Z_LVAL_P(return_value);
}
void wxEventLoopBase_php::Exit(int rc)
{
#ifdef USE_WXPHP_DEBUG
php_printf("Invoking virtual wxEventLoopBase::Exit\n");
php_printf("===========================================\n");
#endif
zval *arguments[1];
//Initilize arguments array
for(int i=0; i<1; i++)
{
MAKE_STD_ZVAL(arguments[i]);
}
zval* return_value;
MAKE_STD_ZVAL(return_value);
zval function_name;
ZVAL_STRING(&function_name, "Exit", 0);
char* temp_string;
char _wxResource[] = "wxResource";
zval **tmp;
int id_to_find;
void* return_object;
int rsrc_type;
//Parameters for conversion
ZVAL_LONG(arguments[0], rc);
#ifdef USE_WXPHP_DEBUG
php_printf("Trying to call user defined method\n");
#endif
if(call_user_function(NULL, (zval**) &this->phpObj, &function_name, return_value, 1, arguments TSRMLS_CC) == FAILURE)
{
#ifdef USE_WXPHP_DEBUG
php_printf("Invocation of user defined method failed\n");
#endif
wxMessageBox("Failed to call virtual method 'wxEventLoopBase::Exit'!", "Error");
}
#ifdef USE_WXPHP_DEBUG
php_printf("Returning userspace value.\n");
#endif
return;
}
PHP_METHOD(php_wxEventLoopBase, GetActive)
{
#ifdef USE_WXPHP_DEBUG
php_printf("Invoking wxEventLoopBase::GetActive\n");
php_printf("===========================================\n");
#endif
//In case the constructor uses objects
zval **tmp;
int rsrc_type;
int parent_rsrc_type;
int id_to_find;
char _wxResource[] = "wxResource";
//Other variables used thru the code
int arguments_received = ZEND_NUM_ARGS();
void *_this;
zval* dummy;
bool already_called = false;
wxPHPObjectReferences* references;
bool return_is_user_initialized = false;
//Get pointer of object that called this method if not a static method
if (getThis() != NULL)
{
if(zend_hash_find(Z_OBJPROP_P(getThis()), _wxResource, sizeof(_wxResource), (void **)&tmp) == FAILURE)
{
zend_error(E_ERROR, "Failed to get the parent object that called wxEventLoopBase::GetActive\n");
return;
}
else
{
id_to_find = Z_RESVAL_P(*tmp);
_this = zend_list_find(id_to_find, &parent_rsrc_type);
bool reference_type_found = false;
if(parent_rsrc_type == le_wxEventLoopBase){
references = &((wxEventLoopBase_php*)_this)->references;
reference_type_found = true;
}
}
}
#ifdef USE_WXPHP_DEBUG
else
{
php_printf("Processing the method call as static\n");
}
#endif
//Parameters for overload 0
bool overload0_called = false;
//Overload 0
overload0:
if(!already_called && arguments_received == 0)
{
#ifdef USE_WXPHP_DEBUG
php_printf("Parameters received %d\n", arguments_received);
php_printf("Parsing parameters with '' ()\n");
#endif
overload0_called = true;
already_called = true;
}
if(overload0_called)
{
switch(arguments_received)
{
case 0:
{
#ifdef USE_WXPHP_DEBUG
php_printf("Static ");
php_printf("Executing wxEventLoopBase::GetActive() to return object pointer\n\n");
#endif
wxEventLoopBase_php* value_to_return0;
value_to_return0 = (wxEventLoopBase_php*) wxEventLoopBase::GetActive();
if(value_to_return0 == NULL){
ZVAL_NULL(return_value);
}
else if(value_to_return0->references.IsUserInitialized()){
if(value_to_return0->phpObj != NULL){
*return_value = *value_to_return0->phpObj;
zval_add_ref(&value_to_return0->phpObj);
return_is_user_initialized = true;
}
else{
zend_error(E_ERROR, "Could not retreive original zval.");
}
}
else{
object_init_ex(return_value,php_wxEventLoopBase_entry);
add_property_resource(return_value, "wxResource", zend_list_insert(value_to_return0, le_wxEventLoopBase));
}
return;
break;
}
}
}
//In case wrong type/count of parameters was passed
if(!already_called)
{
zend_error(E_ERROR, "Wrong type or count of parameters passed to: wxEventLoopBase::GetActive\n");
}
}
PHP_METHOD(php_wxEventLoopBase, IsEventAllowedInsideYield)
{
#ifdef USE_WXPHP_DEBUG
php_printf("Invoking wxEventLoopBase::IsEventAllowedInsideYield\n");
php_printf("===========================================\n");
#endif
//In case the constructor uses objects
zval **tmp;
int rsrc_type;
int parent_rsrc_type;
int id_to_find;
char _wxResource[] = "wxResource";
//Other variables used thru the code
int arguments_received = ZEND_NUM_ARGS();
void *_this;
zval* dummy;
bool already_called = false;
wxPHPObjectReferences* references;
bool return_is_user_initialized = false;
//Get pointer of object that called this method if not a static method
if (getThis() != NULL)
{
if(zend_hash_find(Z_OBJPROP_P(getThis()), _wxResource, sizeof(_wxResource), (void **)&tmp) == FAILURE)
{
zend_error(E_ERROR, "Failed to get the parent object that called wxEventLoopBase::IsEventAllowedInsideYield\n");
return;
}
else
{
id_to_find = Z_RESVAL_P(*tmp);
_this = zend_list_find(id_to_find, &parent_rsrc_type);
bool reference_type_found = false;
if(parent_rsrc_type == le_wxEventLoopBase){
references = &((wxEventLoopBase_php*)_this)->references;
reference_type_found = true;
}
}
}
#ifdef USE_WXPHP_DEBUG
else
{
php_printf("Processing the method call as static\n");
}
#endif
//Parameters for overload 0
long cat0;
bool overload0_called = false;
//Overload 0
overload0:
if(!already_called && arguments_received == 1)
{
#ifdef USE_WXPHP_DEBUG
php_printf("Parameters received %d\n", arguments_received);
php_printf("Parsing parameters with 'l' (&cat0)\n");
#endif
char parse_parameters_string[] = "l";
if(zend_parse_parameters_ex(ZEND_PARSE_PARAMS_QUIET, arguments_received TSRMLS_CC, parse_parameters_string, &cat0 ) == SUCCESS)
{
overload0_called = true;
already_called = true;
}
}
if(overload0_called)
{
switch(arguments_received)
{
case 1:
{
#ifdef USE_WXPHP_DEBUG
php_printf("Executing RETURN_BOOL(wxEventLoopBase::IsEventAllowedInsideYield((wxEventCategory) cat0))\n\n");
#endif
if(parent_rsrc_type == le_wxEventLoopBase)
{
ZVAL_BOOL(return_value, ((wxEventLoopBase_php*)_this)->IsEventAllowedInsideYield((wxEventCategory) cat0));
}
return;
break;
}
}
}
//In case wrong type/count of parameters was passed
if(!already_called)
{
zend_error(E_ERROR, "Wrong type or count of parameters passed to: wxEventLoopBase::IsEventAllowedInsideYield\n");
}
}
PHP_METHOD(php_wxEventLoopBase, IsMain)
{
#ifdef USE_WXPHP_DEBUG
php_printf("Invoking wxEventLoopBase::IsMain\n");
php_printf("===========================================\n");
#endif
//In case the constructor uses objects
zval **tmp;
int rsrc_type;
int parent_rsrc_type;
int id_to_find;
char _wxResource[] = "wxResource";
//Other variables used thru the code
int arguments_received = ZEND_NUM_ARGS();
void *_this;
zval* dummy;
bool already_called = false;
wxPHPObjectReferences* references;
bool return_is_user_initialized = false;
//Get pointer of object that called this method if not a static method
if (getThis() != NULL)
{
if(zend_hash_find(Z_OBJPROP_P(getThis()), _wxResource, sizeof(_wxResource), (void **)&tmp) == FAILURE)
{
zend_error(E_ERROR, "Failed to get the parent object that called wxEventLoopBase::IsMain\n");
return;
}
else
{
id_to_find = Z_RESVAL_P(*tmp);
_this = zend_list_find(id_to_find, &parent_rsrc_type);
bool reference_type_found = false;
if(parent_rsrc_type == le_wxEventLoopBase){
references = &((wxEventLoopBase_php*)_this)->references;
reference_type_found = true;
}
}
}
#ifdef USE_WXPHP_DEBUG
else
{
php_printf("Processing the method call as static\n");
}
#endif
//Parameters for overload 0
bool overload0_called = false;
//Overload 0
overload0:
if(!already_called && arguments_received == 0)
{
#ifdef USE_WXPHP_DEBUG
php_printf("Parameters received %d\n", arguments_received);
php_printf("Parsing parameters with '' ()\n");
#endif
overload0_called = true;
already_called = true;
}
if(overload0_called)
{
switch(arguments_received)
{
case 0:
{
#ifdef USE_WXPHP_DEBUG
php_printf("Executing RETURN_BOOL(wxEventLoopBase::IsMain())\n\n");
#endif
if(parent_rsrc_type == le_wxEventLoopBase)
{
ZVAL_BOOL(return_value, ((wxEventLoopBase_php*)_this)->IsMain());
}
return;
break;
}
}
}
//In case wrong type/count of parameters was passed
if(!already_called)
{
zend_error(E_ERROR, "Wrong type or count of parameters passed to: wxEventLoopBase::IsMain\n");
}
}
PHP_METHOD(php_wxEventLoopBase, IsOk)
{
#ifdef USE_WXPHP_DEBUG
php_printf("Invoking wxEventLoopBase::IsOk\n");
php_printf("===========================================\n");
#endif
//In case the constructor uses objects
zval **tmp;
int rsrc_type;
int parent_rsrc_type;
int id_to_find;
char _wxResource[] = "wxResource";
//Other variables used thru the code
int arguments_received = ZEND_NUM_ARGS();
void *_this;
zval* dummy;
bool already_called = false;
wxPHPObjectReferences* references;
bool return_is_user_initialized = false;
//Get pointer of object that called this method if not a static method
if (getThis() != NULL)
{
if(zend_hash_find(Z_OBJPROP_P(getThis()), _wxResource, sizeof(_wxResource), (void **)&tmp) == FAILURE)
{
zend_error(E_ERROR, "Failed to get the parent object that called wxEventLoopBase::IsOk\n");
return;
}
else
{
id_to_find = Z_RESVAL_P(*tmp);
_this = zend_list_find(id_to_find, &parent_rsrc_type);
bool reference_type_found = false;
if(parent_rsrc_type == le_wxEventLoopBase){
references = &((wxEventLoopBase_php*)_this)->references;
reference_type_found = true;
}
}
}
#ifdef USE_WXPHP_DEBUG
else
{
php_printf("Processing the method call as static\n");
}
#endif
//Parameters for overload 0
bool overload0_called = false;
//Overload 0
overload0:
if(!already_called && arguments_received == 0)
{
#ifdef USE_WXPHP_DEBUG
php_printf("Parameters received %d\n", arguments_received);
php_printf("Parsing parameters with '' ()\n");
#endif
overload0_called = true;
already_called = true;
}
if(overload0_called)
{
switch(arguments_received)
{
case 0:
{
#ifdef USE_WXPHP_DEBUG
php_printf("Executing RETURN_BOOL(wxEventLoopBase::IsOk())\n\n");
#endif
if(parent_rsrc_type == le_wxEventLoopBase)
{
ZVAL_BOOL(return_value, ((wxEventLoopBase_php*)_this)->IsOk());
}
return;
break;
}
}
}
//In case wrong type/count of parameters was passed
if(!already_called)
{
zend_error(E_ERROR, "Wrong type or count of parameters passed to: wxEventLoopBase::IsOk\n");
}
}
PHP_METHOD(php_wxEventLoopBase, IsRunning)
{
#ifdef USE_WXPHP_DEBUG
php_printf("Invoking wxEventLoopBase::IsRunning\n");
php_printf("===========================================\n");
#endif
//In case the constructor uses objects
zval **tmp;
int rsrc_type;
int parent_rsrc_type;
int id_to_find;
char _wxResource[] = "wxResource";
//Other variables used thru the code
int arguments_received = ZEND_NUM_ARGS();
void *_this;
zval* dummy;
bool already_called = false;
wxPHPObjectReferences* references;
bool return_is_user_initialized = false;
//Get pointer of object that called this method if not a static method
if (getThis() != NULL)
{
if(zend_hash_find(Z_OBJPROP_P(getThis()), _wxResource, sizeof(_wxResource), (void **)&tmp) == FAILURE)
{
zend_error(E_ERROR, "Failed to get the parent object that called wxEventLoopBase::IsRunning\n");
return;
}
else
{
id_to_find = Z_RESVAL_P(*tmp);
_this = zend_list_find(id_to_find, &parent_rsrc_type);
bool reference_type_found = false;
if(parent_rsrc_type == le_wxEventLoopBase){
references = &((wxEventLoopBase_php*)_this)->references;
reference_type_found = true;
}
}
}
#ifdef USE_WXPHP_DEBUG
else
{
php_printf("Processing the method call as static\n");
}
#endif
//Parameters for overload 0
bool overload0_called = false;
//Overload 0
overload0:
if(!already_called && arguments_received == 0)
{
#ifdef USE_WXPHP_DEBUG
php_printf("Parameters received %d\n", arguments_received);
php_printf("Parsing parameters with '' ()\n");
#endif
overload0_called = true;
already_called = true;
}
if(overload0_called)
{
switch(arguments_received)
{
case 0:
{
#ifdef USE_WXPHP_DEBUG
php_printf("Executing RETURN_BOOL(wxEventLoopBase::IsRunning())\n\n");
#endif
if(parent_rsrc_type == le_wxEventLoopBase)
{
ZVAL_BOOL(return_value, ((wxEventLoopBase_php*)_this)->IsRunning());
}
return;
break;
}
}
}
//In case wrong type/count of parameters was passed
if(!already_called)
{
zend_error(E_ERROR, "Wrong type or count of parameters passed to: wxEventLoopBase::IsRunning\n");
}
}
PHP_METHOD(php_wxEventLoopBase, IsYielding)
{
#ifdef USE_WXPHP_DEBUG
php_printf("Invoking wxEventLoopBase::IsYielding\n");
php_printf("===========================================\n");
#endif
//In case the constructor uses objects
zval **tmp;
int rsrc_type;
int parent_rsrc_type;
int id_to_find;
char _wxResource[] = "wxResource";
//Other variables used thru the code
int arguments_received = ZEND_NUM_ARGS();
void *_this;
zval* dummy;
bool already_called = false;
wxPHPObjectReferences* references;
bool return_is_user_initialized = false;
//Get pointer of object that called this method if not a static method
if (getThis() != NULL)
{
if(zend_hash_find(Z_OBJPROP_P(getThis()), _wxResource, sizeof(_wxResource), (void **)&tmp) == FAILURE)
{
zend_error(E_ERROR, "Failed to get the parent object that called wxEventLoopBase::IsYielding\n");
return;
}
else
{
id_to_find = Z_RESVAL_P(*tmp);
_this = zend_list_find(id_to_find, &parent_rsrc_type);
bool reference_type_found = false;
if(parent_rsrc_type == le_wxEventLoopBase){
references = &((wxEventLoopBase_php*)_this)->references;
reference_type_found = true;
}
}
}
#ifdef USE_WXPHP_DEBUG
else
{
php_printf("Processing the method call as static\n");
}
#endif
//Parameters for overload 0
bool overload0_called = false;
//Overload 0
overload0:
if(!already_called && arguments_received == 0)
{
#ifdef USE_WXPHP_DEBUG
php_printf("Parameters received %d\n", arguments_received);
php_printf("Parsing parameters with '' ()\n");
#endif
overload0_called = true;
already_called = true;
}
if(overload0_called)
{
switch(arguments_received)
{
case 0:
{
#ifdef USE_WXPHP_DEBUG
php_printf("Executing RETURN_BOOL(wxEventLoopBase::IsYielding())\n\n");
#endif
if(parent_rsrc_type == le_wxEventLoopBase)
{
ZVAL_BOOL(return_value, ((wxEventLoopBase_php*)_this)->IsYielding());
}
return;
break;
}
}
}
//In case wrong type/count of parameters was passed
if(!already_called)
{
zend_error(E_ERROR, "Wrong type or count of parameters passed to: wxEventLoopBase::IsYielding\n");
}
}
void wxEventLoopBase_php::OnExit()
{
#ifdef USE_WXPHP_DEBUG
php_printf("Invoking virtual wxEventLoopBase::OnExit\n");
php_printf("===========================================\n");
#endif
zval* arguments[1];
arguments[0] = NULL;
zval* return_value;
MAKE_STD_ZVAL(return_value);
zval function_name;
ZVAL_STRING(&function_name, "OnExit", 0);
char* temp_string;
char _wxResource[] = "wxResource";
zval **tmp;
int id_to_find;
void* return_object;
int rsrc_type;
//Parameters for conversion
#ifdef USE_WXPHP_DEBUG
php_printf("Trying to call user defined method\n");
#endif
if(call_user_function(NULL, (zval**) &this->phpObj, &function_name, return_value, 0, arguments TSRMLS_CC) == FAILURE)
{
#ifdef USE_WXPHP_DEBUG
php_printf("Invocation of user defined method failed\n");
#endif
}
else
{
#ifdef USE_WXPHP_DEBUG
php_printf("Returning userspace value.\n");
#endif
return;
}
#ifdef USE_WXPHP_DEBUG
php_printf("Calling original method\n");
php_printf("===========================================\n\n");
#endif
//Call original method
wxEventLoopBase::OnExit();
}
bool wxEventLoopBase_php::Pending()const
{
#ifdef USE_WXPHP_DEBUG
php_printf("Invoking virtual wxEventLoopBase::Pending\n");
php_printf("===========================================\n");
#endif
zval* arguments[1];
arguments[0] = NULL;
zval* return_value;
MAKE_STD_ZVAL(return_value);
zval function_name;
ZVAL_STRING(&function_name, "Pending", 0);
char* temp_string;
char _wxResource[] = "wxResource";
zval **tmp;
int id_to_find;
void* return_object;
int rsrc_type;
//Parameters for conversion
#ifdef USE_WXPHP_DEBUG
php_printf("Trying to call user defined method\n");
#endif
if(call_user_function(NULL, (zval**) &this->phpObj, &function_name, return_value, 0, arguments TSRMLS_CC) == FAILURE)
{
#ifdef USE_WXPHP_DEBUG
php_printf("Invocation of user defined method failed\n");
#endif
wxMessageBox("Failed to call virtual method 'wxEventLoopBase::Pending'!", "Error");
}
#ifdef USE_WXPHP_DEBUG
php_printf("Returning userspace value.\n");
#endif
return Z_BVAL_P(return_value);
}
PHP_METHOD(php_wxEventLoopBase, ProcessIdle)
{
#ifdef USE_WXPHP_DEBUG
php_printf("Invoking wxEventLoopBase::ProcessIdle\n");
php_printf("===========================================\n");
#endif
//In case the constructor uses objects
zval **tmp;
int rsrc_type;
int parent_rsrc_type;
int id_to_find;
char _wxResource[] = "wxResource";
//Other variables used thru the code
int arguments_received = ZEND_NUM_ARGS();
void *_this;
zval* dummy;
bool already_called = false;
wxPHPObjectReferences* references;
bool return_is_user_initialized = false;
//Get pointer of object that called this method if not a static method
if (getThis() != NULL)
{
if(zend_hash_find(Z_OBJPROP_P(getThis()), _wxResource, sizeof(_wxResource), (void **)&tmp) == FAILURE)
{
zend_error(E_ERROR, "Failed to get the parent object that called wxEventLoopBase::ProcessIdle\n");
return;
}
else
{
id_to_find = Z_RESVAL_P(*tmp);
_this = zend_list_find(id_to_find, &parent_rsrc_type);
bool reference_type_found = false;
if(parent_rsrc_type == le_wxEventLoopBase){
references = &((wxEventLoopBase_php*)_this)->references;
reference_type_found = true;
}
}
}
#ifdef USE_WXPHP_DEBUG
else
{
php_printf("Processing the method call as static\n");
}
#endif
//Parameters for overload 0
bool overload0_called = false;
//Overload 0
overload0:
if(!already_called && arguments_received == 0)
{
#ifdef USE_WXPHP_DEBUG
php_printf("Parameters received %d\n", arguments_received);
php_printf("Parsing parameters with '' ()\n");
#endif
overload0_called = true;
already_called = true;
}
if(overload0_called)
{
switch(arguments_received)
{
case 0:
{
#ifdef USE_WXPHP_DEBUG
php_printf("Executing RETURN_BOOL(wxEventLoopBase::ProcessIdle())\n\n");
#endif
if(parent_rsrc_type == le_wxEventLoopBase)
{
ZVAL_BOOL(return_value, ((wxEventLoopBase_php*)_this)->ProcessIdle());
}
return;
break;
}
}
}
//In case wrong type/count of parameters was passed
if(!already_called)
{
zend_error(E_ERROR, "Wrong type or count of parameters passed to: wxEventLoopBase::ProcessIdle\n");
}
}
int wxEventLoopBase_php::Run()
{
#ifdef USE_WXPHP_DEBUG
php_printf("Invoking virtual wxEventLoopBase::Run\n");
php_printf("===========================================\n");
#endif
zval* arguments[1];
arguments[0] = NULL;
zval* return_value;
MAKE_STD_ZVAL(return_value);
zval function_name;
ZVAL_STRING(&function_name, "Run", 0);
char* temp_string;
char _wxResource[] = "wxResource";
zval **tmp;
int id_to_find;
void* return_object;
int rsrc_type;
//Parameters for conversion
#ifdef USE_WXPHP_DEBUG
php_printf("Trying to call user defined method\n");
#endif
if(call_user_function(NULL, (zval**) &this->phpObj, &function_name, return_value, 0, arguments TSRMLS_CC) == FAILURE)
{
#ifdef USE_WXPHP_DEBUG
php_printf("Invocation of user defined method failed\n");
#endif
wxMessageBox("Failed to call virtual method 'wxEventLoopBase::Run'!", "Error");
}
#ifdef USE_WXPHP_DEBUG
php_printf("Returning userspace value.\n");
#endif
return (int) Z_LVAL_P(return_value);
}
PHP_METHOD(php_wxEventLoopBase, SetActive)
{
#ifdef USE_WXPHP_DEBUG
php_printf("Invoking wxEventLoopBase::SetActive\n");
php_printf("===========================================\n");
#endif
//In case the constructor uses objects
zval **tmp;
int rsrc_type;
int parent_rsrc_type;
int id_to_find;
char _wxResource[] = "wxResource";
//Other variables used thru the code
int arguments_received = ZEND_NUM_ARGS();
void *_this;
zval* dummy;
bool already_called = false;
wxPHPObjectReferences* references;
bool return_is_user_initialized = false;
//Get pointer of object that called this method if not a static method
if (getThis() != NULL)
{
if(zend_hash_find(Z_OBJPROP_P(getThis()), _wxResource, sizeof(_wxResource), (void **)&tmp) == FAILURE)
{
zend_error(E_ERROR, "Failed to get the parent object that called wxEventLoopBase::SetActive\n");
return;
}
else
{
id_to_find = Z_RESVAL_P(*tmp);
_this = zend_list_find(id_to_find, &parent_rsrc_type);
bool reference_type_found = false;
if(parent_rsrc_type == le_wxEventLoopBase){
references = &((wxEventLoopBase_php*)_this)->references;
reference_type_found = true;
}
}
}
#ifdef USE_WXPHP_DEBUG
else
{
php_printf("Processing the method call as static\n");
}
#endif
//Parameters for overload 0
zval* loop0 = 0;
void* object_pointer0_0 = 0;
bool overload0_called = false;
//Overload 0
overload0:
if(!already_called && arguments_received == 1)
{
#ifdef USE_WXPHP_DEBUG
php_printf("Parameters received %d\n", arguments_received);
php_printf("Parsing parameters with 'z' (&loop0)\n");
#endif
char parse_parameters_string[] = "z";
if(zend_parse_parameters_ex(ZEND_PARSE_PARAMS_QUIET, arguments_received TSRMLS_CC, parse_parameters_string, &loop0 ) == SUCCESS)
{
if(arguments_received >= 1){
if(Z_TYPE_P(loop0) == IS_OBJECT && zend_hash_find(Z_OBJPROP_P(loop0), _wxResource , sizeof(_wxResource), (void **)&tmp) == SUCCESS)
{
id_to_find = Z_RESVAL_P(*tmp);
object_pointer0_0 = zend_list_find(id_to_find, &rsrc_type);
if (!object_pointer0_0 )
{
zend_error(E_ERROR, "Parameter could not be retreived correctly.");
}
}
else if(Z_TYPE_P(loop0) != IS_NULL)
{
zend_error(E_ERROR, "Parameter could not be retreived correctly.");
}
}
overload0_called = true;
already_called = true;
}
}
if(overload0_called)
{
switch(arguments_received)
{
case 1:
{
#ifdef USE_WXPHP_DEBUG
php_printf("Static ");
php_printf("Executing wxEventLoopBase::SetActive((wxEventLoopBase*) object_pointer0_0)\n\n");
#endif
wxEventLoopBase::SetActive((wxEventLoopBase*) object_pointer0_0);
return;
break;
}
}
}
//In case wrong type/count of parameters was passed
if(!already_called)
{
zend_error(E_ERROR, "Wrong type or count of parameters passed to: wxEventLoopBase::SetActive\n");
}
}
void wxEventLoopBase_php::WakeUp()
{
#ifdef USE_WXPHP_DEBUG
php_printf("Invoking virtual wxEventLoopBase::WakeUp\n");
php_printf("===========================================\n");
#endif
zval* arguments[1];
arguments[0] = NULL;
zval* return_value;
MAKE_STD_ZVAL(return_value);
zval function_name;
ZVAL_STRING(&function_name, "WakeUp", 0);
char* temp_string;
char _wxResource[] = "wxResource";
zval **tmp;
int id_to_find;
void* return_object;
int rsrc_type;
//Parameters for conversion
#ifdef USE_WXPHP_DEBUG
php_printf("Trying to call user defined method\n");
#endif
if(call_user_function(NULL, (zval**) &this->phpObj, &function_name, return_value, 0, arguments TSRMLS_CC) == FAILURE)
{
#ifdef USE_WXPHP_DEBUG
php_printf("Invocation of user defined method failed\n");
#endif
wxMessageBox("Failed to call virtual method 'wxEventLoopBase::WakeUp'!", "Error");
}
#ifdef USE_WXPHP_DEBUG
php_printf("Returning userspace value.\n");
#endif
return;
}
PHP_METHOD(php_wxEventLoopBase, WakeUpIdle)
{
#ifdef USE_WXPHP_DEBUG
php_printf("Invoking wxEventLoopBase::WakeUpIdle\n");
php_printf("===========================================\n");
#endif
//In case the constructor uses objects
zval **tmp;
int rsrc_type;
int parent_rsrc_type;
int id_to_find;
char _wxResource[] = "wxResource";
//Other variables used thru the code
int arguments_received = ZEND_NUM_ARGS();
void *_this;
zval* dummy;
bool already_called = false;
wxPHPObjectReferences* references;
bool return_is_user_initialized = false;
//Get pointer of object that called this method if not a static method
if (getThis() != NULL)
{
if(zend_hash_find(Z_OBJPROP_P(getThis()), _wxResource, sizeof(_wxResource), (void **)&tmp) == FAILURE)
{
zend_error(E_ERROR, "Failed to get the parent object that called wxEventLoopBase::WakeUpIdle\n");
return;
}
else
{
id_to_find = Z_RESVAL_P(*tmp);
_this = zend_list_find(id_to_find, &parent_rsrc_type);
bool reference_type_found = false;
if(parent_rsrc_type == le_wxEventLoopBase){
references = &((wxEventLoopBase_php*)_this)->references;
reference_type_found = true;
}
}
}
#ifdef USE_WXPHP_DEBUG
else
{
php_printf("Processing the method call as static\n");
}
#endif
//Parameters for overload 0
bool overload0_called = false;
//Overload 0
overload0:
if(!already_called && arguments_received == 0)
{
#ifdef USE_WXPHP_DEBUG
php_printf("Parameters received %d\n", arguments_received);
php_printf("Parsing parameters with '' ()\n");
#endif
overload0_called = true;
already_called = true;
}
if(overload0_called)
{
switch(arguments_received)
{
case 0:
{
#ifdef USE_WXPHP_DEBUG
php_printf("Executing wxEventLoopBase::WakeUpIdle()\n\n");
#endif
if(parent_rsrc_type == le_wxEventLoopBase)
{
((wxEventLoopBase_php*)_this)->WakeUpIdle();
}
return;
break;
}
}
}
//In case wrong type/count of parameters was passed
if(!already_called)
{
zend_error(E_ERROR, "Wrong type or count of parameters passed to: wxEventLoopBase::WakeUpIdle\n");
}
}
PHP_METHOD(php_wxEventLoopBase, Yield)
{
#ifdef USE_WXPHP_DEBUG
php_printf("Invoking wxEventLoopBase::Yield\n");
php_printf("===========================================\n");
#endif
//In case the constructor uses objects
zval **tmp;
int rsrc_type;
int parent_rsrc_type;
int id_to_find;
char _wxResource[] = "wxResource";
//Other variables used thru the code
int arguments_received = ZEND_NUM_ARGS();
void *_this;
zval* dummy;
bool already_called = false;
wxPHPObjectReferences* references;
bool return_is_user_initialized = false;
//Get pointer of object that called this method if not a static method
if (getThis() != NULL)
{
if(zend_hash_find(Z_OBJPROP_P(getThis()), _wxResource, sizeof(_wxResource), (void **)&tmp) == FAILURE)
{
zend_error(E_ERROR, "Failed to get the parent object that called wxEventLoopBase::Yield\n");
return;
}
else
{
id_to_find = Z_RESVAL_P(*tmp);
_this = zend_list_find(id_to_find, &parent_rsrc_type);
bool reference_type_found = false;
if(parent_rsrc_type == le_wxEventLoopBase){
references = &((wxEventLoopBase_php*)_this)->references;
reference_type_found = true;
}
}
}
#ifdef USE_WXPHP_DEBUG
else
{
php_printf("Processing the method call as static\n");
}
#endif
//Parameters for overload 0
bool onlyIfNeeded0;
bool overload0_called = false;
//Overload 0
overload0:
if(!already_called && arguments_received >= 0 && arguments_received <= 1)
{
#ifdef USE_WXPHP_DEBUG
php_printf("Parameters received %d\n", arguments_received);
php_printf("Parsing parameters with '|b' (&onlyIfNeeded0)\n");
#endif
char parse_parameters_string[] = "|b";
if(zend_parse_parameters_ex(ZEND_PARSE_PARAMS_QUIET, arguments_received TSRMLS_CC, parse_parameters_string, &onlyIfNeeded0 ) == SUCCESS)
{
overload0_called = true;
already_called = true;
}
}
if(overload0_called)
{
switch(arguments_received)
{
case 0:
{
#ifdef USE_WXPHP_DEBUG
php_printf("Executing RETURN_BOOL(wxEventLoopBase::Yield())\n\n");
#endif
if(parent_rsrc_type == le_wxEventLoopBase)
{
ZVAL_BOOL(return_value, ((wxEventLoopBase_php*)_this)->Yield());
}
return;
break;
}
case 1:
{
#ifdef USE_WXPHP_DEBUG
php_printf("Executing RETURN_BOOL(wxEventLoopBase::Yield(onlyIfNeeded0))\n\n");
#endif
if(parent_rsrc_type == le_wxEventLoopBase)
{
ZVAL_BOOL(return_value, ((wxEventLoopBase_php*)_this)->Yield(onlyIfNeeded0));
}
return;
break;
}
}
}
//In case wrong type/count of parameters was passed
if(!already_called)
{
zend_error(E_ERROR, "Wrong type or count of parameters passed to: wxEventLoopBase::Yield\n");
}
}
PHP_METHOD(php_wxEventLoopBase, YieldFor)
{
#ifdef USE_WXPHP_DEBUG
php_printf("Invoking wxEventLoopBase::YieldFor\n");
php_printf("===========================================\n");
#endif
//In case the constructor uses objects
zval **tmp;
int rsrc_type;
int parent_rsrc_type;
int id_to_find;
char _wxResource[] = "wxResource";
//Other variables used thru the code
int arguments_received = ZEND_NUM_ARGS();
void *_this;
zval* dummy;
bool already_called = false;
wxPHPObjectReferences* references;
bool return_is_user_initialized = false;
//Get pointer of object that called this method if not a static method
if (getThis() != NULL)
{
if(zend_hash_find(Z_OBJPROP_P(getThis()), _wxResource, sizeof(_wxResource), (void **)&tmp) == FAILURE)
{
zend_error(E_ERROR, "Failed to get the parent object that called wxEventLoopBase::YieldFor\n");
return;
}
else
{
id_to_find = Z_RESVAL_P(*tmp);
_this = zend_list_find(id_to_find, &parent_rsrc_type);
bool reference_type_found = false;
if(parent_rsrc_type == le_wxEventLoopBase){
references = &((wxEventLoopBase_php*)_this)->references;
reference_type_found = true;
}
}
}
#ifdef USE_WXPHP_DEBUG
else
{
php_printf("Processing the method call as static\n");
}
#endif
//Parameters for overload 0
long eventsToProcess0;
bool overload0_called = false;
//Overload 0
overload0:
if(!already_called && arguments_received == 1)
{
#ifdef USE_WXPHP_DEBUG
php_printf("Parameters received %d\n", arguments_received);
php_printf("Parsing parameters with 'l' (&eventsToProcess0)\n");
#endif
char parse_parameters_string[] = "l";
if(zend_parse_parameters_ex(ZEND_PARSE_PARAMS_QUIET, arguments_received TSRMLS_CC, parse_parameters_string, &eventsToProcess0 ) == SUCCESS)
{
overload0_called = true;
already_called = true;
}
}
if(overload0_called)
{
switch(arguments_received)
{
case 1:
{
#ifdef USE_WXPHP_DEBUG
php_printf("Executing RETURN_BOOL(wxEventLoopBase::YieldFor((long) eventsToProcess0))\n\n");
#endif
if(parent_rsrc_type == le_wxEventLoopBase)
{
ZVAL_BOOL(return_value, ((wxEventLoopBase_php*)_this)->YieldFor((long) eventsToProcess0));
}
return;
break;
}
}
}
//In case wrong type/count of parameters was passed
if(!already_called)
{
zend_error(E_ERROR, "Wrong type or count of parameters passed to: wxEventLoopBase::YieldFor\n");
}
}
void php_wxEventLoopActivator_destruction_handler(zend_rsrc_list_entry *rsrc TSRMLS_DC)
{
#ifdef USE_WXPHP_DEBUG
php_printf("Calling php_wxEventLoopActivator_destruction_handler on %s at line %i\n", zend_get_executed_filename(TSRMLS_C), zend_get_executed_lineno(TSRMLS_C));
php_printf("===========================================\n");
#endif
wxEventLoopActivator_php* object = static_cast<wxEventLoopActivator_php*>(rsrc->ptr);
if(rsrc->ptr != NULL)
{
#ifdef USE_WXPHP_DEBUG
php_printf("Pointer not null\n");
php_printf("Pointer address %x\n", (unsigned int)(size_t)rsrc->ptr);
#endif
if(object->references.IsUserInitialized())
{
#ifdef USE_WXPHP_DEBUG
php_printf("Deleting pointer with delete\n");
#endif
delete object;
rsrc->ptr = NULL;
}
#ifdef USE_WXPHP_DEBUG
php_printf("Deletion of wxEventLoopActivator done\n");
php_printf("===========================================\n\n");
#endif
}
else
{
#ifdef USE_WXPHP_DEBUG
php_printf("Not user space initialized\n");
#endif
}
}
PHP_METHOD(php_wxEventLoopActivator, __construct)
{
#ifdef USE_WXPHP_DEBUG
php_printf("Invoking wxEventLoopActivator::__construct\n");
php_printf("===========================================\n");
#endif
//In case the constructor uses objects
zval **tmp;
int rsrc_type;
int id_to_find;
char _wxResource[] = "wxResource";
//Other variables used thru the code
int arguments_received = ZEND_NUM_ARGS();
void *_this;
zval* dummy;
bool already_called = false;
//Parameters for overload 0
zval* loop0 = 0;
void* object_pointer0_0 = 0;
bool overload0_called = false;
//Overload 0
overload0:
if(!already_called && arguments_received == 1)
{
#ifdef USE_WXPHP_DEBUG
php_printf("Parameters received %d\n", arguments_received);
php_printf("Parsing parameters with 'z' (&loop0)\n");
#endif
char parse_parameters_string[] = "z";
if(zend_parse_parameters_ex(ZEND_PARSE_PARAMS_QUIET, arguments_received TSRMLS_CC, parse_parameters_string, &loop0 ) == SUCCESS)
{
if(arguments_received >= 1){
if(Z_TYPE_P(loop0) == IS_OBJECT && zend_hash_find(Z_OBJPROP_P(loop0), _wxResource , sizeof(_wxResource), (void **)&tmp) == SUCCESS)
{
id_to_find = Z_RESVAL_P(*tmp);
object_pointer0_0 = zend_list_find(id_to_find, &rsrc_type);
if (!object_pointer0_0 )
{
zend_error(E_ERROR, "Parameter could not be retreived correctly.");
}
}
else if(Z_TYPE_P(loop0) != IS_NULL)
{
zend_error(E_ERROR, "Parameter could not be retreived correctly.");
}
}
overload0_called = true;
already_called = true;
}
}
if(overload0_called)
{
switch(arguments_received)
{
case 1:
{
#ifdef USE_WXPHP_DEBUG
php_printf("Executing __construct((wxEventLoopBase*) object_pointer0_0)\n");
#endif
_this = new wxEventLoopActivator_php((wxEventLoopBase*) object_pointer0_0);
((wxEventLoopActivator_php*) _this)->references.Initialize();
((wxEventLoopActivator_php*) _this)->references.AddReference(loop0);
break;
}
}
}
if(already_called)
{
long id_to_find = zend_list_insert(_this, le_wxEventLoopActivator);
add_property_resource(getThis(), _wxResource, id_to_find);
MAKE_STD_ZVAL(((wxEventLoopActivator_php*) _this)->evnArray);
array_init(((wxEventLoopActivator_php*) _this)->evnArray);
((wxEventLoopActivator_php*) _this)->phpObj = getThis();
((wxEventLoopActivator_php*) _this)->InitProperties();
#ifdef ZTS
((wxEventLoopActivator_php*) _this)->TSRMLS_C = TSRMLS_C;
#endif
}
else
{
zend_error(E_ERROR, "Abstract class or wrong type/count of parameters passed to: wxEventLoopActivator::__constructor\n");
}
#ifdef USE_WXPHP_DEBUG
php_printf("===========================================\n\n");
#endif
}
void php_wxModule_destruction_handler(zend_rsrc_list_entry *rsrc TSRMLS_DC)
{
#ifdef USE_WXPHP_DEBUG
php_printf("Calling php_wxModule_destruction_handler on %s at line %i\n", zend_get_executed_filename(TSRMLS_C), zend_get_executed_lineno(TSRMLS_C));
php_printf("===========================================\n");
#endif
wxModule_php* object = static_cast<wxModule_php*>(rsrc->ptr);
if(rsrc->ptr != NULL)
{
#ifdef USE_WXPHP_DEBUG
php_printf("Pointer not null\n");
php_printf("Pointer address %x\n", (unsigned int)(size_t)rsrc->ptr);
#endif
if(object->references.IsUserInitialized())
{
#ifdef USE_WXPHP_DEBUG
php_printf("Deleting pointer with delete\n");
#endif
delete object;
rsrc->ptr = NULL;
}
#ifdef USE_WXPHP_DEBUG
php_printf("Deletion of wxModule done\n");
php_printf("===========================================\n\n");
#endif
}
else
{
#ifdef USE_WXPHP_DEBUG
php_printf("Not user space initialized\n");
#endif
}
}
void wxModule_php::OnExit()
{
#ifdef USE_WXPHP_DEBUG
php_printf("Invoking virtual wxModule::OnExit\n");
php_printf("===========================================\n");
#endif
zval* arguments[1];
arguments[0] = NULL;
zval* return_value;
MAKE_STD_ZVAL(return_value);
zval function_name;
ZVAL_STRING(&function_name, "OnExit", 0);
char* temp_string;
char _wxResource[] = "wxResource";
zval **tmp;
int id_to_find;
void* return_object;
int rsrc_type;
//Parameters for conversion
#ifdef USE_WXPHP_DEBUG
php_printf("Trying to call user defined method\n");
#endif
if(call_user_function(NULL, (zval**) &this->phpObj, &function_name, return_value, 0, arguments TSRMLS_CC) == FAILURE)
{
#ifdef USE_WXPHP_DEBUG
php_printf("Invocation of user defined method failed\n");
#endif
wxMessageBox("Failed to call virtual method 'wxModule::OnExit'!", "Error");
}
#ifdef USE_WXPHP_DEBUG
php_printf("Returning userspace value.\n");
#endif
return;
}
bool wxModule_php::OnInit()
{
#ifdef USE_WXPHP_DEBUG
php_printf("Invoking virtual wxModule::OnInit\n");
php_printf("===========================================\n");
#endif
zval* arguments[1];
arguments[0] = NULL;
zval* return_value;
MAKE_STD_ZVAL(return_value);
zval function_name;
ZVAL_STRING(&function_name, "OnInit", 0);
char* temp_string;
char _wxResource[] = "wxResource";
zval **tmp;
int id_to_find;
void* return_object;
int rsrc_type;
//Parameters for conversion
#ifdef USE_WXPHP_DEBUG
php_printf("Trying to call user defined method\n");
#endif
if(call_user_function(NULL, (zval**) &this->phpObj, &function_name, return_value, 0, arguments TSRMLS_CC) == FAILURE)
{
#ifdef USE_WXPHP_DEBUG
php_printf("Invocation of user defined method failed\n");
#endif
wxMessageBox("Failed to call virtual method 'wxModule::OnInit'!", "Error");
}
#ifdef USE_WXPHP_DEBUG
php_printf("Returning userspace value.\n");
#endif
return Z_BVAL_P(return_value);
}
PHP_METHOD(php_wxModule, __construct)
{
#ifdef USE_WXPHP_DEBUG
php_printf("Invoking wxModule::__construct\n");
php_printf("===========================================\n");
#endif
//In case the constructor uses objects
zval **tmp;
int rsrc_type;
int id_to_find;
char _wxResource[] = "wxResource";
//Other variables used thru the code
int arguments_received = ZEND_NUM_ARGS();
void *_this;
zval* dummy;
bool already_called = false;
//Parameters for overload 0
bool overload0_called = false;
//Overload 0
overload0:
if(!already_called && arguments_received == 0)
{
#ifdef USE_WXPHP_DEBUG
php_printf("Parameters received %d\n", arguments_received);
php_printf("Parsing parameters with '' ()\n");
#endif
overload0_called = true;
already_called = true;
}
if(overload0_called)
{
switch(arguments_received)
{
case 0:
{
#ifdef USE_WXPHP_DEBUG
php_printf("Executing __construct()\n");
#endif
_this = new wxModule_php();
((wxModule_php*) _this)->references.Initialize();
break;
}
}
}
if(already_called)
{
long id_to_find = zend_list_insert(_this, le_wxModule);
add_property_resource(getThis(), _wxResource, id_to_find);
MAKE_STD_ZVAL(((wxModule_php*) _this)->evnArray);
array_init(((wxModule_php*) _this)->evnArray);
((wxModule_php*) _this)->phpObj = getThis();
((wxModule_php*) _this)->InitProperties();
#ifdef ZTS
((wxModule_php*) _this)->TSRMLS_C = TSRMLS_C;
#endif
}
else
{
zend_error(E_ERROR, "Abstract class or wrong type/count of parameters passed to: wxModule::__constructor\n");
}
#ifdef USE_WXPHP_DEBUG
php_printf("===========================================\n\n");
#endif
}
void php_wxProcess_destruction_handler(zend_rsrc_list_entry *rsrc TSRMLS_DC)
{
#ifdef USE_WXPHP_DEBUG
php_printf("Calling php_wxProcess_destruction_handler on %s at line %i\n", zend_get_executed_filename(TSRMLS_C), zend_get_executed_lineno(TSRMLS_C));
php_printf("===========================================\n");
#endif
wxProcess_php* object = static_cast<wxProcess_php*>(rsrc->ptr);
if(rsrc->ptr != NULL)
{
#ifdef USE_WXPHP_DEBUG
php_printf("Pointer not null\n");
php_printf("Pointer address %x\n", (unsigned int)(size_t)rsrc->ptr);
#endif
if(object->references.IsUserInitialized())
{
#ifdef USE_WXPHP_DEBUG
php_printf("Deleting pointer with delete\n");
#endif
delete object;
rsrc->ptr = NULL;
}
#ifdef USE_WXPHP_DEBUG
php_printf("Deletion of wxProcess done\n");
php_printf("===========================================\n\n");
#endif
}
else
{
#ifdef USE_WXPHP_DEBUG
php_printf("Not user space initialized\n");
#endif
}
}
PHP_METHOD(php_wxProcess, CloseOutput)
{
#ifdef USE_WXPHP_DEBUG
php_printf("Invoking wxProcess::CloseOutput\n");
php_printf("===========================================\n");
#endif
//In case the constructor uses objects
zval **tmp;
int rsrc_type;
int parent_rsrc_type;
int id_to_find;
char _wxResource[] = "wxResource";
//Other variables used thru the code
int arguments_received = ZEND_NUM_ARGS();
void *_this;
zval* dummy;
bool already_called = false;
wxPHPObjectReferences* references;
bool return_is_user_initialized = false;
//Get pointer of object that called this method if not a static method
if (getThis() != NULL)
{
if(zend_hash_find(Z_OBJPROP_P(getThis()), _wxResource, sizeof(_wxResource), (void **)&tmp) == FAILURE)
{
zend_error(E_ERROR, "Failed to get the parent object that called wxProcess::CloseOutput\n");
return;
}
else
{
id_to_find = Z_RESVAL_P(*tmp);
_this = zend_list_find(id_to_find, &parent_rsrc_type);
bool reference_type_found = false;
if(parent_rsrc_type == le_wxProcess){
references = &((wxProcess_php*)_this)->references;
reference_type_found = true;
}
}
}
#ifdef USE_WXPHP_DEBUG
else
{
php_printf("Processing the method call as static\n");
}
#endif
//Parameters for overload 0
bool overload0_called = false;
//Overload 0
overload0:
if(!already_called && arguments_received == 0)
{
#ifdef USE_WXPHP_DEBUG
php_printf("Parameters received %d\n", arguments_received);
php_printf("Parsing parameters with '' ()\n");
#endif
overload0_called = true;
already_called = true;
}
if(overload0_called)
{
switch(arguments_received)
{
case 0:
{
#ifdef USE_WXPHP_DEBUG
php_printf("Executing wxProcess::CloseOutput()\n\n");
#endif
((wxProcess_php*)_this)->CloseOutput();
return;
break;
}
}
}
//In case wrong type/count of parameters was passed
if(!already_called)
{
zend_error(E_ERROR, "Wrong type or count of parameters passed to: wxProcess::CloseOutput\n");
}
}
PHP_METHOD(php_wxProcess, Detach)
{
#ifdef USE_WXPHP_DEBUG
php_printf("Invoking wxProcess::Detach\n");
php_printf("===========================================\n");
#endif
//In case the constructor uses objects
zval **tmp;
int rsrc_type;
int parent_rsrc_type;
int id_to_find;
char _wxResource[] = "wxResource";
//Other variables used thru the code
int arguments_received = ZEND_NUM_ARGS();
void *_this;
zval* dummy;
bool already_called = false;
wxPHPObjectReferences* references;
bool return_is_user_initialized = false;
//Get pointer of object that called this method if not a static method
if (getThis() != NULL)
{
if(zend_hash_find(Z_OBJPROP_P(getThis()), _wxResource, sizeof(_wxResource), (void **)&tmp) == FAILURE)
{
zend_error(E_ERROR, "Failed to get the parent object that called wxProcess::Detach\n");
return;
}
else
{
id_to_find = Z_RESVAL_P(*tmp);
_this = zend_list_find(id_to_find, &parent_rsrc_type);
bool reference_type_found = false;
if(parent_rsrc_type == le_wxProcess){
references = &((wxProcess_php*)_this)->references;
reference_type_found = true;
}
}
}
#ifdef USE_WXPHP_DEBUG
else
{
php_printf("Processing the method call as static\n");
}
#endif
//Parameters for overload 0
bool overload0_called = false;
//Overload 0
overload0:
if(!already_called && arguments_received == 0)
{
#ifdef USE_WXPHP_DEBUG
php_printf("Parameters received %d\n", arguments_received);
php_printf("Parsing parameters with '' ()\n");
#endif
overload0_called = true;
already_called = true;
}
if(overload0_called)
{
switch(arguments_received)
{
case 0:
{
#ifdef USE_WXPHP_DEBUG
php_printf("Executing wxProcess::Detach()\n\n");
#endif
((wxProcess_php*)_this)->Detach();
return;
break;
}
}
}
//In case wrong type/count of parameters was passed
if(!already_called)
{
zend_error(E_ERROR, "Wrong type or count of parameters passed to: wxProcess::Detach\n");
}
}
PHP_METHOD(php_wxProcess, Exists)
{
#ifdef USE_WXPHP_DEBUG
php_printf("Invoking wxProcess::Exists\n");
php_printf("===========================================\n");
#endif
//In case the constructor uses objects
zval **tmp;
int rsrc_type;
int parent_rsrc_type;
int id_to_find;
char _wxResource[] = "wxResource";
//Other variables used thru the code
int arguments_received = ZEND_NUM_ARGS();
void *_this;
zval* dummy;
bool already_called = false;
wxPHPObjectReferences* references;
bool return_is_user_initialized = false;
//Get pointer of object that called this method if not a static method
if (getThis() != NULL)
{
if(zend_hash_find(Z_OBJPROP_P(getThis()), _wxResource, sizeof(_wxResource), (void **)&tmp) == FAILURE)
{
zend_error(E_ERROR, "Failed to get the parent object that called wxProcess::Exists\n");
return;
}
else
{
id_to_find = Z_RESVAL_P(*tmp);
_this = zend_list_find(id_to_find, &parent_rsrc_type);
bool reference_type_found = false;
if(parent_rsrc_type == le_wxProcess){
references = &((wxProcess_php*)_this)->references;
reference_type_found = true;
}
}
}
#ifdef USE_WXPHP_DEBUG
else
{
php_printf("Processing the method call as static\n");
}
#endif
//Parameters for overload 0
long pid0;
bool overload0_called = false;
//Overload 0
overload0:
if(!already_called && arguments_received == 1)
{
#ifdef USE_WXPHP_DEBUG
php_printf("Parameters received %d\n", arguments_received);
php_printf("Parsing parameters with 'l' (&pid0)\n");
#endif
char parse_parameters_string[] = "l";
if(zend_parse_parameters_ex(ZEND_PARSE_PARAMS_QUIET, arguments_received TSRMLS_CC, parse_parameters_string, &pid0 ) == SUCCESS)
{
overload0_called = true;
already_called = true;
}
}
if(overload0_called)
{
switch(arguments_received)
{
case 1:
{
#ifdef USE_WXPHP_DEBUG
php_printf("Static ");
php_printf("Executing RETURN_BOOL(wxProcess::Exists((int) pid0))\n\n");
#endif
ZVAL_BOOL(return_value, wxProcess::Exists((int) pid0));
return;
break;
}
}
}
//In case wrong type/count of parameters was passed
if(!already_called)
{
zend_error(E_ERROR, "Wrong type or count of parameters passed to: wxProcess::Exists\n");
}
}
PHP_METHOD(php_wxProcess, GetErrorStream)
{
#ifdef USE_WXPHP_DEBUG
php_printf("Invoking wxProcess::GetErrorStream\n");
php_printf("===========================================\n");
#endif
//In case the constructor uses objects
zval **tmp;
int rsrc_type;
int parent_rsrc_type;
int id_to_find;
char _wxResource[] = "wxResource";
//Other variables used thru the code
int arguments_received = ZEND_NUM_ARGS();
void *_this;
zval* dummy;
bool already_called = false;
wxPHPObjectReferences* references;
bool return_is_user_initialized = false;
//Get pointer of object that called this method if not a static method
if (getThis() != NULL)
{
if(zend_hash_find(Z_OBJPROP_P(getThis()), _wxResource, sizeof(_wxResource), (void **)&tmp) == FAILURE)
{
zend_error(E_ERROR, "Failed to get the parent object that called wxProcess::GetErrorStream\n");
return;
}
else
{
id_to_find = Z_RESVAL_P(*tmp);
_this = zend_list_find(id_to_find, &parent_rsrc_type);
bool reference_type_found = false;
if(parent_rsrc_type == le_wxProcess){
references = &((wxProcess_php*)_this)->references;
reference_type_found = true;
}
}
}
#ifdef USE_WXPHP_DEBUG
else
{
php_printf("Processing the method call as static\n");
}
#endif
//Parameters for overload 0
bool overload0_called = false;
//Overload 0
overload0:
if(!already_called && arguments_received == 0)
{
#ifdef USE_WXPHP_DEBUG
php_printf("Parameters received %d\n", arguments_received);
php_printf("Parsing parameters with '' ()\n");
#endif
overload0_called = true;
already_called = true;
}
if(overload0_called)
{
switch(arguments_received)
{
case 0:
{
#ifdef USE_WXPHP_DEBUG
php_printf("Executing wxProcess::GetErrorStream() to return object pointer\n\n");
#endif
wxInputStream_php* value_to_return0;
value_to_return0 = (wxInputStream_php*) ((wxProcess_php*)_this)->GetErrorStream();
if(value_to_return0 == NULL){
ZVAL_NULL(return_value);
}
else if(value_to_return0->references.IsUserInitialized()){
if(value_to_return0->phpObj != NULL){
*return_value = *value_to_return0->phpObj;
zval_add_ref(&value_to_return0->phpObj);
return_is_user_initialized = true;
}
else{
zend_error(E_ERROR, "Could not retreive original zval.");
}
}
else{
object_init_ex(return_value,php_wxInputStream_entry);
add_property_resource(return_value, "wxResource", zend_list_insert(value_to_return0, le_wxInputStream));
}
if(Z_TYPE_P(return_value) != IS_NULL && value_to_return0 != _this && return_is_user_initialized){
references->AddReference(return_value);
}
return;
break;
}
}
}
//In case wrong type/count of parameters was passed
if(!already_called)
{
zend_error(E_ERROR, "Wrong type or count of parameters passed to: wxProcess::GetErrorStream\n");
}
}
PHP_METHOD(php_wxProcess, GetInputStream)
{
#ifdef USE_WXPHP_DEBUG
php_printf("Invoking wxProcess::GetInputStream\n");
php_printf("===========================================\n");
#endif
//In case the constructor uses objects
zval **tmp;
int rsrc_type;
int parent_rsrc_type;
int id_to_find;
char _wxResource[] = "wxResource";
//Other variables used thru the code
int arguments_received = ZEND_NUM_ARGS();
void *_this;
zval* dummy;
bool already_called = false;
wxPHPObjectReferences* references;
bool return_is_user_initialized = false;
//Get pointer of object that called this method if not a static method
if (getThis() != NULL)
{
if(zend_hash_find(Z_OBJPROP_P(getThis()), _wxResource, sizeof(_wxResource), (void **)&tmp) == FAILURE)
{
zend_error(E_ERROR, "Failed to get the parent object that called wxProcess::GetInputStream\n");
return;
}
else
{
id_to_find = Z_RESVAL_P(*tmp);
_this = zend_list_find(id_to_find, &parent_rsrc_type);
bool reference_type_found = false;
if(parent_rsrc_type == le_wxProcess){
references = &((wxProcess_php*)_this)->references;
reference_type_found = true;
}
}
}
#ifdef USE_WXPHP_DEBUG
else
{
php_printf("Processing the method call as static\n");
}
#endif
//Parameters for overload 0
bool overload0_called = false;
//Overload 0
overload0:
if(!already_called && arguments_received == 0)
{
#ifdef USE_WXPHP_DEBUG
php_printf("Parameters received %d\n", arguments_received);
php_printf("Parsing parameters with '' ()\n");
#endif
overload0_called = true;
already_called = true;
}
if(overload0_called)
{
switch(arguments_received)
{
case 0:
{
#ifdef USE_WXPHP_DEBUG
php_printf("Executing wxProcess::GetInputStream() to return object pointer\n\n");
#endif
wxInputStream_php* value_to_return0;
value_to_return0 = (wxInputStream_php*) ((wxProcess_php*)_this)->GetInputStream();
if(value_to_return0 == NULL){
ZVAL_NULL(return_value);
}
else if(value_to_return0->references.IsUserInitialized()){
if(value_to_return0->phpObj != NULL){
*return_value = *value_to_return0->phpObj;
zval_add_ref(&value_to_return0->phpObj);
return_is_user_initialized = true;
}
else{
zend_error(E_ERROR, "Could not retreive original zval.");
}
}
else{
object_init_ex(return_value,php_wxInputStream_entry);
add_property_resource(return_value, "wxResource", zend_list_insert(value_to_return0, le_wxInputStream));
}
if(Z_TYPE_P(return_value) != IS_NULL && value_to_return0 != _this && return_is_user_initialized){
references->AddReference(return_value);
}
return;
break;
}
}
}
//In case wrong type/count of parameters was passed
if(!already_called)
{
zend_error(E_ERROR, "Wrong type or count of parameters passed to: wxProcess::GetInputStream\n");
}
}
PHP_METHOD(php_wxProcess, GetOutputStream)
{
#ifdef USE_WXPHP_DEBUG
php_printf("Invoking wxProcess::GetOutputStream\n");
php_printf("===========================================\n");
#endif
//In case the constructor uses objects
zval **tmp;
int rsrc_type;
int parent_rsrc_type;
int id_to_find;
char _wxResource[] = "wxResource";
//Other variables used thru the code
int arguments_received = ZEND_NUM_ARGS();
void *_this;
zval* dummy;
bool already_called = false;
wxPHPObjectReferences* references;
bool return_is_user_initialized = false;
//Get pointer of object that called this method if not a static method
if (getThis() != NULL)
{
if(zend_hash_find(Z_OBJPROP_P(getThis()), _wxResource, sizeof(_wxResource), (void **)&tmp) == FAILURE)
{
zend_error(E_ERROR, "Failed to get the parent object that called wxProcess::GetOutputStream\n");
return;
}
else
{
id_to_find = Z_RESVAL_P(*tmp);
_this = zend_list_find(id_to_find, &parent_rsrc_type);
bool reference_type_found = false;
if(parent_rsrc_type == le_wxProcess){
references = &((wxProcess_php*)_this)->references;
reference_type_found = true;
}
}
}
#ifdef USE_WXPHP_DEBUG
else
{
php_printf("Processing the method call as static\n");
}
#endif
//Parameters for overload 0
bool overload0_called = false;
//Overload 0
overload0:
if(!already_called && arguments_received == 0)
{
#ifdef USE_WXPHP_DEBUG
php_printf("Parameters received %d\n", arguments_received);
php_printf("Parsing parameters with '' ()\n");
#endif
overload0_called = true;
already_called = true;
}
if(overload0_called)
{
switch(arguments_received)
{
case 0:
{
#ifdef USE_WXPHP_DEBUG
php_printf("Executing wxProcess::GetOutputStream() to return object pointer\n\n");
#endif
wxOutputStream_php* value_to_return0;
value_to_return0 = (wxOutputStream_php*) ((wxProcess_php*)_this)->GetOutputStream();
if(value_to_return0 == NULL){
ZVAL_NULL(return_value);
}
else if(value_to_return0->references.IsUserInitialized()){
if(value_to_return0->phpObj != NULL){
*return_value = *value_to_return0->phpObj;
zval_add_ref(&value_to_return0->phpObj);
return_is_user_initialized = true;
}
else{
zend_error(E_ERROR, "Could not retreive original zval.");
}
}
else{
object_init_ex(return_value,php_wxOutputStream_entry);
add_property_resource(return_value, "wxResource", zend_list_insert(value_to_return0, le_wxOutputStream));
}
if(Z_TYPE_P(return_value) != IS_NULL && value_to_return0 != _this && return_is_user_initialized){
references->AddReference(return_value);
}
return;
break;
}
}
}
//In case wrong type/count of parameters was passed
if(!already_called)
{
zend_error(E_ERROR, "Wrong type or count of parameters passed to: wxProcess::GetOutputStream\n");
}
}
PHP_METHOD(php_wxProcess, GetPid)
{
#ifdef USE_WXPHP_DEBUG
php_printf("Invoking wxProcess::GetPid\n");
php_printf("===========================================\n");
#endif
//In case the constructor uses objects
zval **tmp;
int rsrc_type;
int parent_rsrc_type;
int id_to_find;
char _wxResource[] = "wxResource";
//Other variables used thru the code
int arguments_received = ZEND_NUM_ARGS();
void *_this;
zval* dummy;
bool already_called = false;
wxPHPObjectReferences* references;
bool return_is_user_initialized = false;
//Get pointer of object that called this method if not a static method
if (getThis() != NULL)
{
if(zend_hash_find(Z_OBJPROP_P(getThis()), _wxResource, sizeof(_wxResource), (void **)&tmp) == FAILURE)
{
zend_error(E_ERROR, "Failed to get the parent object that called wxProcess::GetPid\n");
return;
}
else
{
id_to_find = Z_RESVAL_P(*tmp);
_this = zend_list_find(id_to_find, &parent_rsrc_type);
bool reference_type_found = false;
if(parent_rsrc_type == le_wxProcess){
references = &((wxProcess_php*)_this)->references;
reference_type_found = true;
}
}
}
#ifdef USE_WXPHP_DEBUG
else
{
php_printf("Processing the method call as static\n");
}
#endif
//Parameters for overload 0
bool overload0_called = false;
//Overload 0
overload0:
if(!already_called && arguments_received == 0)
{
#ifdef USE_WXPHP_DEBUG
php_printf("Parameters received %d\n", arguments_received);
php_printf("Parsing parameters with '' ()\n");
#endif
overload0_called = true;
already_called = true;
}
if(overload0_called)
{
switch(arguments_received)
{
case 0:
{
#ifdef USE_WXPHP_DEBUG
php_printf("Executing RETURN_LONG(wxProcess::GetPid())\n\n");
#endif
ZVAL_LONG(return_value, ((wxProcess_php*)_this)->GetPid());
return;
break;
}
}
}
//In case wrong type/count of parameters was passed
if(!already_called)
{
zend_error(E_ERROR, "Wrong type or count of parameters passed to: wxProcess::GetPid\n");
}
}
PHP_METHOD(php_wxProcess, IsErrorAvailable)
{
#ifdef USE_WXPHP_DEBUG
php_printf("Invoking wxProcess::IsErrorAvailable\n");
php_printf("===========================================\n");
#endif
//In case the constructor uses objects
zval **tmp;
int rsrc_type;
int parent_rsrc_type;
int id_to_find;
char _wxResource[] = "wxResource";
//Other variables used thru the code
int arguments_received = ZEND_NUM_ARGS();
void *_this;
zval* dummy;
bool already_called = false;
wxPHPObjectReferences* references;
bool return_is_user_initialized = false;
//Get pointer of object that called this method if not a static method
if (getThis() != NULL)
{
if(zend_hash_find(Z_OBJPROP_P(getThis()), _wxResource, sizeof(_wxResource), (void **)&tmp) == FAILURE)
{
zend_error(E_ERROR, "Failed to get the parent object that called wxProcess::IsErrorAvailable\n");
return;
}
else
{
id_to_find = Z_RESVAL_P(*tmp);
_this = zend_list_find(id_to_find, &parent_rsrc_type);
bool reference_type_found = false;
if(parent_rsrc_type == le_wxProcess){
references = &((wxProcess_php*)_this)->references;
reference_type_found = true;
}
}
}
#ifdef USE_WXPHP_DEBUG
else
{
php_printf("Processing the method call as static\n");
}
#endif
//Parameters for overload 0
bool overload0_called = false;
//Overload 0
overload0:
if(!already_called && arguments_received == 0)
{
#ifdef USE_WXPHP_DEBUG
php_printf("Parameters received %d\n", arguments_received);
php_printf("Parsing parameters with '' ()\n");
#endif
overload0_called = true;
already_called = true;
}
if(overload0_called)
{
switch(arguments_received)
{
case 0:
{
#ifdef USE_WXPHP_DEBUG
php_printf("Executing RETURN_BOOL(wxProcess::IsErrorAvailable())\n\n");
#endif
ZVAL_BOOL(return_value, ((wxProcess_php*)_this)->IsErrorAvailable());
return;
break;
}
}
}
//In case wrong type/count of parameters was passed
if(!already_called)
{
zend_error(E_ERROR, "Wrong type or count of parameters passed to: wxProcess::IsErrorAvailable\n");
}
}
PHP_METHOD(php_wxProcess, IsInputOpened)
{
#ifdef USE_WXPHP_DEBUG
php_printf("Invoking wxProcess::IsInputOpened\n");
php_printf("===========================================\n");
#endif
//In case the constructor uses objects
zval **tmp;
int rsrc_type;
int parent_rsrc_type;
int id_to_find;
char _wxResource[] = "wxResource";
//Other variables used thru the code
int arguments_received = ZEND_NUM_ARGS();
void *_this;
zval* dummy;
bool already_called = false;
wxPHPObjectReferences* references;
bool return_is_user_initialized = false;
//Get pointer of object that called this method if not a static method
if (getThis() != NULL)
{
if(zend_hash_find(Z_OBJPROP_P(getThis()), _wxResource, sizeof(_wxResource), (void **)&tmp) == FAILURE)
{
zend_error(E_ERROR, "Failed to get the parent object that called wxProcess::IsInputOpened\n");
return;
}
else
{
id_to_find = Z_RESVAL_P(*tmp);
_this = zend_list_find(id_to_find, &parent_rsrc_type);
bool reference_type_found = false;
if(parent_rsrc_type == le_wxProcess){
references = &((wxProcess_php*)_this)->references;
reference_type_found = true;
}
}
}
#ifdef USE_WXPHP_DEBUG
else
{
php_printf("Processing the method call as static\n");
}
#endif
//Parameters for overload 0
bool overload0_called = false;
//Overload 0
overload0:
if(!already_called && arguments_received == 0)
{
#ifdef USE_WXPHP_DEBUG
php_printf("Parameters received %d\n", arguments_received);
php_printf("Parsing parameters with '' ()\n");
#endif
overload0_called = true;
already_called = true;
}
if(overload0_called)
{
switch(arguments_received)
{
case 0:
{
#ifdef USE_WXPHP_DEBUG
php_printf("Executing RETURN_BOOL(wxProcess::IsInputOpened())\n\n");
#endif
ZVAL_BOOL(return_value, ((wxProcess_php*)_this)->IsInputOpened());
return;
break;
}
}
}
//In case wrong type/count of parameters was passed
if(!already_called)
{
zend_error(E_ERROR, "Wrong type or count of parameters passed to: wxProcess::IsInputOpened\n");
}
}
PHP_METHOD(php_wxProcess, Kill)
{
#ifdef USE_WXPHP_DEBUG
php_printf("Invoking wxProcess::Kill\n");
php_printf("===========================================\n");
#endif
//In case the constructor uses objects
zval **tmp;
int rsrc_type;
int parent_rsrc_type;
int id_to_find;
char _wxResource[] = "wxResource";
//Other variables used thru the code
int arguments_received = ZEND_NUM_ARGS();
void *_this;
zval* dummy;
bool already_called = false;
wxPHPObjectReferences* references;
bool return_is_user_initialized = false;
//Get pointer of object that called this method if not a static method
if (getThis() != NULL)
{
if(zend_hash_find(Z_OBJPROP_P(getThis()), _wxResource, sizeof(_wxResource), (void **)&tmp) == FAILURE)
{
zend_error(E_ERROR, "Failed to get the parent object that called wxProcess::Kill\n");
return;
}
else
{
id_to_find = Z_RESVAL_P(*tmp);
_this = zend_list_find(id_to_find, &parent_rsrc_type);
bool reference_type_found = false;
if(parent_rsrc_type == le_wxProcess){
references = &((wxProcess_php*)_this)->references;
reference_type_found = true;
}
}
}
#ifdef USE_WXPHP_DEBUG
else
{
php_printf("Processing the method call as static\n");
}
#endif
//Parameters for overload 0
long pid0;
long sig0;
long flags0;
bool overload0_called = false;
//Overload 0
overload0:
if(!already_called && arguments_received >= 1 && arguments_received <= 3)
{
#ifdef USE_WXPHP_DEBUG
php_printf("Parameters received %d\n", arguments_received);
php_printf("Parsing parameters with 'l|ll' (&pid0, &sig0, &flags0)\n");
#endif
char parse_parameters_string[] = "l|ll";
if(zend_parse_parameters_ex(ZEND_PARSE_PARAMS_QUIET, arguments_received TSRMLS_CC, parse_parameters_string, &pid0, &sig0, &flags0 ) == SUCCESS)
{
overload0_called = true;
already_called = true;
}
}
if(overload0_called)
{
switch(arguments_received)
{
case 1:
{
#ifdef USE_WXPHP_DEBUG
php_printf("Static ");
php_printf("Executing RETURN_LONG(wxProcess::Kill((int) pid0))\n\n");
#endif
ZVAL_LONG(return_value, wxProcess::Kill((int) pid0));
return;
break;
}
case 2:
{
#ifdef USE_WXPHP_DEBUG
php_printf("Static ");
php_printf("Executing RETURN_LONG(wxProcess::Kill((int) pid0, (wxSignal) sig0))\n\n");
#endif
ZVAL_LONG(return_value, wxProcess::Kill((int) pid0, (wxSignal) sig0));
return;
break;
}
case 3:
{
#ifdef USE_WXPHP_DEBUG
php_printf("Static ");
php_printf("Executing RETURN_LONG(wxProcess::Kill((int) pid0, (wxSignal) sig0, (int) flags0))\n\n");
#endif
ZVAL_LONG(return_value, wxProcess::Kill((int) pid0, (wxSignal) sig0, (int) flags0));
return;
break;
}
}
}
//In case wrong type/count of parameters was passed
if(!already_called)
{
zend_error(E_ERROR, "Wrong type or count of parameters passed to: wxProcess::Kill\n");
}
}
PHP_METHOD(php_wxProcess, IsInputAvailable)
{
#ifdef USE_WXPHP_DEBUG
php_printf("Invoking wxProcess::IsInputAvailable\n");
php_printf("===========================================\n");
#endif
//In case the constructor uses objects
zval **tmp;
int rsrc_type;
int parent_rsrc_type;
int id_to_find;
char _wxResource[] = "wxResource";
//Other variables used thru the code
int arguments_received = ZEND_NUM_ARGS();
void *_this;
zval* dummy;
bool already_called = false;
wxPHPObjectReferences* references;
bool return_is_user_initialized = false;
//Get pointer of object that called this method if not a static method
if (getThis() != NULL)
{
if(zend_hash_find(Z_OBJPROP_P(getThis()), _wxResource, sizeof(_wxResource), (void **)&tmp) == FAILURE)
{
zend_error(E_ERROR, "Failed to get the parent object that called wxProcess::IsInputAvailable\n");
return;
}
else
{
id_to_find = Z_RESVAL_P(*tmp);
_this = zend_list_find(id_to_find, &parent_rsrc_type);
bool reference_type_found = false;
if(parent_rsrc_type == le_wxProcess){
references = &((wxProcess_php*)_this)->references;
reference_type_found = true;
}
}
}
#ifdef USE_WXPHP_DEBUG
else
{
php_printf("Processing the method call as static\n");
}
#endif
//Parameters for overload 0
bool overload0_called = false;
//Overload 0
overload0:
if(!already_called && arguments_received == 0)
{
#ifdef USE_WXPHP_DEBUG
php_printf("Parameters received %d\n", arguments_received);
php_printf("Parsing parameters with '' ()\n");
#endif
overload0_called = true;
already_called = true;
}
if(overload0_called)
{
switch(arguments_received)
{
case 0:
{
#ifdef USE_WXPHP_DEBUG
php_printf("Executing RETURN_BOOL(wxProcess::IsInputAvailable())\n\n");
#endif
ZVAL_BOOL(return_value, ((wxProcess_php*)_this)->IsInputAvailable());
return;
break;
}
}
}
//In case wrong type/count of parameters was passed
if(!already_called)
{
zend_error(E_ERROR, "Wrong type or count of parameters passed to: wxProcess::IsInputAvailable\n");
}
}
void wxProcess_php::OnTerminate(int pid, int status)
{
#ifdef USE_WXPHP_DEBUG
php_printf("Invoking virtual wxProcess::OnTerminate\n");
php_printf("===========================================\n");
#endif
zval *arguments[2];
//Initilize arguments array
for(int i=0; i<2; i++)
{
MAKE_STD_ZVAL(arguments[i]);
}
zval* return_value;
MAKE_STD_ZVAL(return_value);
zval function_name;
ZVAL_STRING(&function_name, "OnTerminate", 0);
char* temp_string;
char _wxResource[] = "wxResource";
zval **tmp;
int id_to_find;
void* return_object;
int rsrc_type;
//Parameters for conversion
ZVAL_LONG(arguments[0], pid);
ZVAL_LONG(arguments[1], status);
#ifdef USE_WXPHP_DEBUG
php_printf("Trying to call user defined method\n");
#endif
if(call_user_function(NULL, (zval**) &this->phpObj, &function_name, return_value, 2, arguments TSRMLS_CC) == FAILURE)
{
#ifdef USE_WXPHP_DEBUG
php_printf("Invocation of user defined method failed\n");
#endif
}
else
{
#ifdef USE_WXPHP_DEBUG
php_printf("Returning userspace value.\n");
#endif
return;
}
#ifdef USE_WXPHP_DEBUG
php_printf("Calling original method\n");
php_printf("===========================================\n\n");
#endif
//Call original method
wxProcess::OnTerminate(pid, status);
}
PHP_METHOD(php_wxProcess, Redirect)
{
#ifdef USE_WXPHP_DEBUG
php_printf("Invoking wxProcess::Redirect\n");
php_printf("===========================================\n");
#endif
//In case the constructor uses objects
zval **tmp;
int rsrc_type;
int parent_rsrc_type;
int id_to_find;
char _wxResource[] = "wxResource";
//Other variables used thru the code
int arguments_received = ZEND_NUM_ARGS();
void *_this;
zval* dummy;
bool already_called = false;
wxPHPObjectReferences* references;
bool return_is_user_initialized = false;
//Get pointer of object that called this method if not a static method
if (getThis() != NULL)
{
if(zend_hash_find(Z_OBJPROP_P(getThis()), _wxResource, sizeof(_wxResource), (void **)&tmp) == FAILURE)
{
zend_error(E_ERROR, "Failed to get the parent object that called wxProcess::Redirect\n");
return;
}
else
{
id_to_find = Z_RESVAL_P(*tmp);
_this = zend_list_find(id_to_find, &parent_rsrc_type);
bool reference_type_found = false;
if(parent_rsrc_type == le_wxProcess){
references = &((wxProcess_php*)_this)->references;
reference_type_found = true;
}
}
}
#ifdef USE_WXPHP_DEBUG
else
{
php_printf("Processing the method call as static\n");
}
#endif
//Parameters for overload 0
bool overload0_called = false;
//Overload 0
overload0:
if(!already_called && arguments_received == 0)
{
#ifdef USE_WXPHP_DEBUG
php_printf("Parameters received %d\n", arguments_received);
php_printf("Parsing parameters with '' ()\n");
#endif
overload0_called = true;
already_called = true;
}
if(overload0_called)
{
switch(arguments_received)
{
case 0:
{
#ifdef USE_WXPHP_DEBUG
php_printf("Executing wxProcess::Redirect()\n\n");
#endif
((wxProcess_php*)_this)->Redirect();
return;
break;
}
}
}
//In case wrong type/count of parameters was passed
if(!already_called)
{
zend_error(E_ERROR, "Wrong type or count of parameters passed to: wxProcess::Redirect\n");
}
}
PHP_METHOD(php_wxProcess, Open)
{
#ifdef USE_WXPHP_DEBUG
php_printf("Invoking wxProcess::Open\n");
php_printf("===========================================\n");
#endif
//In case the constructor uses objects
zval **tmp;
int rsrc_type;
int parent_rsrc_type;
int id_to_find;
char _wxResource[] = "wxResource";
//Other variables used thru the code
int arguments_received = ZEND_NUM_ARGS();
void *_this;
zval* dummy;
bool already_called = false;
wxPHPObjectReferences* references;
bool return_is_user_initialized = false;
//Get pointer of object that called this method if not a static method
if (getThis() != NULL)
{
if(zend_hash_find(Z_OBJPROP_P(getThis()), _wxResource, sizeof(_wxResource), (void **)&tmp) == FAILURE)
{
zend_error(E_ERROR, "Failed to get the parent object that called wxProcess::Open\n");
return;
}
else
{
id_to_find = Z_RESVAL_P(*tmp);
_this = zend_list_find(id_to_find, &parent_rsrc_type);
bool reference_type_found = false;
if(parent_rsrc_type == le_wxProcess){
references = &((wxProcess_php*)_this)->references;
reference_type_found = true;
}
}
}
#ifdef USE_WXPHP_DEBUG
else
{
php_printf("Processing the method call as static\n");
}
#endif
//Parameters for overload 0
char* cmd0;
long cmd_len0;
long flags0;
bool overload0_called = false;
//Overload 0
overload0:
if(!already_called && arguments_received >= 1 && arguments_received <= 2)
{
#ifdef USE_WXPHP_DEBUG
php_printf("Parameters received %d\n", arguments_received);
php_printf("Parsing parameters with 's|l' (&cmd0, &cmd_len0, &flags0)\n");
#endif
char parse_parameters_string[] = "s|l";
if(zend_parse_parameters_ex(ZEND_PARSE_PARAMS_QUIET, arguments_received TSRMLS_CC, parse_parameters_string, &cmd0, &cmd_len0, &flags0 ) == SUCCESS)
{
overload0_called = true;
already_called = true;
}
}
if(overload0_called)
{
switch(arguments_received)
{
case 1:
{
#ifdef USE_WXPHP_DEBUG
php_printf("Static ");
php_printf("Executing wxProcess::Open(wxString(cmd0, wxConvUTF8)) to return object pointer\n\n");
#endif
wxProcess_php* value_to_return1;
value_to_return1 = (wxProcess_php*) wxProcess::Open(wxString(cmd0, wxConvUTF8));
if(value_to_return1 == NULL){
ZVAL_NULL(return_value);
}
else if(value_to_return1->references.IsUserInitialized()){
if(value_to_return1->phpObj != NULL){
*return_value = *value_to_return1->phpObj;
zval_add_ref(&value_to_return1->phpObj);
return_is_user_initialized = true;
}
else{
zend_error(E_ERROR, "Could not retreive original zval.");
}
}
else{
object_init_ex(return_value,php_wxProcess_entry);
add_property_resource(return_value, "wxResource", zend_list_insert(value_to_return1, le_wxProcess));
}
return;
break;
}
case 2:
{
#ifdef USE_WXPHP_DEBUG
php_printf("Static ");
php_printf("Executing wxProcess::Open(wxString(cmd0, wxConvUTF8), (int) flags0) to return object pointer\n\n");
#endif
wxProcess_php* value_to_return2;
value_to_return2 = (wxProcess_php*) wxProcess::Open(wxString(cmd0, wxConvUTF8), (int) flags0);
if(value_to_return2 == NULL){
ZVAL_NULL(return_value);
}
else if(value_to_return2->references.IsUserInitialized()){
if(value_to_return2->phpObj != NULL){
*return_value = *value_to_return2->phpObj;
zval_add_ref(&value_to_return2->phpObj);
return_is_user_initialized = true;
}
else{
zend_error(E_ERROR, "Could not retreive original zval.");
}
}
else{
object_init_ex(return_value,php_wxProcess_entry);
add_property_resource(return_value, "wxResource", zend_list_insert(value_to_return2, le_wxProcess));
}
return;
break;
}
}
}
//In case wrong type/count of parameters was passed
if(!already_called)
{
zend_error(E_ERROR, "Wrong type or count of parameters passed to: wxProcess::Open\n");
}
}
PHP_METHOD(php_wxProcess, __construct)
{
#ifdef USE_WXPHP_DEBUG
php_printf("Invoking wxProcess::__construct\n");
php_printf("===========================================\n");
#endif
//In case the constructor uses objects
zval **tmp;
int rsrc_type;
int id_to_find;
char _wxResource[] = "wxResource";
//Other variables used thru the code
int arguments_received = ZEND_NUM_ARGS();
void *_this;
zval* dummy;
bool already_called = false;
//Parameters for overload 0
zval* parent0 = 0;
void* object_pointer0_0 = 0;
long id0;
bool overload0_called = false;
//Parameters for overload 1
long flags1;
bool overload1_called = false;
//Overload 0
overload0:
if(!already_called && arguments_received >= 0 && arguments_received <= 2)
{
#ifdef USE_WXPHP_DEBUG
php_printf("Parameters received %d\n", arguments_received);
php_printf("Parsing parameters with '|zl' (&parent0, &id0)\n");
#endif
char parse_parameters_string[] = "|zl";
if(zend_parse_parameters_ex(ZEND_PARSE_PARAMS_QUIET, arguments_received TSRMLS_CC, parse_parameters_string, &parent0, &id0 ) == SUCCESS)
{
if(arguments_received >= 1){
if(Z_TYPE_P(parent0) == IS_OBJECT && zend_hash_find(Z_OBJPROP_P(parent0), _wxResource , sizeof(_wxResource), (void **)&tmp) == SUCCESS)
{
id_to_find = Z_RESVAL_P(*tmp);
object_pointer0_0 = zend_list_find(id_to_find, &rsrc_type);
if (!object_pointer0_0 || (rsrc_type != le_wxWindow && rsrc_type != le_wxNonOwnedWindow && rsrc_type != le_wxTopLevelWindow && rsrc_type != le_wxFrame && rsrc_type != le_wxSplashScreen && rsrc_type != le_wxMDIChildFrame && rsrc_type != le_wxMDIParentFrame && rsrc_type != le_wxMiniFrame && rsrc_type != le_wxPreviewFrame && rsrc_type != le_wxHtmlHelpDialog && rsrc_type != le_wxHtmlHelpFrame && rsrc_type != le_wxDialog && rsrc_type != le_wxTextEntryDialog && rsrc_type != le_wxPasswordEntryDialog && rsrc_type != le_wxMessageDialog && rsrc_type != le_wxFindReplaceDialog && rsrc_type != le_wxDirDialog && rsrc_type != le_wxSymbolPickerDialog && rsrc_type != le_wxPropertySheetDialog && rsrc_type != le_wxWizard && rsrc_type != le_wxProgressDialog && rsrc_type != le_wxColourDialog && rsrc_type != le_wxFileDialog && rsrc_type != le_wxFontDialog && rsrc_type != le_wxPageSetupDialog && rsrc_type != le_wxPrintDialog && rsrc_type != le_wxSingleChoiceDialog && rsrc_type != le_wxGenericProgressDialog && rsrc_type != le_wxPopupWindow && rsrc_type != le_wxPopupTransientWindow && rsrc_type != le_wxControl && rsrc_type != le_wxStatusBar && rsrc_type != le_wxAnyButton && rsrc_type != le_wxButton && rsrc_type != le_wxBitmapButton && rsrc_type != le_wxToggleButton && rsrc_type != le_wxBitmapToggleButton && rsrc_type != le_wxTreeCtrl && rsrc_type != le_wxControlWithItems && rsrc_type != le_wxListBox && rsrc_type != le_wxCheckListBox && rsrc_type != le_wxRearrangeList && rsrc_type != le_wxChoice && rsrc_type != le_wxBookCtrlBase && rsrc_type != le_wxAuiNotebook && rsrc_type != le_wxListbook && rsrc_type != le_wxChoicebook && rsrc_type != le_wxNotebook && rsrc_type != le_wxTreebook && rsrc_type != le_wxToolbook && rsrc_type != le_wxAnimationCtrl && rsrc_type != le_wxStyledTextCtrl && rsrc_type != le_wxScrollBar && rsrc_type != le_wxStaticText && rsrc_type != le_wxStaticLine && rsrc_type != le_wxStaticBox && rsrc_type != le_wxStaticBitmap && rsrc_type != le_wxCheckBox && rsrc_type != le_wxTextCtrl && rsrc_type != le_wxSearchCtrl && rsrc_type != le_wxComboBox && rsrc_type != le_wxBitmapComboBox && rsrc_type != le_wxAuiToolBar && rsrc_type != le_wxListCtrl && rsrc_type != le_wxListView && rsrc_type != le_wxRadioBox && rsrc_type != le_wxRadioButton && rsrc_type != le_wxSlider && rsrc_type != le_wxSpinCtrl && rsrc_type != le_wxSpinButton && rsrc_type != le_wxGauge && rsrc_type != le_wxHyperlinkCtrl && rsrc_type != le_wxSpinCtrlDouble && rsrc_type != le_wxGenericDirCtrl && rsrc_type != le_wxCalendarCtrl && rsrc_type != le_wxPickerBase && rsrc_type != le_wxColourPickerCtrl && rsrc_type != le_wxFontPickerCtrl && rsrc_type != le_wxFilePickerCtrl && rsrc_type != le_wxDirPickerCtrl && rsrc_type != le_wxTimePickerCtrl && rsrc_type != le_wxToolBar && rsrc_type != le_wxDatePickerCtrl && rsrc_type != le_wxCollapsiblePane && rsrc_type != le_wxComboCtrl && rsrc_type != le_wxDataViewCtrl && rsrc_type != le_wxDataViewListCtrl && rsrc_type != le_wxDataViewTreeCtrl && rsrc_type != le_wxHeaderCtrl && rsrc_type != le_wxHeaderCtrlSimple && rsrc_type != le_wxFileCtrl && rsrc_type != le_wxInfoBar && rsrc_type != le_wxRibbonControl && rsrc_type != le_wxRibbonBar && rsrc_type != le_wxRibbonButtonBar && rsrc_type != le_wxRibbonGallery && rsrc_type != le_wxRibbonPage && rsrc_type != le_wxRibbonPanel && rsrc_type != le_wxRibbonToolBar && rsrc_type != le_wxSplitterWindow && rsrc_type != le_wxPanel && rsrc_type != le_wxScrolledWindow && rsrc_type != le_wxHtmlWindow && rsrc_type != le_wxGrid && rsrc_type != le_wxPreviewCanvas && rsrc_type != le_wxWizardPage && rsrc_type != le_wxWizardPageSimple && rsrc_type != le_wxEditableListBox && rsrc_type != le_wxHScrolledWindow && rsrc_type != le_wxPreviewControlBar && rsrc_type != le_wxMenuBar && rsrc_type != le_wxBannerWindow && rsrc_type != le_wxMDIClientWindow && rsrc_type != le_wxTreeListCtrl && rsrc_type != le_wxSashWindow && rsrc_type != le_wxSashLayoutWindow && rsrc_type != le_wxHtmlHelpWindow && rsrc_type != le_wxValidator && rsrc_type != le_wxTextValidator && rsrc_type != le_wxGenericValidator && rsrc_type != le_wxMenu && rsrc_type != le_wxAuiManager && rsrc_type != le_wxMouseEventsManager && rsrc_type != le_wxTimer && rsrc_type != le_wxEventBlocker && rsrc_type != le_wxProcess && rsrc_type != le_wxFileSystemWatcher && rsrc_type != le_wxTaskBarIcon && rsrc_type != le_wxNotificationMessage))
{
goto overload1;
}
}
else if(Z_TYPE_P(parent0) != IS_NULL)
{
goto overload1;
}
}
overload0_called = true;
already_called = true;
}
}
//Overload 1
overload1:
if(!already_called && arguments_received == 1)
{
#ifdef USE_WXPHP_DEBUG
php_printf("Parameters received %d\n", arguments_received);
php_printf("Parsing parameters with 'l' (&flags1)\n");
#endif
char parse_parameters_string[] = "l";
if(zend_parse_parameters_ex(ZEND_PARSE_PARAMS_QUIET, arguments_received TSRMLS_CC, parse_parameters_string, &flags1 ) == SUCCESS)
{
overload1_called = true;
already_called = true;
}
}
if(overload0_called)
{
switch(arguments_received)
{
case 0:
{
#ifdef USE_WXPHP_DEBUG
php_printf("Executing __construct()\n");
#endif
_this = new wxProcess_php();
((wxProcess_php*) _this)->references.Initialize();
break;
}
case 1:
{
#ifdef USE_WXPHP_DEBUG
php_printf("Executing __construct((wxEvtHandler*) object_pointer0_0)\n");
#endif
_this = new wxProcess_php((wxEvtHandler*) object_pointer0_0);
((wxProcess_php*) _this)->references.Initialize();
((wxProcess_php*) _this)->references.AddReference(parent0);
break;
}
case 2:
{
#ifdef USE_WXPHP_DEBUG
php_printf("Executing __construct((wxEvtHandler*) object_pointer0_0, (int) id0)\n");
#endif
_this = new wxProcess_php((wxEvtHandler*) object_pointer0_0, (int) id0);
((wxProcess_php*) _this)->references.Initialize();
((wxProcess_php*) _this)->references.AddReference(parent0);
break;
}
}
}
if(overload1_called)
{
switch(arguments_received)
{
case 1:
{
#ifdef USE_WXPHP_DEBUG
php_printf("Executing __construct((int) flags1)\n");
#endif
_this = new wxProcess_php((int) flags1);
((wxProcess_php*) _this)->references.Initialize();
break;
}
}
}
if(already_called)
{
long id_to_find = zend_list_insert(_this, le_wxProcess);
add_property_resource(getThis(), _wxResource, id_to_find);
MAKE_STD_ZVAL(((wxProcess_php*) _this)->evnArray);
array_init(((wxProcess_php*) _this)->evnArray);
((wxProcess_php*) _this)->phpObj = getThis();
((wxProcess_php*) _this)->InitProperties();
#ifdef ZTS
((wxProcess_php*) _this)->TSRMLS_C = TSRMLS_C;
#endif
}
else
{
zend_error(E_ERROR, "Abstract class or wrong type/count of parameters passed to: wxProcess::__constructor\n");
}
#ifdef USE_WXPHP_DEBUG
php_printf("===========================================\n\n");
#endif
}
void php_wxSingleInstanceChecker_destruction_handler(zend_rsrc_list_entry *rsrc TSRMLS_DC)
{
#ifdef USE_WXPHP_DEBUG
php_printf("Calling php_wxSingleInstanceChecker_destruction_handler on %s at line %i\n", zend_get_executed_filename(TSRMLS_C), zend_get_executed_lineno(TSRMLS_C));
php_printf("===========================================\n");
#endif
wxSingleInstanceChecker_php* object = static_cast<wxSingleInstanceChecker_php*>(rsrc->ptr);
if(rsrc->ptr != NULL)
{
#ifdef USE_WXPHP_DEBUG
php_printf("Pointer not null\n");
php_printf("Pointer address %x\n", (unsigned int)(size_t)rsrc->ptr);
#endif
if(object->references.IsUserInitialized())
{
#ifdef USE_WXPHP_DEBUG
php_printf("Deleting pointer with delete\n");
#endif
delete object;
rsrc->ptr = NULL;
}
#ifdef USE_WXPHP_DEBUG
php_printf("Deletion of wxSingleInstanceChecker done\n");
php_printf("===========================================\n\n");
#endif
}
else
{
#ifdef USE_WXPHP_DEBUG
php_printf("Not user space initialized\n");
#endif
}
}
PHP_METHOD(php_wxSingleInstanceChecker, Create)
{
#ifdef USE_WXPHP_DEBUG
php_printf("Invoking wxSingleInstanceChecker::Create\n");
php_printf("===========================================\n");
#endif
//In case the constructor uses objects
zval **tmp;
int rsrc_type;
int parent_rsrc_type;
int id_to_find;
char _wxResource[] = "wxResource";
//Other variables used thru the code
int arguments_received = ZEND_NUM_ARGS();
void *_this;
zval* dummy;
bool already_called = false;
wxPHPObjectReferences* references;
bool return_is_user_initialized = false;
//Get pointer of object that called this method if not a static method
if (getThis() != NULL)
{
if(zend_hash_find(Z_OBJPROP_P(getThis()), _wxResource, sizeof(_wxResource), (void **)&tmp) == FAILURE)
{
zend_error(E_ERROR, "Failed to get the parent object that called wxSingleInstanceChecker::Create\n");
return;
}
else
{
id_to_find = Z_RESVAL_P(*tmp);
_this = zend_list_find(id_to_find, &parent_rsrc_type);
bool reference_type_found = false;
if(parent_rsrc_type == le_wxSingleInstanceChecker){
references = &((wxSingleInstanceChecker_php*)_this)->references;
reference_type_found = true;
}
}
}
#ifdef USE_WXPHP_DEBUG
else
{
php_printf("Processing the method call as static\n");
}
#endif
//Parameters for overload 0
char* name0;
long name_len0;
char* path0;
long path_len0;
bool overload0_called = false;
//Overload 0
overload0:
if(!already_called && arguments_received >= 1 && arguments_received <= 2)
{
#ifdef USE_WXPHP_DEBUG
php_printf("Parameters received %d\n", arguments_received);
php_printf("Parsing parameters with 's|s' (&name0, &name_len0, &path0, &path_len0)\n");
#endif
char parse_parameters_string[] = "s|s";
if(zend_parse_parameters_ex(ZEND_PARSE_PARAMS_QUIET, arguments_received TSRMLS_CC, parse_parameters_string, &name0, &name_len0, &path0, &path_len0 ) == SUCCESS)
{
overload0_called = true;
already_called = true;
}
}
if(overload0_called)
{
switch(arguments_received)
{
case 1:
{
#ifdef USE_WXPHP_DEBUG
php_printf("Executing RETURN_BOOL(wxSingleInstanceChecker::Create(wxString(name0, wxConvUTF8)))\n\n");
#endif
ZVAL_BOOL(return_value, ((wxSingleInstanceChecker_php*)_this)->Create(wxString(name0, wxConvUTF8)));
return;
break;
}
case 2:
{
#ifdef USE_WXPHP_DEBUG
php_printf("Executing RETURN_BOOL(wxSingleInstanceChecker::Create(wxString(name0, wxConvUTF8), wxString(path0, wxConvUTF8)))\n\n");
#endif
ZVAL_BOOL(return_value, ((wxSingleInstanceChecker_php*)_this)->Create(wxString(name0, wxConvUTF8), wxString(path0, wxConvUTF8)));
return;
break;
}
}
}
//In case wrong type/count of parameters was passed
if(!already_called)
{
zend_error(E_ERROR, "Wrong type or count of parameters passed to: wxSingleInstanceChecker::Create\n");
}
}
PHP_METHOD(php_wxSingleInstanceChecker, CreateDefault)
{
#ifdef USE_WXPHP_DEBUG
php_printf("Invoking wxSingleInstanceChecker::CreateDefault\n");
php_printf("===========================================\n");
#endif
//In case the constructor uses objects
zval **tmp;
int rsrc_type;
int parent_rsrc_type;
int id_to_find;
char _wxResource[] = "wxResource";
//Other variables used thru the code
int arguments_received = ZEND_NUM_ARGS();
void *_this;
zval* dummy;
bool already_called = false;
wxPHPObjectReferences* references;
bool return_is_user_initialized = false;
//Get pointer of object that called this method if not a static method
if (getThis() != NULL)
{
if(zend_hash_find(Z_OBJPROP_P(getThis()), _wxResource, sizeof(_wxResource), (void **)&tmp) == FAILURE)
{
zend_error(E_ERROR, "Failed to get the parent object that called wxSingleInstanceChecker::CreateDefault\n");
return;
}
else
{
id_to_find = Z_RESVAL_P(*tmp);
_this = zend_list_find(id_to_find, &parent_rsrc_type);
bool reference_type_found = false;
if(parent_rsrc_type == le_wxSingleInstanceChecker){
references = &((wxSingleInstanceChecker_php*)_this)->references;
reference_type_found = true;
}
}
}
#ifdef USE_WXPHP_DEBUG
else
{
php_printf("Processing the method call as static\n");
}
#endif
//Parameters for overload 0
bool overload0_called = false;
//Overload 0
overload0:
if(!already_called && arguments_received == 0)
{
#ifdef USE_WXPHP_DEBUG
php_printf("Parameters received %d\n", arguments_received);
php_printf("Parsing parameters with '' ()\n");
#endif
overload0_called = true;
already_called = true;
}
if(overload0_called)
{
switch(arguments_received)
{
case 0:
{
#ifdef USE_WXPHP_DEBUG
php_printf("Executing RETURN_BOOL(wxSingleInstanceChecker::CreateDefault())\n\n");
#endif
ZVAL_BOOL(return_value, ((wxSingleInstanceChecker_php*)_this)->CreateDefault());
return;
break;
}
}
}
//In case wrong type/count of parameters was passed
if(!already_called)
{
zend_error(E_ERROR, "Wrong type or count of parameters passed to: wxSingleInstanceChecker::CreateDefault\n");
}
}
PHP_METHOD(php_wxSingleInstanceChecker, IsAnotherRunning)
{
#ifdef USE_WXPHP_DEBUG
php_printf("Invoking wxSingleInstanceChecker::IsAnotherRunning\n");
php_printf("===========================================\n");
#endif
//In case the constructor uses objects
zval **tmp;
int rsrc_type;
int parent_rsrc_type;
int id_to_find;
char _wxResource[] = "wxResource";
//Other variables used thru the code
int arguments_received = ZEND_NUM_ARGS();
void *_this;
zval* dummy;
bool already_called = false;
wxPHPObjectReferences* references;
bool return_is_user_initialized = false;
//Get pointer of object that called this method if not a static method
if (getThis() != NULL)
{
if(zend_hash_find(Z_OBJPROP_P(getThis()), _wxResource, sizeof(_wxResource), (void **)&tmp) == FAILURE)
{
zend_error(E_ERROR, "Failed to get the parent object that called wxSingleInstanceChecker::IsAnotherRunning\n");
return;
}
else
{
id_to_find = Z_RESVAL_P(*tmp);
_this = zend_list_find(id_to_find, &parent_rsrc_type);
bool reference_type_found = false;
if(parent_rsrc_type == le_wxSingleInstanceChecker){
references = &((wxSingleInstanceChecker_php*)_this)->references;
reference_type_found = true;
}
}
}
#ifdef USE_WXPHP_DEBUG
else
{
php_printf("Processing the method call as static\n");
}
#endif
//Parameters for overload 0
bool overload0_called = false;
//Overload 0
overload0:
if(!already_called && arguments_received == 0)
{
#ifdef USE_WXPHP_DEBUG
php_printf("Parameters received %d\n", arguments_received);
php_printf("Parsing parameters with '' ()\n");
#endif
overload0_called = true;
already_called = true;
}
if(overload0_called)
{
switch(arguments_received)
{
case 0:
{
#ifdef USE_WXPHP_DEBUG
php_printf("Executing RETURN_BOOL(wxSingleInstanceChecker::IsAnotherRunning())\n\n");
#endif
ZVAL_BOOL(return_value, ((wxSingleInstanceChecker_php*)_this)->IsAnotherRunning());
return;
break;
}
}
}
//In case wrong type/count of parameters was passed
if(!already_called)
{
zend_error(E_ERROR, "Wrong type or count of parameters passed to: wxSingleInstanceChecker::IsAnotherRunning\n");
}
}
PHP_METHOD(php_wxSingleInstanceChecker, __construct)
{
#ifdef USE_WXPHP_DEBUG
php_printf("Invoking wxSingleInstanceChecker::__construct\n");
php_printf("===========================================\n");
#endif
//In case the constructor uses objects
zval **tmp;
int rsrc_type;
int id_to_find;
char _wxResource[] = "wxResource";
//Other variables used thru the code
int arguments_received = ZEND_NUM_ARGS();
void *_this;
zval* dummy;
bool already_called = false;
//Parameters for overload 0
bool overload0_called = false;
//Parameters for overload 1
char* name1;
long name_len1;
char* path1;
long path_len1;
bool overload1_called = false;
//Overload 0
overload0:
if(!already_called && arguments_received == 0)
{
#ifdef USE_WXPHP_DEBUG
php_printf("Parameters received %d\n", arguments_received);
php_printf("Parsing parameters with '' ()\n");
#endif
overload0_called = true;
already_called = true;
}
//Overload 1
overload1:
if(!already_called && arguments_received >= 1 && arguments_received <= 2)
{
#ifdef USE_WXPHP_DEBUG
php_printf("Parameters received %d\n", arguments_received);
php_printf("Parsing parameters with 's|s' (&name1, &name_len1, &path1, &path_len1)\n");
#endif
char parse_parameters_string[] = "s|s";
if(zend_parse_parameters_ex(ZEND_PARSE_PARAMS_QUIET, arguments_received TSRMLS_CC, parse_parameters_string, &name1, &name_len1, &path1, &path_len1 ) == SUCCESS)
{
overload1_called = true;
already_called = true;
}
}
if(overload0_called)
{
switch(arguments_received)
{
case 0:
{
#ifdef USE_WXPHP_DEBUG
php_printf("Executing __construct()\n");
#endif
_this = new wxSingleInstanceChecker_php();
((wxSingleInstanceChecker_php*) _this)->references.Initialize();
break;
}
}
}
if(overload1_called)
{
switch(arguments_received)
{
case 1:
{
#ifdef USE_WXPHP_DEBUG
php_printf("Executing __construct(wxString(name1, wxConvUTF8))\n");
#endif
_this = new wxSingleInstanceChecker_php(wxString(name1, wxConvUTF8));
((wxSingleInstanceChecker_php*) _this)->references.Initialize();
break;
}
case 2:
{
#ifdef USE_WXPHP_DEBUG
php_printf("Executing __construct(wxString(name1, wxConvUTF8), wxString(path1, wxConvUTF8))\n");
#endif
_this = new wxSingleInstanceChecker_php(wxString(name1, wxConvUTF8), wxString(path1, wxConvUTF8));
((wxSingleInstanceChecker_php*) _this)->references.Initialize();
break;
}
}
}
if(already_called)
{
long id_to_find = zend_list_insert(_this, le_wxSingleInstanceChecker);
add_property_resource(getThis(), _wxResource, id_to_find);
MAKE_STD_ZVAL(((wxSingleInstanceChecker_php*) _this)->evnArray);
array_init(((wxSingleInstanceChecker_php*) _this)->evnArray);
((wxSingleInstanceChecker_php*) _this)->phpObj = getThis();
((wxSingleInstanceChecker_php*) _this)->InitProperties();
#ifdef ZTS
((wxSingleInstanceChecker_php*) _this)->TSRMLS_C = TSRMLS_C;
#endif
}
else
{
zend_error(E_ERROR, "Abstract class or wrong type/count of parameters passed to: wxSingleInstanceChecker::__constructor\n");
}
#ifdef USE_WXPHP_DEBUG
php_printf("===========================================\n\n");
#endif
}