diff options
author | Mark Spruiell <mes@zeroc.com> | 2006-11-09 18:38:47 +0000 |
---|---|---|
committer | Mark Spruiell <mes@zeroc.com> | 2006-11-09 18:38:47 +0000 |
commit | 9fc8c2106fdb8e918eefd8614aef6dd77a9c29e3 (patch) | |
tree | 3942117e687cbe34477b9d2f48d82fe098cd972b /php/src/IcePHP/Profile.h | |
parent | clean up; align with C++; bug fix (diff) | |
download | ice-9fc8c2106fdb8e918eefd8614aef6dd77a9c29e3.tar.bz2 ice-9fc8c2106fdb8e918eefd8614aef6dd77a9c29e3.tar.xz ice-9fc8c2106fdb8e918eefd8614aef6dd77a9c29e3.zip |
Reorganizing source code. Changing build process to use Makefiles instead
of configure. Desupporting all platforms except Linux and Windows.
Diffstat (limited to 'php/src/IcePHP/Profile.h')
-rw-r--r-- | php/src/IcePHP/Profile.h | 53 |
1 files changed, 53 insertions, 0 deletions
diff --git a/php/src/IcePHP/Profile.h b/php/src/IcePHP/Profile.h new file mode 100644 index 00000000000..76cf462569f --- /dev/null +++ b/php/src/IcePHP/Profile.h @@ -0,0 +1,53 @@ +// ********************************************************************** +// +// Copyright (c) 2003-2006 ZeroC, Inc. All rights reserved. +// +// This copy of Ice is licensed to you under the terms described in the +// ICE_LICENSE file included in this distribution. +// +// ********************************************************************** + +#ifndef ICE_PHP_PROFILE_H +#define ICE_PHP_PROFILE_H + +#include <Config.h> + +// +// Global functions. +// +extern "C" +{ +ZEND_FUNCTION(Ice_loadProfile); +ZEND_FUNCTION(Ice_loadProfileWithArgs); +ZEND_FUNCTION(Ice_dumpProfile); +} + +#define ICE_PHP_PROFILE_FUNCTIONS \ + ZEND_FE(Ice_loadProfile, NULL) \ + ZEND_FE(Ice_loadProfileWithArgs, NULL) \ + ZEND_FE(Ice_dumpProfile, NULL) + +namespace IcePHP +{ + +bool profileInit(TSRMLS_D); +bool profileShutdown(TSRMLS_D); + +// +// Profile contains information about an Ice configuration. A pointer to a Profile instance +// is stored in the PHP globals (see php_ice.h) when a script invokes Ice_loadProfile(). +// +struct Profile +{ + typedef std::map<std::string, Slice::ClassDefPtr> ClassMap; + + std::string name; // The profile name + Slice::UnitPtr unit; // The parsed Slice code + std::string code; // PHP code generated from Slice types + ClassMap classes; // Associates flattened type ids to their ClassDefs + Ice::PropertiesPtr properties; // Configuration properties +}; + +} // End of namespace IcePHP + +#endif |