Issue #2215 - Updates to edex_com and edex_notify for the thrift 0.9.0 upgrade.

- Amend: fix data types in GridDataRequestMessage

Change-Id: I7f7abd36b3c3f94c24ee0381115c5643aae39f22

Former-commit-id: e317a0d7101182ad351f604cfc04ad0292773161
This commit is contained in:
Bryan Kowal 2013-07-24 12:57:04 -05:00
parent 9ae7f63e26
commit c5c9f4d30b
177 changed files with 4569 additions and 19570 deletions

View file

@ -44,13 +44,13 @@
<listOptionValue builtIn="false" value="/usr/local/include"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/org.apache.thrift/include}&quot;"/>
</option>
<option id="gnu.cpp.compiler.option.other.other.1732324977" name="Other flags" superClass="gnu.cpp.compiler.option.other.other" value="-m32 -c -fmessage-length=0" valueType="string"/>
<option id="gnu.cpp.compiler.option.other.other.1732324977" name="Other flags" superClass="gnu.cpp.compiler.option.other.other" value="-m32 -c -fmessage-length=0 -DHAVE_NETINET_IN_H" valueType="string"/>
<inputType id="cdt.managedbuild.tool.gnu.cpp.compiler.input.484353099" superClass="cdt.managedbuild.tool.gnu.cpp.compiler.input"/>
</tool>
<tool id="cdt.managedbuild.tool.gnu.c.compiler.so.release.268435785" name="GCC C Compiler" superClass="cdt.managedbuild.tool.gnu.c.compiler.so.release">
<option defaultValue="gnu.c.optimization.level.most" id="gnu.c.compiler.so.release.option.optimization.level.802547994" name="Optimization Level" superClass="gnu.c.compiler.so.release.option.optimization.level" valueType="enumerated"/>
<option id="gnu.c.compiler.so.release.option.debugging.level.378708998" name="Debug Level" superClass="gnu.c.compiler.so.release.option.debugging.level" value="gnu.c.debugging.level.default" valueType="enumerated"/>
<option id="gnu.c.compiler.option.misc.other.978379918" name="Other flags" superClass="gnu.c.compiler.option.misc.other" value="-m32 -c -fmessage-length=0" valueType="string"/>
<option id="gnu.c.compiler.option.misc.other.978379918" name="Other flags" superClass="gnu.c.compiler.option.misc.other" value="-m32 -c -fmessage-length=0 -DHAVE_NETINET_IN_H" valueType="string"/>
<inputType id="cdt.managedbuild.tool.gnu.c.compiler.input.1375162" superClass="cdt.managedbuild.tool.gnu.c.compiler.input"/>
</tool>
<tool id="cdt.managedbuild.tool.gnu.c.linker.so.release.227753427" name="GCC C Linker" superClass="cdt.managedbuild.tool.gnu.c.linker.so.release">
@ -99,753 +99,6 @@
<storageModule moduleId="org.eclipse.cdt.internal.ui.text.commentOwnerProjectMappings"/>
<storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
<storageModule moduleId="org.eclipse.cdt.make.core.buildtargets"/>
<storageModule moduleId="scannerConfiguration">
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="org.eclipse.cdt.make.core.GCCStandardMakePerProjectProfile"/>
<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerProjectProfile">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="specsFile">
<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerFileProfile">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="makefileGenerator">
<runAction arguments="-f ${project_name}_scd.mk" command="make" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfile">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="specsFile">
<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileCPP">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="specsFile">
<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.cpp" command="g++" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileC">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="specsFile">
<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.c" command="gcc" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfile">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="specsFile">
<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileCPP">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="specsFile">
<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.cpp" command="g++" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileC">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="specsFile">
<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.c" command="gcc" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
<scannerConfigBuildInfo instanceId="cdt.managedbuild.config.gnu.so.debug.548606643;cdt.managedbuild.config.gnu.so.debug.548606643.;cdt.managedbuild.tool.gnu.c.compiler.so.debug.526103997;cdt.managedbuild.tool.gnu.c.compiler.input.804832564">
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileC"/>
<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerProjectProfile">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="specsFile">
<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerFileProfile">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="makefileGenerator">
<runAction arguments="-f ${project_name}_scd.mk" command="make" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfile">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="specsFile">
<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileCPP">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="specsFile">
<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.cpp" command="g++" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileC">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="specsFile">
<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.c" command="gcc" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfile">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="specsFile">
<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileCPP">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="specsFile">
<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.cpp" command="g++" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileC">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="specsFile">
<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.c" command="gcc" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
</scannerConfigBuildInfo>
<scannerConfigBuildInfo instanceId="cdt.managedbuild.config.gnu.so.release.1201809015;cdt.managedbuild.config.gnu.so.release.1201809015.730322548;cdt.managedbuild.tool.gnu.cpp.compiler.so.release.1243921223;cdt.managedbuild.tool.gnu.cpp.compiler.input.1611498141">
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileCPP"/>
<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerProjectProfile">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="specsFile">
<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerFileProfile">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="makefileGenerator">
<runAction arguments="-f ${project_name}_scd.mk" command="make" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfile">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="specsFile">
<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileCPP">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="specsFile">
<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.cpp" command="g++" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileC">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="specsFile">
<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.c" command="gcc" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfile">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="specsFile">
<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileCPP">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="specsFile">
<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.cpp" command="g++" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileC">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="specsFile">
<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.c" command="gcc" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
</scannerConfigBuildInfo>
<scannerConfigBuildInfo instanceId="cdt.managedbuild.config.gnu.so.release.1201809015;cdt.managedbuild.config.gnu.so.release.1201809015.;cdt.managedbuild.tool.gnu.cpp.compiler.so.release.133837787;cdt.managedbuild.tool.gnu.cpp.compiler.input.857651647">
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileCPP"/>
<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerProjectProfile">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="specsFile">
<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerFileProfile">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="makefileGenerator">
<runAction arguments="-f ${project_name}_scd.mk" command="make" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfile">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="specsFile">
<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileCPP">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="specsFile">
<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.cpp" command="g++" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileC">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="specsFile">
<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.c" command="gcc" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfile">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="specsFile">
<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileCPP">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="specsFile">
<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.cpp" command="g++" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileC">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="specsFile">
<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.c" command="gcc" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
</scannerConfigBuildInfo>
<scannerConfigBuildInfo instanceId="cdt.managedbuild.config.gnu.so.debug.548606643;cdt.managedbuild.config.gnu.so.debug.548606643.2015427790;cdt.managedbuild.tool.gnu.cpp.compiler.so.debug.1843780412;cdt.managedbuild.tool.gnu.cpp.compiler.input.455091642">
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileCPP"/>
<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerProjectProfile">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="specsFile">
<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerFileProfile">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="makefileGenerator">
<runAction arguments="-f ${project_name}_scd.mk" command="make" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfile">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="specsFile">
<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileCPP">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="specsFile">
<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.cpp" command="g++" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileC">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="specsFile">
<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.c" command="gcc" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfile">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="specsFile">
<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileCPP">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="specsFile">
<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.cpp" command="g++" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileC">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="specsFile">
<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.c" command="gcc" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
</scannerConfigBuildInfo>
<scannerConfigBuildInfo instanceId="cdt.managedbuild.config.gnu.so.release.1201809015;cdt.managedbuild.config.gnu.so.release.1201809015.;cdt.managedbuild.tool.gnu.c.compiler.so.release.2044944995;cdt.managedbuild.tool.gnu.c.compiler.input.1923668928">
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileC"/>
<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerProjectProfile">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="specsFile">
<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerFileProfile">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="makefileGenerator">
<runAction arguments="-f ${project_name}_scd.mk" command="make" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfile">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="specsFile">
<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileCPP">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="specsFile">
<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.cpp" command="g++" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileC">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="specsFile">
<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.c" command="gcc" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfile">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="specsFile">
<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileCPP">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="specsFile">
<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.cpp" command="g++" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileC">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="specsFile">
<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.c" command="gcc" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
</scannerConfigBuildInfo>
<scannerConfigBuildInfo instanceId="cdt.managedbuild.config.gnu.so.release.1201809015;cdt.managedbuild.config.gnu.so.release.1201809015.730322548;cdt.managedbuild.tool.gnu.c.compiler.so.release.1431258305;cdt.managedbuild.tool.gnu.c.compiler.input.1668119339">
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileC"/>
<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerProjectProfile">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="specsFile">
<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerFileProfile">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="makefileGenerator">
<runAction arguments="-f ${project_name}_scd.mk" command="make" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfile">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="specsFile">
<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileCPP">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="specsFile">
<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.cpp" command="g++" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileC">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="specsFile">
<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.c" command="gcc" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfile">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="specsFile">
<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileCPP">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="specsFile">
<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.cpp" command="g++" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileC">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="specsFile">
<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.c" command="gcc" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
</scannerConfigBuildInfo>
<scannerConfigBuildInfo instanceId="cdt.managedbuild.config.gnu.so.debug.548606643;cdt.managedbuild.config.gnu.so.debug.548606643.;cdt.managedbuild.tool.gnu.cpp.compiler.so.debug.485493337;cdt.managedbuild.tool.gnu.cpp.compiler.input.1569616918">
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileCPP"/>
<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerProjectProfile">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="specsFile">
<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerFileProfile">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="makefileGenerator">
<runAction arguments="-f ${project_name}_scd.mk" command="make" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfile">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="specsFile">
<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileCPP">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="specsFile">
<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.cpp" command="g++" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileC">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="specsFile">
<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.c" command="gcc" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfile">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="specsFile">
<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileCPP">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="specsFile">
<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.cpp" command="g++" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileC">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="specsFile">
<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.c" command="gcc" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
</scannerConfigBuildInfo>
<scannerConfigBuildInfo instanceId="cdt.managedbuild.config.gnu.so.debug.548606643;cdt.managedbuild.config.gnu.so.debug.548606643.2015427790;cdt.managedbuild.tool.gnu.c.compiler.so.debug.902270269;cdt.managedbuild.tool.gnu.c.compiler.input.971839399">
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileC"/>
<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerProjectProfile">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="specsFile">
<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerFileProfile">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="makefileGenerator">
<runAction arguments="-f ${project_name}_scd.mk" command="make" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfile">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="specsFile">
<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileCPP">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="specsFile">
<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.cpp" command="g++" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileC">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="specsFile">
<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.c" command="gcc" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfile">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="specsFile">
<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileCPP">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="specsFile">
<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.cpp" command="g++" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileC">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="specsFile">
<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.c" command="gcc" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
</scannerConfigBuildInfo>
</storageModule>
</cconfiguration>
<cconfiguration id="cdt.managedbuild.config.gnu.so.release.1201809015.180606627">
<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="cdt.managedbuild.config.gnu.so.release.1201809015.180606627" moduleId="org.eclipse.cdt.core.settings" name="Build x86_64">
@ -889,13 +142,13 @@
<listOptionValue builtIn="false" value="/usr/local/include"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/org.apache.thrift/include}&quot;"/>
</option>
<option id="gnu.cpp.compiler.option.other.other.1885638584" name="Other flags" superClass="gnu.cpp.compiler.option.other.other" value="-m64 -c -fmessage-length=0 -fPIC" valueType="string"/>
<option id="gnu.cpp.compiler.option.other.other.1885638584" name="Other flags" superClass="gnu.cpp.compiler.option.other.other" value="-m64 -c -fmessage-length=0 -fPIC -DHAVE_NETINET_IN_H" valueType="string"/>
<inputType id="cdt.managedbuild.tool.gnu.cpp.compiler.input.1042769234" superClass="cdt.managedbuild.tool.gnu.cpp.compiler.input"/>
</tool>
<tool id="cdt.managedbuild.tool.gnu.c.compiler.so.release.1279322311" name="GCC C Compiler" superClass="cdt.managedbuild.tool.gnu.c.compiler.so.release">
<option defaultValue="gnu.c.optimization.level.most" id="gnu.c.compiler.so.release.option.optimization.level.1739982210" name="Optimization Level" superClass="gnu.c.compiler.so.release.option.optimization.level" valueType="enumerated"/>
<option id="gnu.c.compiler.so.release.option.debugging.level.971935299" name="Debug Level" superClass="gnu.c.compiler.so.release.option.debugging.level" value="gnu.c.debugging.level.none" valueType="enumerated"/>
<option id="gnu.c.compiler.option.misc.other.370824063" name="Other flags" superClass="gnu.c.compiler.option.misc.other" value="-m64 -c -fmessage-length=0" valueType="string"/>
<option id="gnu.c.compiler.option.misc.other.370824063" name="Other flags" superClass="gnu.c.compiler.option.misc.other" value="-m64 -c -fmessage-length=0 -DHAVE_NETINET_IN_H" valueType="string"/>
<inputType id="cdt.managedbuild.tool.gnu.c.compiler.input.718299410" superClass="cdt.managedbuild.tool.gnu.c.compiler.input"/>
</tool>
<tool id="cdt.managedbuild.tool.gnu.c.linker.so.release.491207671" name="GCC C Linker" superClass="cdt.managedbuild.tool.gnu.c.linker.so.release">
@ -944,6 +197,11 @@
<storageModule moduleId="org.eclipse.cdt.internal.ui.text.commentOwnerProjectMappings"/>
<storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
<storageModule moduleId="org.eclipse.cdt.make.core.buildtargets"/>
</cconfiguration>
</storageModule>
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
<project id="edex_com.cdt.managedbuild.target.gnu.so.206598592" name="Shared Library" projectType="cdt.managedbuild.target.gnu.so"/>
</storageModule>
<storageModule moduleId="scannerConfiguration">
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="org.eclipse.cdt.make.core.GCCStandardMakePerProjectProfile"/>
<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerProjectProfile">
@ -1691,9 +949,4 @@
</profile>
</scannerConfigBuildInfo>
</storageModule>
</cconfiguration>
</storageModule>
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
<project id="edex_com.cdt.managedbuild.target.gnu.so.206598592" name="Shared Library" projectType="cdt.managedbuild.target.gnu.so"/>
</storageModule>
</cproject>

View file

@ -1,7 +1,45 @@
/**
* Autogenerated by Thrift
* Autogenerated by Thrift Compiler (0.9.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
/*****************************************************************************************
* COPYRIGHT (c), 2009, RAYTHEON COMPANY
* ALL RIGHTS RESERVED, An Unpublished Work
*
* RAYTHEON PROPRIETARY
* If the end user is not the U.S. Government or any agency thereof, use
* or disclosure of data contained in this source code file is subject to
* the proprietary restrictions set forth in the Master Rights File.
*
* U.S. GOVERNMENT PURPOSE RIGHTS NOTICE
* If the end user is the U.S. Government or any agency thereof, this source
* code is provided to the U.S. Government with Government Purpose Rights.
* Use or disclosure of data contained in this source code file is subject to
* the "Government Purpose Rights" restriction in the Master Rights File.
*
* U.S. EXPORT CONTROLLED TECHNICAL DATA
* Use or disclosure of data contained in this source code file is subject to
* the export restrictions set forth in the Master Rights File.
******************************************************************************************/
/*
* Extended thrift protocol to handle messages from edex.
*
* <pre>
*
* SOFTWARE HISTORY
*
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* 07/29/13 2215 bkowal Regenerated for thrift 0.9.0
*
* </pre>
*
* @author bkowal
* @version 1
*/
#include "GribThriftContainer_constants.h"

View file

@ -1,7 +1,45 @@
/**
* Autogenerated by Thrift
* Autogenerated by Thrift Compiler (0.9.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
/*****************************************************************************************
* COPYRIGHT (c), 2009, RAYTHEON COMPANY
* ALL RIGHTS RESERVED, An Unpublished Work
*
* RAYTHEON PROPRIETARY
* If the end user is not the U.S. Government or any agency thereof, use
* or disclosure of data contained in this source code file is subject to
* the proprietary restrictions set forth in the Master Rights File.
*
* U.S. GOVERNMENT PURPOSE RIGHTS NOTICE
* If the end user is the U.S. Government or any agency thereof, this source
* code is provided to the U.S. Government with Government Purpose Rights.
* Use or disclosure of data contained in this source code file is subject to
* the "Government Purpose Rights" restriction in the Master Rights File.
*
* U.S. EXPORT CONTROLLED TECHNICAL DATA
* Use or disclosure of data contained in this source code file is subject to
* the export restrictions set forth in the Master Rights File.
******************************************************************************************/
/*
* Extended thrift protocol to handle messages from edex.
*
* <pre>
*
* SOFTWARE HISTORY
*
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* 07/29/13 2215 bkowal Regenerated for thrift 0.9.0
*
* </pre>
*
* @author bkowal
* @version 1
*/
#ifndef GribThriftContainer_CONSTANTS_H
#define GribThriftContainer_CONSTANTS_H

View file

@ -1,13 +1,52 @@
/**
* Autogenerated by Thrift
* Autogenerated by Thrift Compiler (0.9.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
/*****************************************************************************************
* COPYRIGHT (c), 2009, RAYTHEON COMPANY
* ALL RIGHTS RESERVED, An Unpublished Work
*
* RAYTHEON PROPRIETARY
* If the end user is not the U.S. Government or any agency thereof, use
* or disclosure of data contained in this source code file is subject to
* the proprietary restrictions set forth in the Master Rights File.
*
* U.S. GOVERNMENT PURPOSE RIGHTS NOTICE
* If the end user is the U.S. Government or any agency thereof, this source
* code is provided to the U.S. Government with Government Purpose Rights.
* Use or disclosure of data contained in this source code file is subject to
* the "Government Purpose Rights" restriction in the Master Rights File.
*
* U.S. EXPORT CONTROLLED TECHNICAL DATA
* Use or disclosure of data contained in this source code file is subject to
* the export restrictions set forth in the Master Rights File.
******************************************************************************************/
/*
* Extended thrift protocol to handle messages from edex.
*
* <pre>
*
* SOFTWARE HISTORY
*
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* 07/29/13 2215 bkowal Regenerated for thrift 0.9.0
*
* </pre>
*
* @author bkowal
* @version 1
*/
#include "GribThriftContainer_types.h"
#include <algorithm>
const char* com_raytheon_uf_common_dataplugin_grib_GribThriftContainer::ascii_fingerprint = "95D7C1CC242CB9967B6C72FA20597323";
const uint8_t com_raytheon_uf_common_dataplugin_grib_GribThriftContainer::binary_fingerprint[16] = {0x95,0xD7,0xC1,0xCC,0x24,0x2C,0xB9,0x96,0x7B,0x6C,0x72,0xFA,0x20,0x59,0x73,0x23};
const char* com_raytheon_uf_common_dataplugin_grib_GribThriftContainer::ascii_fingerprint = "3427B853D0066190C799037982D95E40";
const uint8_t com_raytheon_uf_common_dataplugin_grib_GribThriftContainer::binary_fingerprint[16] = {0x34,0x27,0xB8,0x53,0xD0,0x06,0x61,0x90,0xC7,0x99,0x03,0x79,0x82,0xD9,0x5E,0x40};
uint32_t com_raytheon_uf_common_dataplugin_grib_GribThriftContainer::read(::apache::thrift::protocol::TProtocol* iprot) {
@ -41,16 +80,16 @@ uint32_t com_raytheon_uf_common_dataplugin_grib_GribThriftContainer::read(::apac
if (ftype == ::apache::thrift::protocol::T_LIST) {
{
this->records.clear();
uint32_t _size24;
::apache::thrift::protocol::TType _etype27;
iprot->readListBegin(_etype27, _size24);
this->records.resize(_size24);
uint32_t _i28;
for (_i28 = 0; _i28 < _size24; ++_i28)
uint32_t _size0;
::apache::thrift::protocol::TType _etype3;
xfer += iprot->readListBegin(_etype3, _size0);
this->records.resize(_size0);
uint32_t _i4;
for (_i4 = 0; _i4 < _size0; ++_i4)
{
xfer += this->records[_i28].read(iprot);
xfer += this->records[_i4].read(iprot);
}
iprot->readListEnd();
xfer += iprot->readListEnd();
}
this->__isset.records = true;
} else {
@ -72,23 +111,33 @@ uint32_t com_raytheon_uf_common_dataplugin_grib_GribThriftContainer::read(::apac
uint32_t com_raytheon_uf_common_dataplugin_grib_GribThriftContainer::write(::apache::thrift::protocol::TProtocol* oprot) const {
uint32_t xfer = 0;
xfer += oprot->writeStructBegin("com_raytheon_uf_common_dataplugin_grib_GribThriftContainer");
xfer += oprot->writeFieldBegin("numOfRecords", ::apache::thrift::protocol::T_I32, 1);
xfer += oprot->writeI32(this->numOfRecords);
xfer += oprot->writeFieldEnd();
xfer += oprot->writeFieldBegin("records", ::apache::thrift::protocol::T_LIST, 2);
{
xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, this->records.size());
std::vector<com_raytheon_uf_common_dataplugin_grib_GribThriftRecord> ::const_iterator _iter29;
for (_iter29 = this->records.begin(); _iter29 != this->records.end(); ++_iter29)
xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast<uint32_t>(this->records.size()));
std::vector<com_raytheon_uf_common_dataplugin_grib_GribThriftRecord> ::const_iterator _iter5;
for (_iter5 = this->records.begin(); _iter5 != this->records.end(); ++_iter5)
{
xfer += (*_iter29).write(oprot);
xfer += (*_iter5).write(oprot);
}
xfer += oprot->writeListEnd();
}
xfer += oprot->writeFieldEnd();
xfer += oprot->writeFieldStop();
xfer += oprot->writeStructEnd();
return xfer;
}
void swap(com_raytheon_uf_common_dataplugin_grib_GribThriftContainer &a, com_raytheon_uf_common_dataplugin_grib_GribThriftContainer &b) {
using ::std::swap;
swap(a.numOfRecords, b.numOfRecords);
swap(a.records, b.records);
swap(a.__isset, b.__isset);
}

View file

@ -1,17 +1,55 @@
/**
* Autogenerated by Thrift
* Autogenerated by Thrift Compiler (0.9.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
/*****************************************************************************************
* COPYRIGHT (c), 2009, RAYTHEON COMPANY
* ALL RIGHTS RESERVED, An Unpublished Work
*
* RAYTHEON PROPRIETARY
* If the end user is not the U.S. Government or any agency thereof, use
* or disclosure of data contained in this source code file is subject to
* the proprietary restrictions set forth in the Master Rights File.
*
* U.S. GOVERNMENT PURPOSE RIGHTS NOTICE
* If the end user is the U.S. Government or any agency thereof, this source
* code is provided to the U.S. Government with Government Purpose Rights.
* Use or disclosure of data contained in this source code file is subject to
* the "Government Purpose Rights" restriction in the Master Rights File.
*
* U.S. EXPORT CONTROLLED TECHNICAL DATA
* Use or disclosure of data contained in this source code file is subject to
* the export restrictions set forth in the Master Rights File.
******************************************************************************************/
/*
* Extended thrift protocol to handle messages from edex.
*
* <pre>
*
* SOFTWARE HISTORY
*
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* 07/29/13 2215 bkowal Regenerated for thrift 0.9.0
*
* </pre>
*
* @author bkowal
* @version 1
*/
#ifndef GribThriftContainer_TYPES_H
#define GribThriftContainer_TYPES_H
#include <Thrift.h>
#include <TApplicationException.h>
#include <protocol/TProtocol.h>
#include <transport/TTransport.h>
#include "GribThriftRecord_types.h"
#include <thrift/Thrift.h>
#include <thrift/TApplicationException.h>
#include <thrift/protocol/TProtocol.h>
#include <thrift/transport/TTransport.h>
#include "GribThriftRecord_types.h"
typedef struct _com_raytheon_uf_common_dataplugin_grib_GribThriftContainer__isset {
@ -23,8 +61,8 @@ typedef struct _com_raytheon_uf_common_dataplugin_grib_GribThriftContainer__isse
class com_raytheon_uf_common_dataplugin_grib_GribThriftContainer {
public:
static const char* ascii_fingerprint; // = "95D7C1CC242CB9967B6C72FA20597323";
static const uint8_t binary_fingerprint[16]; // = {0x95,0xD7,0xC1,0xCC,0x24,0x2C,0xB9,0x96,0x7B,0x6C,0x72,0xFA,0x20,0x59,0x73,0x23};
static const char* ascii_fingerprint; // = "3427B853D0066190C799037982D95E40";
static const uint8_t binary_fingerprint[16]; // = {0x34,0x27,0xB8,0x53,0xD0,0x06,0x61,0x90,0xC7,0x99,0x03,0x79,0x82,0xD9,0x5E,0x40};
com_raytheon_uf_common_dataplugin_grib_GribThriftContainer() : numOfRecords(0) {
}
@ -36,6 +74,14 @@ class com_raytheon_uf_common_dataplugin_grib_GribThriftContainer {
_com_raytheon_uf_common_dataplugin_grib_GribThriftContainer__isset __isset;
void __set_numOfRecords(const int32_t val) {
numOfRecords = val;
}
void __set_records(const std::vector<com_raytheon_uf_common_dataplugin_grib_GribThriftRecord> & val) {
records = val;
}
bool operator == (const com_raytheon_uf_common_dataplugin_grib_GribThriftContainer & rhs) const
{
if (!(numOfRecords == rhs.numOfRecords))
@ -55,6 +101,8 @@ class com_raytheon_uf_common_dataplugin_grib_GribThriftContainer {
};
void swap(com_raytheon_uf_common_dataplugin_grib_GribThriftContainer &a, com_raytheon_uf_common_dataplugin_grib_GribThriftContainer &b);
#endif

View file

@ -1,7 +1,45 @@
/**
* Autogenerated by Thrift
* Autogenerated by Thrift Compiler (0.9.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
/*****************************************************************************************
* COPYRIGHT (c), 2009, RAYTHEON COMPANY
* ALL RIGHTS RESERVED, An Unpublished Work
*
* RAYTHEON PROPRIETARY
* If the end user is not the U.S. Government or any agency thereof, use
* or disclosure of data contained in this source code file is subject to
* the proprietary restrictions set forth in the Master Rights File.
*
* U.S. GOVERNMENT PURPOSE RIGHTS NOTICE
* If the end user is the U.S. Government or any agency thereof, this source
* code is provided to the U.S. Government with Government Purpose Rights.
* Use or disclosure of data contained in this source code file is subject to
* the "Government Purpose Rights" restriction in the Master Rights File.
*
* U.S. EXPORT CONTROLLED TECHNICAL DATA
* Use or disclosure of data contained in this source code file is subject to
* the export restrictions set forth in the Master Rights File.
******************************************************************************************/
/*
* Extended thrift protocol to handle messages from edex.
*
* <pre>
*
* SOFTWARE HISTORY
*
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* 07/29/13 2215 bkowal Regenerated for thrift 0.9.0
*
* </pre>
*
* @author bkowal
* @version 1
*/
#include "GribThriftRecord_constants.h"

View file

@ -1,7 +1,45 @@
/**
* Autogenerated by Thrift
* Autogenerated by Thrift Compiler (0.9.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
/*****************************************************************************************
* COPYRIGHT (c), 2009, RAYTHEON COMPANY
* ALL RIGHTS RESERVED, An Unpublished Work
*
* RAYTHEON PROPRIETARY
* If the end user is not the U.S. Government or any agency thereof, use
* or disclosure of data contained in this source code file is subject to
* the proprietary restrictions set forth in the Master Rights File.
*
* U.S. GOVERNMENT PURPOSE RIGHTS NOTICE
* If the end user is the U.S. Government or any agency thereof, this source
* code is provided to the U.S. Government with Government Purpose Rights.
* Use or disclosure of data contained in this source code file is subject to
* the "Government Purpose Rights" restriction in the Master Rights File.
*
* U.S. EXPORT CONTROLLED TECHNICAL DATA
* Use or disclosure of data contained in this source code file is subject to
* the export restrictions set forth in the Master Rights File.
******************************************************************************************/
/*
* Extended thrift protocol to handle messages from edex.
*
* <pre>
*
* SOFTWARE HISTORY
*
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* 07/29/13 2215 bkowal Regenerated for thrift 0.9.0
*
* </pre>
*
* @author bkowal
* @version 1
*/
#ifndef GribThriftRecord_CONSTANTS_H
#define GribThriftRecord_CONSTANTS_H

View file

@ -1,13 +1,53 @@
/**
* Autogenerated by Thrift
* Autogenerated by Thrift Compiler (0.9.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
/*****************************************************************************************
* COPYRIGHT (c), 2009, RAYTHEON COMPANY
* ALL RIGHTS RESERVED, An Unpublished Work
*
* RAYTHEON PROPRIETARY
* If the end user is not the U.S. Government or any agency thereof, use
* or disclosure of data contained in this source code file is subject to
* the proprietary restrictions set forth in the Master Rights File.
*
* U.S. GOVERNMENT PURPOSE RIGHTS NOTICE
* If the end user is the U.S. Government or any agency thereof, this source
* code is provided to the U.S. Government with Government Purpose Rights.
* Use or disclosure of data contained in this source code file is subject to
* the "Government Purpose Rights" restriction in the Master Rights File.
*
* U.S. EXPORT CONTROLLED TECHNICAL DATA
* Use or disclosure of data contained in this source code file is subject to
* the export restrictions set forth in the Master Rights File.
******************************************************************************************/
/*
* Extended thrift protocol to handle messages from edex.
*
* <pre>
*
* SOFTWARE HISTORY
*
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* 07/29/13 2215 bkowal Regenerated for thrift 0.9.0
*
* </pre>
*
* @author bkowal
* @version 1
*/
#include "GribThriftRecord_types.h"
#include <iostream>
const char* com_raytheon_uf_common_dataplugin_grib_GribThriftRecord::ascii_fingerprint = "167D3BB12473F31F7D18D4C88DB977D7";
const uint8_t com_raytheon_uf_common_dataplugin_grib_GribThriftRecord::binary_fingerprint[16] = {0x16,0x7D,0x3B,0xB1,0x24,0x73,0xF3,0x1F,0x7D,0x18,0xD4,0xC8,0x8D,0xB9,0x77,0xD7};
#include <algorithm>
const char* com_raytheon_uf_common_dataplugin_grib_GribThriftRecord::ascii_fingerprint = "5690BC677047F418DC04C0DF9712EC9C";
const uint8_t com_raytheon_uf_common_dataplugin_grib_GribThriftRecord::binary_fingerprint[16] = {0x56,0x90,0xBC,0x67,0x70,0x47,0xF4,0x18,0xDC,0x04,0xC0,0xDF,0x97,0x12,0xEC,0x9C};
uint32_t com_raytheon_uf_common_dataplugin_grib_GribThriftRecord::read(::apache::thrift::protocol::TProtocol* iprot) {
@ -35,14 +75,14 @@ uint32_t com_raytheon_uf_common_dataplugin_grib_GribThriftRecord::read(::apache:
this->data.clear();
uint32_t _size0;
::apache::thrift::protocol::TType _etype3;
iprot->readListBegin(_etype3, _size0);
xfer += iprot->readListBegin(_etype3, _size0);
this->data.resize(_size0);
uint32_t _i4;
for (_i4 = 0; _i4 < _size0; ++_i4)
{
xfer += iprot->readI32(this->data[_i4]);
}
iprot->readListEnd();
xfer += iprot->readListEnd();
}
this->__isset.data = true;
} else {
@ -50,6 +90,26 @@ uint32_t com_raytheon_uf_common_dataplugin_grib_GribThriftRecord::read(::apache:
}
break;
case 2:
if (ftype == ::apache::thrift::protocol::T_LIST) {
{
this->trueData.clear();
uint32_t _size5;
::apache::thrift::protocol::TType _etype8;
xfer += iprot->readListBegin(_etype8, _size5);
this->trueData.resize(_size5);
uint32_t _i9;
for (_i9 = 0; _i9 < _size5; ++_i9)
{
xfer += iprot->readDouble(this->trueData[_i9]);
}
xfer += iprot->readListEnd();
}
this->__isset.trueData = true;
} else {
xfer += iprot->skip(ftype);
}
break;
case 3:
if (ftype == ::apache::thrift::protocol::T_BOOL) {
xfer += iprot->readBool(this->hybridGrid);
this->__isset.hybridGrid = true;
@ -57,55 +117,75 @@ uint32_t com_raytheon_uf_common_dataplugin_grib_GribThriftRecord::read(::apache:
xfer += iprot->skip(ftype);
}
break;
case 3:
case 4:
if (ftype == ::apache::thrift::protocol::T_LIST) {
{
this->hybridGridData.clear();
uint32_t _size5;
::apache::thrift::protocol::TType _etype8;
iprot->readListBegin(_etype8, _size5);
this->hybridGridData.resize(_size5);
uint32_t _i9;
for (_i9 = 0; _i9 < _size5; ++_i9)
uint32_t _size10;
::apache::thrift::protocol::TType _etype13;
xfer += iprot->readListBegin(_etype13, _size10);
this->hybridGridData.resize(_size10);
uint32_t _i14;
for (_i14 = 0; _i14 < _size10; ++_i14)
{
xfer += iprot->readI32(this->hybridGridData[_i9]);
xfer += iprot->readI32(this->hybridGridData[_i14]);
}
iprot->readListEnd();
xfer += iprot->readListEnd();
}
this->__isset.hybridGridData = true;
} else {
xfer += iprot->skip(ftype);
}
break;
case 4:
if (ftype == ::apache::thrift::protocol::T_BOOL) {
xfer += iprot->readBool(this->localSection);
this->__isset.localSection = true;
} else {
xfer += iprot->skip(ftype);
}
break;
case 5:
if (ftype == ::apache::thrift::protocol::T_LIST) {
{
this->localSectionData.clear();
uint32_t _size10;
::apache::thrift::protocol::TType _etype13;
iprot->readListBegin(_etype13, _size10);
this->localSectionData.resize(_size10);
uint32_t _i14;
for (_i14 = 0; _i14 < _size10; ++_i14)
this->trueHybridGridData.clear();
uint32_t _size15;
::apache::thrift::protocol::TType _etype18;
xfer += iprot->readListBegin(_etype18, _size15);
this->trueHybridGridData.resize(_size15);
uint32_t _i19;
for (_i19 = 0; _i19 < _size15; ++_i19)
{
xfer += iprot->readI32(this->localSectionData[_i14]);
xfer += iprot->readDouble(this->trueHybridGridData[_i19]);
}
iprot->readListEnd();
xfer += iprot->readListEnd();
}
this->__isset.trueHybridGridData = true;
} else {
xfer += iprot->skip(ftype);
}
break;
case 6:
if (ftype == ::apache::thrift::protocol::T_BOOL) {
xfer += iprot->readBool(this->localSection);
this->__isset.localSection = true;
} else {
xfer += iprot->skip(ftype);
}
break;
case 7:
if (ftype == ::apache::thrift::protocol::T_LIST) {
{
this->localSectionData.clear();
uint32_t _size20;
::apache::thrift::protocol::TType _etype23;
xfer += iprot->readListBegin(_etype23, _size20);
this->localSectionData.resize(_size20);
uint32_t _i24;
for (_i24 = 0; _i24 < _size20; ++_i24)
{
xfer += iprot->readI32(this->localSectionData[_i24]);
}
xfer += iprot->readListEnd();
}
this->__isset.localSectionData = true;
} else {
xfer += iprot->skip(ftype);
}
break;
case 6:
case 8:
if (ftype == ::apache::thrift::protocol::T_STRUCT) {
xfer += this->message.read(iprot);
this->__isset.message = true;
@ -113,7 +193,7 @@ uint32_t com_raytheon_uf_common_dataplugin_grib_GribThriftRecord::read(::apache:
xfer += iprot->skip(ftype);
}
break;
case 7:
case 9:
if (ftype == ::apache::thrift::protocol::T_BOOL) {
xfer += iprot->readBool(this->thinnedGrid);
this->__isset.thinnedGrid = true;
@ -121,20 +201,20 @@ uint32_t com_raytheon_uf_common_dataplugin_grib_GribThriftRecord::read(::apache:
xfer += iprot->skip(ftype);
}
break;
case 8:
case 10:
if (ftype == ::apache::thrift::protocol::T_LIST) {
{
this->thinnedGridData.clear();
uint32_t _size15;
::apache::thrift::protocol::TType _etype18;
iprot->readListBegin(_etype18, _size15);
this->thinnedGridData.resize(_size15);
uint32_t _i19;
for (_i19 = 0; _i19 < _size15; ++_i19)
uint32_t _size25;
::apache::thrift::protocol::TType _etype28;
xfer += iprot->readListBegin(_etype28, _size25);
this->thinnedGridData.resize(_size25);
uint32_t _i29;
for (_i29 = 0; _i29 < _size25; ++_i29)
{
xfer += iprot->readI32(this->thinnedGridData[_i19]);
xfer += iprot->readI32(this->thinnedGridData[_i29]);
}
iprot->readListEnd();
xfer += iprot->readListEnd();
}
this->__isset.thinnedGridData = true;
} else {
@ -147,22 +227,6 @@ uint32_t com_raytheon_uf_common_dataplugin_grib_GribThriftRecord::read(::apache:
}
xfer += iprot->readFieldEnd();
}
union {
int32_t i;
float f;
} u;
int intCounter = 0;
for (intCounter = 0; intCounter < (int)this->hybridGridData.size(); intCounter++) {
u.i = this->hybridGridData.at(intCounter);
float holder = (float)u.f;
this->trueHybridGridData.push_back(holder);
}
for (intCounter = 0; intCounter < (int)this->data.size(); intCounter++) {
u.i = this->data.at(intCounter);
float holder = (float)u.f;
this->trueData.push_back(holder);
}
xfer += iprot->readStructEnd();
@ -172,65 +236,113 @@ uint32_t com_raytheon_uf_common_dataplugin_grib_GribThriftRecord::read(::apache:
uint32_t com_raytheon_uf_common_dataplugin_grib_GribThriftRecord::write(::apache::thrift::protocol::TProtocol* oprot) const {
uint32_t xfer = 0;
xfer += oprot->writeStructBegin("com_raytheon_uf_common_dataplugin_grib_GribThriftRecord");
xfer += oprot->writeFieldBegin("data", ::apache::thrift::protocol::T_LIST, 1);
{
xfer += oprot->writeListBegin(::apache::thrift::protocol::T_I32, this->data.size());
std::vector<int32_t> ::const_iterator _iter20;
for (_iter20 = this->data.begin(); _iter20 != this->data.end(); ++_iter20)
xfer += oprot->writeListBegin(::apache::thrift::protocol::T_I32, static_cast<uint32_t>(this->data.size()));
std::vector<int32_t> ::const_iterator _iter30;
for (_iter30 = this->data.begin(); _iter30 != this->data.end(); ++_iter30)
{
xfer += oprot->writeI32((*_iter20));
xfer += oprot->writeI32((*_iter30));
}
xfer += oprot->writeListEnd();
}
xfer += oprot->writeFieldEnd();
xfer += oprot->writeFieldBegin("hybridGrid", ::apache::thrift::protocol::T_BOOL, 2);
xfer += oprot->writeFieldBegin("trueData", ::apache::thrift::protocol::T_LIST, 2);
{
xfer += oprot->writeListBegin(::apache::thrift::protocol::T_DOUBLE, static_cast<uint32_t>(this->trueData.size()));
std::vector<double> ::const_iterator _iter31;
for (_iter31 = this->trueData.begin(); _iter31 != this->trueData.end(); ++_iter31)
{
xfer += oprot->writeDouble((*_iter31));
}
xfer += oprot->writeListEnd();
}
xfer += oprot->writeFieldEnd();
xfer += oprot->writeFieldBegin("hybridGrid", ::apache::thrift::protocol::T_BOOL, 3);
xfer += oprot->writeBool(this->hybridGrid);
xfer += oprot->writeFieldEnd();
xfer += oprot->writeFieldBegin("hybridGridData", ::apache::thrift::protocol::T_LIST, 3);
xfer += oprot->writeFieldBegin("hybridGridData", ::apache::thrift::protocol::T_LIST, 4);
{
xfer += oprot->writeListBegin(::apache::thrift::protocol::T_I32, this->hybridGridData.size());
std::vector<int32_t> ::const_iterator _iter21;
for (_iter21 = this->hybridGridData.begin(); _iter21 != this->hybridGridData.end(); ++_iter21)
xfer += oprot->writeListBegin(::apache::thrift::protocol::T_I32, static_cast<uint32_t>(this->hybridGridData.size()));
std::vector<int32_t> ::const_iterator _iter32;
for (_iter32 = this->hybridGridData.begin(); _iter32 != this->hybridGridData.end(); ++_iter32)
{
xfer += oprot->writeI32((*_iter21));
xfer += oprot->writeI32((*_iter32));
}
xfer += oprot->writeListEnd();
}
xfer += oprot->writeFieldEnd();
xfer += oprot->writeFieldBegin("localSection", ::apache::thrift::protocol::T_BOOL, 4);
xfer += oprot->writeFieldBegin("trueHybridGridData", ::apache::thrift::protocol::T_LIST, 5);
{
xfer += oprot->writeListBegin(::apache::thrift::protocol::T_DOUBLE, static_cast<uint32_t>(this->trueHybridGridData.size()));
std::vector<double> ::const_iterator _iter33;
for (_iter33 = this->trueHybridGridData.begin(); _iter33 != this->trueHybridGridData.end(); ++_iter33)
{
xfer += oprot->writeDouble((*_iter33));
}
xfer += oprot->writeListEnd();
}
xfer += oprot->writeFieldEnd();
xfer += oprot->writeFieldBegin("localSection", ::apache::thrift::protocol::T_BOOL, 6);
xfer += oprot->writeBool(this->localSection);
xfer += oprot->writeFieldEnd();
xfer += oprot->writeFieldBegin("localSectionData", ::apache::thrift::protocol::T_LIST, 5);
xfer += oprot->writeFieldBegin("localSectionData", ::apache::thrift::protocol::T_LIST, 7);
{
xfer += oprot->writeListBegin(::apache::thrift::protocol::T_I32, this->localSectionData.size());
std::vector<int32_t> ::const_iterator _iter22;
for (_iter22 = this->localSectionData.begin(); _iter22 != this->localSectionData.end(); ++_iter22)
xfer += oprot->writeListBegin(::apache::thrift::protocol::T_I32, static_cast<uint32_t>(this->localSectionData.size()));
std::vector<int32_t> ::const_iterator _iter34;
for (_iter34 = this->localSectionData.begin(); _iter34 != this->localSectionData.end(); ++_iter34)
{
xfer += oprot->writeI32((*_iter22));
xfer += oprot->writeI32((*_iter34));
}
xfer += oprot->writeListEnd();
}
xfer += oprot->writeFieldEnd();
xfer += oprot->writeFieldBegin("message", ::apache::thrift::protocol::T_STRUCT, 6);
xfer += oprot->writeFieldBegin("message", ::apache::thrift::protocol::T_STRUCT, 8);
xfer += this->message.write(oprot);
xfer += oprot->writeFieldEnd();
xfer += oprot->writeFieldBegin("thinnedGrid", ::apache::thrift::protocol::T_BOOL, 7);
xfer += oprot->writeFieldBegin("thinnedGrid", ::apache::thrift::protocol::T_BOOL, 9);
xfer += oprot->writeBool(this->thinnedGrid);
xfer += oprot->writeFieldEnd();
xfer += oprot->writeFieldBegin("thinnedGridData", ::apache::thrift::protocol::T_LIST, 8);
xfer += oprot->writeFieldBegin("thinnedGridData", ::apache::thrift::protocol::T_LIST, 10);
{
xfer += oprot->writeListBegin(::apache::thrift::protocol::T_I32, this->thinnedGridData.size());
std::vector<int32_t> ::const_iterator _iter23;
for (_iter23 = this->thinnedGridData.begin(); _iter23 != this->thinnedGridData.end(); ++_iter23)
xfer += oprot->writeListBegin(::apache::thrift::protocol::T_I32, static_cast<uint32_t>(this->thinnedGridData.size()));
std::vector<int32_t> ::const_iterator _iter35;
for (_iter35 = this->thinnedGridData.begin(); _iter35 != this->thinnedGridData.end(); ++_iter35)
{
xfer += oprot->writeI32((*_iter23));
xfer += oprot->writeI32((*_iter35));
}
xfer += oprot->writeListEnd();
}
xfer += oprot->writeFieldEnd();
xfer += oprot->writeFieldStop();
xfer += oprot->writeStructEnd();
return xfer;
}
void swap(com_raytheon_uf_common_dataplugin_grib_GribThriftRecord &a, com_raytheon_uf_common_dataplugin_grib_GribThriftRecord &b) {
using ::std::swap;
swap(a.data, b.data);
swap(a.trueData, b.trueData);
swap(a.hybridGrid, b.hybridGrid);
swap(a.hybridGridData, b.hybridGridData);
swap(a.trueHybridGridData, b.trueHybridGridData);
swap(a.localSection, b.localSection);
swap(a.localSectionData, b.localSectionData);
swap(a.message, b.message);
swap(a.thinnedGrid, b.thinnedGrid);
swap(a.thinnedGridData, b.thinnedGridData);
swap(a.__isset, b.__isset);
}

View file

@ -1,23 +1,65 @@
/**
* Autogenerated by Thrift
* Autogenerated by Thrift Compiler (0.9.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
/*****************************************************************************************
* COPYRIGHT (c), 2009, RAYTHEON COMPANY
* ALL RIGHTS RESERVED, An Unpublished Work
*
* RAYTHEON PROPRIETARY
* If the end user is not the U.S. Government or any agency thereof, use
* or disclosure of data contained in this source code file is subject to
* the proprietary restrictions set forth in the Master Rights File.
*
* U.S. GOVERNMENT PURPOSE RIGHTS NOTICE
* If the end user is the U.S. Government or any agency thereof, this source
* code is provided to the U.S. Government with Government Purpose Rights.
* Use or disclosure of data contained in this source code file is subject to
* the "Government Purpose Rights" restriction in the Master Rights File.
*
* U.S. EXPORT CONTROLLED TECHNICAL DATA
* Use or disclosure of data contained in this source code file is subject to
* the export restrictions set forth in the Master Rights File.
******************************************************************************************/
/*
* Extended thrift protocol to handle messages from edex.
*
* <pre>
*
* SOFTWARE HISTORY
*
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* 07/29/13 2215 bkowal Regenerated for thrift 0.9.0
*
* </pre>
*
* @author bkowal
* @version 1
*/
#ifndef GribThriftRecord_TYPES_H
#define GribThriftRecord_TYPES_H
#include <Thrift.h>
#include <TApplicationException.h>
#include <protocol/TProtocol.h>
#include <transport/TTransport.h>
#include <thrift/Thrift.h>
#include <thrift/TApplicationException.h>
#include <thrift/protocol/TProtocol.h>
#include <thrift/transport/TTransport.h>
#include "GridDataRequestMessage_types.h"
typedef struct _com_raytheon_uf_common_dataplugin_grib_GribThriftRecord__isset {
_com_raytheon_uf_common_dataplugin_grib_GribThriftRecord__isset() : data(false), hybridGrid(false), hybridGridData(false), localSection(false), localSectionData(false), message(false), thinnedGrid(false), thinnedGridData(false) {}
_com_raytheon_uf_common_dataplugin_grib_GribThriftRecord__isset() : data(false), trueData(false), hybridGrid(false), hybridGridData(false), trueHybridGridData(false), localSection(false), localSectionData(false), message(false), thinnedGrid(false), thinnedGridData(false) {}
bool data;
bool trueData;
bool hybridGrid;
bool hybridGridData;
bool trueHybridGridData;
bool localSection;
bool localSectionData;
bool message;
@ -28,8 +70,8 @@ typedef struct _com_raytheon_uf_common_dataplugin_grib_GribThriftRecord__isset {
class com_raytheon_uf_common_dataplugin_grib_GribThriftRecord {
public:
static const char* ascii_fingerprint; // = "167D3BB12473F31F7D18D4C88DB977D7";
static const uint8_t binary_fingerprint[16]; // = {0x16,0x7D,0x3B,0xB1,0x24,0x73,0xF3,0x1F,0x7D,0x18,0xD4,0xC8,0x8D,0xB9,0x77,0xD7};
static const char* ascii_fingerprint; // = "5690BC677047F418DC04C0DF9712EC9C";
static const uint8_t binary_fingerprint[16]; // = {0x56,0x90,0xBC,0x67,0x70,0x47,0xF4,0x18,0xDC,0x04,0xC0,0xDF,0x97,0x12,0xEC,0x9C};
com_raytheon_uf_common_dataplugin_grib_GribThriftRecord() : hybridGrid(0), localSection(0), thinnedGrid(0) {
}
@ -37,10 +79,10 @@ class com_raytheon_uf_common_dataplugin_grib_GribThriftRecord {
virtual ~com_raytheon_uf_common_dataplugin_grib_GribThriftRecord() throw() {}
std::vector<int32_t> data;
std::vector<float> trueData;
std::vector<double> trueData;
bool hybridGrid;
std::vector<int32_t> hybridGridData;
std::vector<float> trueHybridGridData;
std::vector<double> trueHybridGridData;
bool localSection;
std::vector<int32_t> localSectionData;
com_raytheon_uf_common_dataplugin_grib_request_GridDataRequestMessage message;
@ -49,14 +91,58 @@ class com_raytheon_uf_common_dataplugin_grib_GribThriftRecord {
_com_raytheon_uf_common_dataplugin_grib_GribThriftRecord__isset __isset;
void __set_data(const std::vector<int32_t> & val) {
data = val;
}
void __set_trueData(const std::vector<double> & val) {
trueData = val;
}
void __set_hybridGrid(const bool val) {
hybridGrid = val;
}
void __set_hybridGridData(const std::vector<int32_t> & val) {
hybridGridData = val;
}
void __set_trueHybridGridData(const std::vector<double> & val) {
trueHybridGridData = val;
}
void __set_localSection(const bool val) {
localSection = val;
}
void __set_localSectionData(const std::vector<int32_t> & val) {
localSectionData = val;
}
void __set_message(const com_raytheon_uf_common_dataplugin_grib_request_GridDataRequestMessage& val) {
message = val;
}
void __set_thinnedGrid(const bool val) {
thinnedGrid = val;
}
void __set_thinnedGridData(const std::vector<int32_t> & val) {
thinnedGridData = val;
}
bool operator == (const com_raytheon_uf_common_dataplugin_grib_GribThriftRecord & rhs) const
{
if (!(data == rhs.data))
return false;
if (!(trueData == rhs.trueData))
return false;
if (!(hybridGrid == rhs.hybridGrid))
return false;
if (!(hybridGridData == rhs.hybridGridData))
return false;
if (!(trueHybridGridData == rhs.trueHybridGridData))
return false;
if (!(localSection == rhs.localSection))
return false;
if (!(localSectionData == rhs.localSectionData))
@ -80,6 +166,8 @@ class com_raytheon_uf_common_dataplugin_grib_GribThriftRecord {
};
void swap(com_raytheon_uf_common_dataplugin_grib_GribThriftRecord &a, com_raytheon_uf_common_dataplugin_grib_GribThriftRecord &b);
#endif

View file

@ -1,7 +1,45 @@
/**
* Autogenerated by Thrift
* Autogenerated by Thrift Compiler (0.9.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
/*****************************************************************************************
* COPYRIGHT (c), 2009, RAYTHEON COMPANY
* ALL RIGHTS RESERVED, An Unpublished Work
*
* RAYTHEON PROPRIETARY
* If the end user is not the U.S. Government or any agency thereof, use
* or disclosure of data contained in this source code file is subject to
* the proprietary restrictions set forth in the Master Rights File.
*
* U.S. GOVERNMENT PURPOSE RIGHTS NOTICE
* If the end user is the U.S. Government or any agency thereof, this source
* code is provided to the U.S. Government with Government Purpose Rights.
* Use or disclosure of data contained in this source code file is subject to
* the "Government Purpose Rights" restriction in the Master Rights File.
*
* U.S. EXPORT CONTROLLED TECHNICAL DATA
* Use or disclosure of data contained in this source code file is subject to
* the export restrictions set forth in the Master Rights File.
******************************************************************************************/
/*
* Extended thrift protocol to handle messages from edex.
*
* <pre>
*
* SOFTWARE HISTORY
*
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* 07/29/13 2215 bkowal Regenerated for thrift 0.9.0
*
* </pre>
*
* @author bkowal
* @version 1
*/
#include "GridDataRequestMessage_constants.h"

View file

@ -1,7 +1,45 @@
/**
* Autogenerated by Thrift
* Autogenerated by Thrift Compiler (0.9.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
/*****************************************************************************************
* COPYRIGHT (c), 2009, RAYTHEON COMPANY
* ALL RIGHTS RESERVED, An Unpublished Work
*
* RAYTHEON PROPRIETARY
* If the end user is not the U.S. Government or any agency thereof, use
* or disclosure of data contained in this source code file is subject to
* the proprietary restrictions set forth in the Master Rights File.
*
* U.S. GOVERNMENT PURPOSE RIGHTS NOTICE
* If the end user is the U.S. Government or any agency thereof, this source
* code is provided to the U.S. Government with Government Purpose Rights.
* Use or disclosure of data contained in this source code file is subject to
* the "Government Purpose Rights" restriction in the Master Rights File.
*
* U.S. EXPORT CONTROLLED TECHNICAL DATA
* Use or disclosure of data contained in this source code file is subject to
* the export restrictions set forth in the Master Rights File.
******************************************************************************************/
/*
* Extended thrift protocol to handle messages from edex.
*
* <pre>
*
* SOFTWARE HISTORY
*
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* 07/29/13 2215 bkowal Regenerated for thrift 0.9.0
*
* </pre>
*
* @author bkowal
* @version 1
*/
#ifndef GridDataRequestMessage_CONSTANTS_H
#define GridDataRequestMessage_CONSTANTS_H

View file

@ -1,10 +1,50 @@
/**
* Autogenerated by Thrift
* Autogenerated by Thrift Compiler (0.9.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
/*****************************************************************************************
* COPYRIGHT (c), 2009, RAYTHEON COMPANY
* ALL RIGHTS RESERVED, An Unpublished Work
*
* RAYTHEON PROPRIETARY
* If the end user is not the U.S. Government or any agency thereof, use
* or disclosure of data contained in this source code file is subject to
* the proprietary restrictions set forth in the Master Rights File.
*
* U.S. GOVERNMENT PURPOSE RIGHTS NOTICE
* If the end user is the U.S. Government or any agency thereof, this source
* code is provided to the U.S. Government with Government Purpose Rights.
* Use or disclosure of data contained in this source code file is subject to
* the "Government Purpose Rights" restriction in the Master Rights File.
*
* U.S. EXPORT CONTROLLED TECHNICAL DATA
* Use or disclosure of data contained in this source code file is subject to
* the export restrictions set forth in the Master Rights File.
******************************************************************************************/
/*
* Extended thrift protocol to handle messages from edex.
*
* <pre>
*
* SOFTWARE HISTORY
*
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* 07/29/13 2215 bkowal Regenerated for thrift 0.9.0
*
* </pre>
*
* @author bkowal
* @version 1
*/
#include "GridDataRequestMessage_types.h"
#include <algorithm>
const char* com_raytheon_uf_common_dataplugin_grib_request_GridDataRequestMessage::ascii_fingerprint = "9929A2BAB7C3E6060F44C2DCEAE9AAB2";
@ -117,36 +157,60 @@ uint32_t com_raytheon_uf_common_dataplugin_grib_request_GridDataRequestMessage::
uint32_t com_raytheon_uf_common_dataplugin_grib_request_GridDataRequestMessage::write(::apache::thrift::protocol::TProtocol* oprot) const {
uint32_t xfer = 0;
xfer += oprot->writeStructBegin("com_raytheon_uf_common_dataplugin_grib_request_GridDataRequestMessage");
xfer += oprot->writeFieldBegin("forecastTime", ::apache::thrift::protocol::T_I32, 1);
xfer += oprot->writeI32(this->forecastTime);
xfer += oprot->writeFieldEnd();
xfer += oprot->writeFieldBegin("levelOne", ::apache::thrift::protocol::T_DOUBLE, 2);
xfer += oprot->writeDouble(this->levelOne);
xfer += oprot->writeFieldEnd();
xfer += oprot->writeFieldBegin("levelTwo", ::apache::thrift::protocol::T_DOUBLE, 3);
xfer += oprot->writeDouble(this->levelTwo);
xfer += oprot->writeFieldEnd();
xfer += oprot->writeFieldBegin("levelType", ::apache::thrift::protocol::T_STRING, 4);
xfer += oprot->writeString(this->levelType);
xfer += oprot->writeFieldEnd();
xfer += oprot->writeFieldBegin("modelName", ::apache::thrift::protocol::T_STRING, 5);
xfer += oprot->writeString(this->modelName);
xfer += oprot->writeFieldEnd();
xfer += oprot->writeFieldBegin("parameterAbbreviation", ::apache::thrift::protocol::T_STRING, 6);
xfer += oprot->writeString(this->parameterAbbreviation);
xfer += oprot->writeFieldEnd();
xfer += oprot->writeFieldBegin("pert", ::apache::thrift::protocol::T_I32, 7);
xfer += oprot->writeI32(this->pert);
xfer += oprot->writeFieldEnd();
xfer += oprot->writeFieldBegin("startTime", ::apache::thrift::protocol::T_I64, 8);
xfer += oprot->writeI64(this->startTime);
xfer += oprot->writeFieldEnd();
xfer += oprot->writeFieldBegin("version", ::apache::thrift::protocol::T_I32, 9);
xfer += oprot->writeI32(this->version);
xfer += oprot->writeFieldEnd();
xfer += oprot->writeFieldStop();
xfer += oprot->writeStructEnd();
return xfer;
}
void swap(com_raytheon_uf_common_dataplugin_grib_request_GridDataRequestMessage &a, com_raytheon_uf_common_dataplugin_grib_request_GridDataRequestMessage &b) {
using ::std::swap;
swap(a.forecastTime, b.forecastTime);
swap(a.levelOne, b.levelOne);
swap(a.levelTwo, b.levelTwo);
swap(a.levelType, b.levelType);
swap(a.modelName, b.modelName);
swap(a.parameterAbbreviation, b.parameterAbbreviation);
swap(a.pert, b.pert);
swap(a.startTime, b.startTime);
swap(a.version, b.version);
swap(a.__isset, b.__isset);
}

View file

@ -1,15 +1,53 @@
/**
* Autogenerated by Thrift
* Autogenerated by Thrift Compiler (0.9.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
/*****************************************************************************************
* COPYRIGHT (c), 2009, RAYTHEON COMPANY
* ALL RIGHTS RESERVED, An Unpublished Work
*
* RAYTHEON PROPRIETARY
* If the end user is not the U.S. Government or any agency thereof, use
* or disclosure of data contained in this source code file is subject to
* the proprietary restrictions set forth in the Master Rights File.
*
* U.S. GOVERNMENT PURPOSE RIGHTS NOTICE
* If the end user is the U.S. Government or any agency thereof, this source
* code is provided to the U.S. Government with Government Purpose Rights.
* Use or disclosure of data contained in this source code file is subject to
* the "Government Purpose Rights" restriction in the Master Rights File.
*
* U.S. EXPORT CONTROLLED TECHNICAL DATA
* Use or disclosure of data contained in this source code file is subject to
* the export restrictions set forth in the Master Rights File.
******************************************************************************************/
/*
* Extended thrift protocol to handle messages from edex.
*
* <pre>
*
* SOFTWARE HISTORY
*
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* 07/29/13 2215 bkowal Regenerated for thrift 0.9.0
*
* </pre>
*
* @author bkowal
* @version 1
*/
#ifndef GridDataRequestMessage_TYPES_H
#define GridDataRequestMessage_TYPES_H
#include <Thrift.h>
#include <TApplicationException.h>
#include <protocol/TProtocol.h>
#include <transport/TTransport.h>
#include <thrift/Thrift.h>
#include <thrift/TApplicationException.h>
#include <thrift/protocol/TProtocol.h>
#include <thrift/transport/TTransport.h>
@ -34,7 +72,7 @@ class com_raytheon_uf_common_dataplugin_grib_request_GridDataRequestMessage {
static const char* ascii_fingerprint; // = "9929A2BAB7C3E6060F44C2DCEAE9AAB2";
static const uint8_t binary_fingerprint[16]; // = {0x99,0x29,0xA2,0xBA,0xB7,0xC3,0xE6,0x06,0x0F,0x44,0xC2,0xDC,0xEA,0xE9,0xAA,0xB2};
com_raytheon_uf_common_dataplugin_grib_request_GridDataRequestMessage() : forecastTime(0), levelOne(0), levelTwo(0), levelType(""), modelName(""), parameterAbbreviation(""), pert(0), startTime(0), version(0) {
com_raytheon_uf_common_dataplugin_grib_request_GridDataRequestMessage() : forecastTime(0), levelOne(0), levelTwo(0), levelType(), modelName(), parameterAbbreviation(), pert(0), startTime(0), version(0) {
}
virtual ~com_raytheon_uf_common_dataplugin_grib_request_GridDataRequestMessage() throw() {}
@ -51,6 +89,42 @@ class com_raytheon_uf_common_dataplugin_grib_request_GridDataRequestMessage {
_com_raytheon_uf_common_dataplugin_grib_request_GridDataRequestMessage__isset __isset;
void __set_forecastTime(const int32_t val) {
forecastTime = val;
}
void __set_levelOne(const double val) {
levelOne = val;
}
void __set_levelTwo(const double val) {
levelTwo = val;
}
void __set_levelType(const std::string& val) {
levelType = val;
}
void __set_modelName(const std::string& val) {
modelName = val;
}
void __set_parameterAbbreviation(const std::string& val) {
parameterAbbreviation = val;
}
void __set_pert(const int32_t val) {
pert = val;
}
void __set_startTime(const int64_t val) {
startTime = val;
}
void __set_version(const int32_t val) {
version = val;
}
bool operator == (const com_raytheon_uf_common_dataplugin_grib_request_GridDataRequestMessage & rhs) const
{
if (!(forecastTime == rhs.forecastTime))
@ -84,6 +158,8 @@ class com_raytheon_uf_common_dataplugin_grib_request_GridDataRequestMessage {
};
void swap(com_raytheon_uf_common_dataplugin_grib_request_GridDataRequestMessage &a, com_raytheon_uf_common_dataplugin_grib_request_GridDataRequestMessage &b);
#endif

View file

@ -49,7 +49,7 @@ typedef void CEdexNotification;
#include <qpid/client/MessageListener.h>
#include <qpid/client/SubscriptionManager.h>
#include <qpid/sys/Time.h>
#include <transport/TBufferTransports.h>
#include <thrift/transport/TBufferTransports.h>
#include <sys/timeb.h>
#include "Notification_types.h"
#include "NotificationProtocol.h"

View file

@ -41,6 +41,7 @@ uint32_t NotificationProtocol::readFieldBegin(std::string& name,
TType& fieldType, int16_t& fieldId) {
uint32_t result = 0;
int8_t type;
result += readByte(type);
fieldType = (TType) type;
if (fieldType == apache::thrift::protocol::T_STOP) {
@ -63,13 +64,13 @@ uint32_t NotificationProtocol::writeFieldBegin(const char* name,
const TType fieldType, const int16_t fieldId) {
uint32_t result = 0;
result += writeByte(fieldType);
result += writeString(name);
result += writeString(std::string(name));
result += writeI16(fieldId);
return result;
}
uint32_t NotificationProtocol::writeStructBegin(const char* name) {
uint32_t result = 0;
result += writeString(name);
result += writeString(std::string(name));
return 0;
}

View file

@ -28,6 +28,7 @@
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* 11/9/09 3375 brockwoo Initial Creation
* 07/29/13 2215 bkowal Update for thrift 0.9.0
*
* </pre>
*
@ -38,19 +39,21 @@
#ifndef NOTIFICATIONPROTOCOL_H_
#define NOTIFICATIONPROTOCOL_H_
#include "TReflectionLocal.h"
#include "protocol/TProtocol.h"
#include "protocol/TBinaryProtocol.h"
#include "thrift/TReflectionLocal.h"
#include "thrift/protocol/TProtocol.h"
#include "thrift/protocol/TBinaryProtocol.h"
#include "thrift/protocol/TVirtualProtocol.h"
#include "NotificationProtocol.h"
using apache::thrift::protocol::TType;
using apache::thrift::protocol::TMessageType;
using apache::thrift::protocol::TVirtualProtocol;
using apache::thrift::protocol::TBinaryProtocol;
using apache::thrift::transport::TTransport;
class NotificationProtocol : public TBinaryProtocol {
class NotificationProtocol : public TVirtualProtocol<NotificationProtocol, TBinaryProtocol> {
public:
NotificationProtocol(boost::shared_ptr<TTransport> trans) : TBinaryProtocol(trans) {}
NotificationProtocol(boost::shared_ptr<TTransport> trans) : TVirtualProtocol<NotificationProtocol, TBinaryProtocol>(trans) {}
uint32_t readFieldBegin(std::string& name, TType& fieldType,
int16_t& fieldId);

View file

@ -1,9 +1,46 @@
/**
* Autogenerated by Thrift Compiler (0.8.0)
* Autogenerated by Thrift Compiler (0.9.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
/*****************************************************************************************
* COPYRIGHT (c), 2009, RAYTHEON COMPANY
* ALL RIGHTS RESERVED, An Unpublished Work
*
* RAYTHEON PROPRIETARY
* If the end user is not the U.S. Government or any agency thereof, use
* or disclosure of data contained in this source code file is subject to
* the proprietary restrictions set forth in the Master Rights File.
*
* U.S. GOVERNMENT PURPOSE RIGHTS NOTICE
* If the end user is the U.S. Government or any agency thereof, this source
* code is provided to the U.S. Government with Government Purpose Rights.
* Use or disclosure of data contained in this source code file is subject to
* the "Government Purpose Rights" restriction in the Master Rights File.
*
* U.S. EXPORT CONTROLLED TECHNICAL DATA
* Use or disclosure of data contained in this source code file is subject to
* the export restrictions set forth in the Master Rights File.
******************************************************************************************/
/*
* Extended thrift protocol to handle messages from edex.
*
* <pre>
*
* SOFTWARE HISTORY
*
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* 07/29/13 2215 bkowal Regenerated for thrift 0.9.0
*
* </pre>
*
* @author bkowal
* @version 1
*/
#include "Notification_constants.h"

View file

@ -1,9 +1,46 @@
/**
* Autogenerated by Thrift Compiler (0.8.0)
* Autogenerated by Thrift Compiler (0.9.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
/*****************************************************************************************
* COPYRIGHT (c), 2009, RAYTHEON COMPANY
* ALL RIGHTS RESERVED, An Unpublished Work
*
* RAYTHEON PROPRIETARY
* If the end user is not the U.S. Government or any agency thereof, use
* or disclosure of data contained in this source code file is subject to
* the proprietary restrictions set forth in the Master Rights File.
*
* U.S. GOVERNMENT PURPOSE RIGHTS NOTICE
* If the end user is the U.S. Government or any agency thereof, this source
* code is provided to the U.S. Government with Government Purpose Rights.
* Use or disclosure of data contained in this source code file is subject to
* the "Government Purpose Rights" restriction in the Master Rights File.
*
* U.S. EXPORT CONTROLLED TECHNICAL DATA
* Use or disclosure of data contained in this source code file is subject to
* the export restrictions set forth in the Master Rights File.
******************************************************************************************/
/*
* Extended thrift protocol to handle messages from edex.
*
* <pre>
*
* SOFTWARE HISTORY
*
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* 07/29/13 2215 bkowal Regenerated for thrift 0.9.0
*
* </pre>
*
* @author bkowal
* @version 1
*/
#ifndef Notification_CONSTANTS_H
#define Notification_CONSTANTS_H

View file

@ -1,18 +1,56 @@
/**
* Autogenerated by Thrift Compiler (0.8.0)
* Autogenerated by Thrift Compiler (0.9.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
/*****************************************************************************************
* COPYRIGHT (c), 2009, RAYTHEON COMPANY
* ALL RIGHTS RESERVED, An Unpublished Work
*
* RAYTHEON PROPRIETARY
* If the end user is not the U.S. Government or any agency thereof, use
* or disclosure of data contained in this source code file is subject to
* the proprietary restrictions set forth in the Master Rights File.
*
* U.S. GOVERNMENT PURPOSE RIGHTS NOTICE
* If the end user is the U.S. Government or any agency thereof, this source
* code is provided to the U.S. Government with Government Purpose Rights.
* Use or disclosure of data contained in this source code file is subject to
* the "Government Purpose Rights" restriction in the Master Rights File.
*
* U.S. EXPORT CONTROLLED TECHNICAL DATA
* Use or disclosure of data contained in this source code file is subject to
* the export restrictions set forth in the Master Rights File.
******************************************************************************************/
/*
* Extended thrift protocol to handle messages from edex.
*
* <pre>
*
* SOFTWARE HISTORY
*
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* 07/29/13 2215 bkowal Regenerated for thrift 0.9.0
*
* </pre>
*
* @author bkowal
* @version 1
*/
#include "Notification_types.h"
#include <algorithm>
const char* com_raytheon_uf_common_dataplugin_message_DataURINotificationMessage::ascii_fingerprint = "ACE4F644F0FDD289DDC4EE5B83BC13C0";
const uint8_t com_raytheon_uf_common_dataplugin_message_DataURINotificationMessage::binary_fingerprint[16] = {0xAC,0xE4,0xF6,0x44,0xF0,0xFD,0xD2,0x89,0xDD,0xC4,0xEE,0x5B,0x83,0xBC,0x13,0xC0};
uint32_t com_raytheon_uf_common_dataplugin_message_DataURINotificationMessage::read(::apache::thrift::protocol::TProtocol* iprot) {
uint32_t xfer = 0;
std::string fname;
::apache::thrift::protocol::TType ftype;
@ -37,14 +75,14 @@ uint32_t com_raytheon_uf_common_dataplugin_message_DataURINotificationMessage::r
this->dataURIs.clear();
uint32_t _size0;
::apache::thrift::protocol::TType _etype3;
iprot->readListBegin(_etype3, _size0);
xfer += iprot->readListBegin(_etype3, _size0);
this->dataURIs.resize(_size0);
uint32_t _i4;
for (_i4 = 0; _i4 < _size0; ++_i4)
{
xfer += iprot->readString(this->dataURIs[_i4]);
}
iprot->readListEnd();
xfer += iprot->readListEnd();
}
this->__isset.dataURIs = true;
} else {
@ -66,6 +104,7 @@ uint32_t com_raytheon_uf_common_dataplugin_message_DataURINotificationMessage::r
uint32_t com_raytheon_uf_common_dataplugin_message_DataURINotificationMessage::write(::apache::thrift::protocol::TProtocol* oprot) const {
uint32_t xfer = 0;
xfer += oprot->writeStructBegin("com_raytheon_uf_common_dataplugin_message_DataURINotificationMessage");
xfer += oprot->writeFieldBegin("dataURIs", ::apache::thrift::protocol::T_LIST, 1);
{
xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast<uint32_t>(this->dataURIs.size()));
@ -77,9 +116,16 @@ uint32_t com_raytheon_uf_common_dataplugin_message_DataURINotificationMessage::w
xfer += oprot->writeListEnd();
}
xfer += oprot->writeFieldEnd();
xfer += oprot->writeFieldStop();
xfer += oprot->writeStructEnd();
return xfer;
}
void swap(com_raytheon_uf_common_dataplugin_message_DataURINotificationMessage &a, com_raytheon_uf_common_dataplugin_message_DataURINotificationMessage &b) {
using ::std::swap;
swap(a.dataURIs, b.dataURIs);
swap(a.__isset, b.__isset);
}

View file

@ -1,16 +1,53 @@
/**
* Autogenerated by Thrift Compiler (0.8.0)
* Autogenerated by Thrift Compiler (0.9.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
/*****************************************************************************************
* COPYRIGHT (c), 2009, RAYTHEON COMPANY
* ALL RIGHTS RESERVED, An Unpublished Work
*
* RAYTHEON PROPRIETARY
* If the end user is not the U.S. Government or any agency thereof, use
* or disclosure of data contained in this source code file is subject to
* the proprietary restrictions set forth in the Master Rights File.
*
* U.S. GOVERNMENT PURPOSE RIGHTS NOTICE
* If the end user is the U.S. Government or any agency thereof, this source
* code is provided to the U.S. Government with Government Purpose Rights.
* Use or disclosure of data contained in this source code file is subject to
* the "Government Purpose Rights" restriction in the Master Rights File.
*
* U.S. EXPORT CONTROLLED TECHNICAL DATA
* Use or disclosure of data contained in this source code file is subject to
* the export restrictions set forth in the Master Rights File.
******************************************************************************************/
/*
* Extended thrift protocol to handle messages from edex.
*
* <pre>
*
* SOFTWARE HISTORY
*
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* 07/29/13 2215 bkowal Regenerated for thrift 0.9.0
*
* </pre>
*
* @author bkowal
* @version 1
*/
#ifndef Notification_TYPES_H
#define Notification_TYPES_H
#include <Thrift.h>
#include <TApplicationException.h>
#include <protocol/TProtocol.h>
#include <transport/TTransport.h>
#include <thrift/Thrift.h>
#include <thrift/TApplicationException.h>
#include <thrift/protocol/TProtocol.h>
#include <thrift/transport/TTransport.h>
@ -57,6 +94,8 @@ class com_raytheon_uf_common_dataplugin_message_DataURINotificationMessage {
};
void swap(com_raytheon_uf_common_dataplugin_message_DataURINotificationMessage &a, com_raytheon_uf_common_dataplugin_message_DataURINotificationMessage &b);
#endif

View file

@ -55,7 +55,7 @@ typedef void CPointDataRequest;
#include "Notification_types.h"
#include "NotificationProtocol.h"
#include "transport/THttpClient.h"
#include "thrift/transport/THttpClient.h"
#include "PointData_types.h"
#include <iostream>
#include <stdint.h>

View file

@ -56,7 +56,8 @@ typedef void CPointDataServerRequest;
#include "Notification_types.h"
#include "NotificationProtocol.h"
#include "transport/THttpClient.h"
#include "thrift/transport/THttpClient.h"
#include "PointData_types.h"
#include "PointDataServer_types.h"
#include <iostream>
#include <stdint.h>

View file

@ -1,3 +1,10 @@
/**
* Autogenerated by Thrift Compiler (0.9.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
/*****************************************************************************************
* COPYRIGHT (c), 2009, RAYTHEON COMPANY
* ALL RIGHTS RESERVED, An Unpublished Work
@ -19,8 +26,7 @@
******************************************************************************************/
/*
* Support for point data request capability to retrieve point data and metadata
* from EDEX Thrift service.
* Extended thrift protocol to handle messages from edex.
*
* <pre>
*
@ -28,19 +34,13 @@
*
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* 08/08/11 9696 gzhou Initial Creation
* 07/29/13 2215 bkowal Regenerated for thrift 0.9.0
*
* </pre>
*
* @author gzhou
* @author bkowal
* @version 1
*/
/**
* Autogenerated by Thrift
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
*/
#include "PointDataServer_constants.h"

View file

@ -1,3 +1,10 @@
/**
* Autogenerated by Thrift Compiler (0.9.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
/*****************************************************************************************
* COPYRIGHT (c), 2009, RAYTHEON COMPANY
* ALL RIGHTS RESERVED, An Unpublished Work
@ -19,8 +26,7 @@
******************************************************************************************/
/*
* Support for point data request capability to retrieve point data and metadata
* from EDEX Thrift service.
* Extended thrift protocol to handle messages from edex.
*
* <pre>
*
@ -28,19 +34,13 @@
*
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* 08/08/11 9696 gzhou Initial Creation
* 07/29/13 2215 bkowal Regenerated for thrift 0.9.0
*
* </pre>
*
* @author gzhou
* @author bkowal
* @version 1
*/
/**
* Autogenerated by Thrift
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
*/
#ifndef PointDataServer_CONSTANTS_H
#define PointDataServer_CONSTANTS_H

View file

@ -1,3 +1,10 @@
/**
* Autogenerated by Thrift Compiler (0.9.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
/*****************************************************************************************
* COPYRIGHT (c), 2009, RAYTHEON COMPANY
* ALL RIGHTS RESERVED, An Unpublished Work
@ -19,8 +26,7 @@
******************************************************************************************/
/*
* Support for point data request capability to retrieve point data and metadata
* from EDEX Thrift service.
* Extended thrift protocol to handle messages from edex.
*
* <pre>
*
@ -28,26 +34,23 @@
*
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* 08/08/11 9696 gzhou Initial Creation
* 07/29/13 2215 bkowal Regenerated for thrift 0.9.0
*
* </pre>
*
* @author gzhou
* @author bkowal
* @version 1
*/
#include "PointDataServer_types.h"
const char
* com_raytheon_uf_common_dataquery_requests_ConstraintType::ascii_fingerprint =
"EFB929595D312AC8F305D5A794CFEDA1";
const uint8_t
com_raytheon_uf_common_dataquery_requests_ConstraintType::binary_fingerprint[16] =
{ 0xEF, 0xB9, 0x29, 0x59, 0x5D, 0x31, 0x2A, 0xC8, 0xF3, 0x05,
0xD5, 0xA7, 0x94, 0xCF, 0xED, 0xA1 };
#include <algorithm>
uint32_t com_raytheon_uf_common_dataquery_requests_ConstraintType::read(
::apache::thrift::protocol::TProtocol* iprot) {
const char* com_raytheon_uf_common_dataquery_requests_ConstraintType::ascii_fingerprint = "EFB929595D312AC8F305D5A794CFEDA1";
const uint8_t com_raytheon_uf_common_dataquery_requests_ConstraintType::binary_fingerprint[16] = {0xEF,0xB9,0x29,0x59,0x5D,0x31,0x2A,0xC8,0xF3,0x05,0xD5,0xA7,0x94,0xCF,0xED,0xA1};
uint32_t com_raytheon_uf_common_dataquery_requests_ConstraintType::read(::apache::thrift::protocol::TProtocol* iprot) {
uint32_t xfer = 0;
std::string fname;
@ -58,43 +61,58 @@ uint32_t com_raytheon_uf_common_dataquery_requests_ConstraintType::read(
using ::apache::thrift::protocol::TProtocolException;
while (true)
{
xfer += iprot->readFieldBegin(fname, ftype, fid);
if (ftype == ::apache::thrift::protocol::T_STOP) {
break;
}
switch (fid)
{
case 1:
if (ftype == ::apache::thrift::protocol::T_STRING) {
xfer += iprot->readString(operand);
xfer += iprot->readString(this->operand);
this->__isset.operand = true;
} else
} else {
xfer += iprot->skip(ftype);
}
break;
default:
xfer += iprot->skip(ftype);
break;
}
xfer += iprot->readFieldEnd();
}
xfer += iprot->readStructEnd();
return xfer;
}
uint32_t com_raytheon_uf_common_dataquery_requests_ConstraintType::write(
::apache::thrift::protocol::TProtocol* oprot) const {
uint32_t com_raytheon_uf_common_dataquery_requests_ConstraintType::write(::apache::thrift::protocol::TProtocol* oprot) const {
uint32_t xfer = 0;
xfer
+= oprot->writeStructBegin(
"com_raytheon_uf_common_dataquery_requests_RequestConstraint$ConstraintType");
xfer += oprot->writeFieldBegin("__enumValue__",
::apache::thrift::protocol::T_STRING, 1);
xfer += oprot->writeStructBegin("com_raytheon_uf_common_dataquery_requests_ConstraintType");
xfer += oprot->writeFieldBegin("operand", ::apache::thrift::protocol::T_STRING, 1);
xfer += oprot->writeString(this->operand);
xfer += oprot->writeFieldEnd();
xfer += oprot->writeFieldStop();
xfer += oprot->writeStructEnd();
return xfer;
}
const char
* com_raytheon_uf_common_dataquery_requests_RequestConstraint::ascii_fingerprint =
"BDAF55DAA660FA1ADBE30760752211A8";
const uint8_t
com_raytheon_uf_common_dataquery_requests_RequestConstraint::binary_fingerprint[16] =
{ 0xBD, 0xAF, 0x55, 0xDA, 0xA6, 0x60, 0xFA, 0x1A, 0xDB, 0xE3,
0x07, 0x60, 0x75, 0x22, 0x11, 0xA8 };
void swap(com_raytheon_uf_common_dataquery_requests_ConstraintType &a, com_raytheon_uf_common_dataquery_requests_ConstraintType &b) {
using ::std::swap;
swap(a.operand, b.operand);
swap(a.__isset, b.__isset);
}
uint32_t com_raytheon_uf_common_dataquery_requests_RequestConstraint::read(
::apache::thrift::protocol::TProtocol* iprot) {
const char* com_raytheon_uf_common_dataquery_requests_RequestConstraint::ascii_fingerprint = "BDAF55DAA660FA1ADBE30760752211A8";
const uint8_t com_raytheon_uf_common_dataquery_requests_RequestConstraint::binary_fingerprint[16] = {0xBD,0xAF,0x55,0xDA,0xA6,0x60,0xFA,0x1A,0xDB,0xE3,0x07,0x60,0x75,0x22,0x11,0xA8};
uint32_t com_raytheon_uf_common_dataquery_requests_RequestConstraint::read(::apache::thrift::protocol::TProtocol* iprot) {
uint32_t xfer = 0;
std::string fname;
@ -105,12 +123,15 @@ uint32_t com_raytheon_uf_common_dataquery_requests_RequestConstraint::read(
using ::apache::thrift::protocol::TProtocolException;
while (true) {
while (true)
{
xfer += iprot->readFieldBegin(fname, ftype, fid);
if (ftype == ::apache::thrift::protocol::T_STOP) {
break;
}
switch (fid) {
switch (fid)
{
case 1:
if (ftype == ::apache::thrift::protocol::T_STRUCT) {
xfer += this->constraintType.read(iprot);
@ -139,34 +160,34 @@ uint32_t com_raytheon_uf_common_dataquery_requests_RequestConstraint::read(
return xfer;
}
uint32_t com_raytheon_uf_common_dataquery_requests_RequestConstraint::write(
::apache::thrift::protocol::TProtocol* oprot) const {
uint32_t com_raytheon_uf_common_dataquery_requests_RequestConstraint::write(::apache::thrift::protocol::TProtocol* oprot) const {
uint32_t xfer = 0;
xfer += oprot->writeStructBegin(
"com_raytheon_uf_common_dataquery_requests_RequestConstraint");
xfer += oprot->writeFieldBegin("constraintType",
::apache::thrift::protocol::T_STRUCT, 1);
xfer += oprot->writeStructBegin("com_raytheon_uf_common_dataquery_requests_RequestConstraint");
xfer += oprot->writeFieldBegin("constraintType", ::apache::thrift::protocol::T_STRUCT, 1);
xfer += this->constraintType.write(oprot);
xfer += oprot->writeFieldEnd();
xfer += oprot->writeFieldBegin("constraintValue",
::apache::thrift::protocol::T_STRING, 2);
xfer += oprot->writeFieldBegin("constraintValue", ::apache::thrift::protocol::T_STRING, 2);
xfer += oprot->writeString(this->constraintValue);
xfer += oprot->writeFieldEnd();
xfer += oprot->writeFieldStop();
xfer += oprot->writeStructEnd();
return xfer;
}
const char
* com_raytheon_uf_common_pointdata_PointDataServerRequest::ascii_fingerprint =
"C9F1CC9CD1A896EE01B7C5215E2BE99F";
const uint8_t
com_raytheon_uf_common_pointdata_PointDataServerRequest::binary_fingerprint[16] =
{ 0xC9, 0xF1, 0xCC, 0x9C, 0xD1, 0xA8, 0x96, 0xEE, 0x01, 0xB7,
0xC5, 0x21, 0x5E, 0x2B, 0xE9, 0x9F };
void swap(com_raytheon_uf_common_dataquery_requests_RequestConstraint &a, com_raytheon_uf_common_dataquery_requests_RequestConstraint &b) {
using ::std::swap;
swap(a.constraintType, b.constraintType);
swap(a.constraintValue, b.constraintValue);
swap(a.__isset, b.__isset);
}
uint32_t com_raytheon_uf_common_pointdata_PointDataServerRequest::read(
::apache::thrift::protocol::TProtocol* iprot) {
const char* com_raytheon_uf_common_pointdata_PointDataServerRequest::ascii_fingerprint = "C9F1CC9CD1A896EE01B7C5215E2BE99F";
const uint8_t com_raytheon_uf_common_pointdata_PointDataServerRequest::binary_fingerprint[16] = {0xC9,0xF1,0xCC,0x9C,0xD1,0xA8,0x96,0xEE,0x01,0xB7,0xC5,0x21,0x5E,0x2B,0xE9,0x9F};
uint32_t com_raytheon_uf_common_pointdata_PointDataServerRequest::read(::apache::thrift::protocol::TProtocol* iprot) {
uint32_t xfer = 0;
std::string fname;
@ -177,12 +198,15 @@ uint32_t com_raytheon_uf_common_pointdata_PointDataServerRequest::read(
using ::apache::thrift::protocol::TProtocolException;
while (true) {
while (true)
{
xfer += iprot->readFieldBegin(fname, ftype, fid);
if (ftype == ::apache::thrift::protocol::T_STOP) {
break;
}
switch (fid) {
switch (fid)
{
case 1:
if (ftype == ::apache::thrift::protocol::T_MAP) {
{
@ -190,16 +214,16 @@ uint32_t com_raytheon_uf_common_pointdata_PointDataServerRequest::read(
uint32_t _size0;
::apache::thrift::protocol::TType _ktype1;
::apache::thrift::protocol::TType _vtype2;
iprot->readMapBegin(_ktype1, _vtype2, _size0);
xfer += iprot->readMapBegin(_ktype1, _vtype2, _size0);
uint32_t _i4;
for (_i4 = 0; _i4 < _size0; ++_i4) {
for (_i4 = 0; _i4 < _size0; ++_i4)
{
std::string _key5;
xfer += iprot->readString(_key5);
com_raytheon_uf_common_dataquery_requests_RequestConstraint
& _val6 = this->rcMap[_key5];
com_raytheon_uf_common_dataquery_requests_RequestConstraint& _val6 = this->rcMap[_key5];
xfer += _val6.read(iprot);
}
iprot->readMapEnd();
xfer += iprot->readMapEnd();
}
this->__isset.rcMap = true;
} else {
@ -218,30 +242,32 @@ uint32_t com_raytheon_uf_common_pointdata_PointDataServerRequest::read(
return xfer;
}
uint32_t com_raytheon_uf_common_pointdata_PointDataServerRequest::write(
::apache::thrift::protocol::TProtocol* oprot) const {
uint32_t com_raytheon_uf_common_pointdata_PointDataServerRequest::write(::apache::thrift::protocol::TProtocol* oprot) const {
uint32_t xfer = 0;
xfer += oprot->writeStructBegin(
"com_raytheon_uf_common_pointdata_PointDataServerRequest");
xfer += oprot->writeFieldBegin("rcMap", ::apache::thrift::protocol::T_MAP,
1);
xfer += oprot->writeStructBegin("com_raytheon_uf_common_pointdata_PointDataServerRequest");
xfer += oprot->writeFieldBegin("rcMap", ::apache::thrift::protocol::T_MAP, 1);
{
xfer += oprot->writeMapBegin(::apache::thrift::protocol::T_STRING, ::apache::thrift::protocol::T_STRUCT, static_cast<uint32_t>(this->rcMap.size()));
std::map<std::string, com_raytheon_uf_common_dataquery_requests_RequestConstraint> ::const_iterator _iter7;
for (_iter7 = this->rcMap.begin(); _iter7 != this->rcMap.end(); ++_iter7)
{
xfer += oprot->writeMapBegin(::apache::thrift::protocol::T_STRING,
::apache::thrift::protocol::T_STRUCT, this->rcMap.size());
std::map<std::string,
com_raytheon_uf_common_dataquery_requests_RequestConstraint>::const_iterator
_iter7;
for (_iter7 = this->rcMap.begin(); _iter7 != this->rcMap.end(); ++_iter7) {
xfer += oprot->writeStructBegin("11");
xfer += oprot->writeString(_iter7->first);
xfer += oprot->writeStructEnd();
xfer += _iter7->second.write(oprot);
}
xfer += oprot->writeMapEnd();
}
xfer += oprot->writeFieldEnd();
xfer += oprot->writeFieldStop();
xfer += oprot->writeStructEnd();
return xfer;
}
void swap(com_raytheon_uf_common_pointdata_PointDataServerRequest &a, com_raytheon_uf_common_pointdata_PointDataServerRequest &b) {
using ::std::swap;
swap(a.rcMap, b.rcMap);
swap(a.__isset, b.__isset);
}

View file

@ -1,3 +1,10 @@
/**
* Autogenerated by Thrift Compiler (0.9.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
/*****************************************************************************************
* COPYRIGHT (c), 2009, RAYTHEON COMPANY
* ALL RIGHTS RESERVED, An Unpublished Work
@ -19,8 +26,7 @@
******************************************************************************************/
/*
* Support for point data request capability to retrieve point data and metadata
* from EDEX Thrift service.
* Extended thrift protocol to handle messages from edex.
*
* <pre>
*
@ -28,27 +34,20 @@
*
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* 08/08/11 9696 gzhou Initial Creation
* 07/29/13 2215 bkowal Regenerated for thrift 0.9.0
*
* </pre>
*
* @author gzhou
* @author bkowal
* @version 1
*/
/**
* Autogenerated by Thrift
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
*/
#ifndef PointDataServer_TYPES_H
#define PointDataServer_TYPES_H
#include <Thrift.h>
#include <TApplicationException.h>
#include <protocol/TProtocol.h>
#include <transport/TTransport.h>
#include "PointData_types.h"
#include <thrift/Thrift.h>
#include <thrift/TApplicationException.h>
#include <thrift/protocol/TProtocol.h>
#include <thrift/transport/TTransport.h>
@ -65,7 +64,7 @@ class com_raytheon_uf_common_dataquery_requests_ConstraintType {
static const char* ascii_fingerprint; // = "EFB929595D312AC8F305D5A794CFEDA1";
static const uint8_t binary_fingerprint[16]; // = {0xEF,0xB9,0x29,0x59,0x5D,0x31,0x2A,0xC8,0xF3,0x05,0xD5,0xA7,0x94,0xCF,0xED,0xA1};
com_raytheon_uf_common_dataquery_requests_ConstraintType() : operand("") {
com_raytheon_uf_common_dataquery_requests_ConstraintType() : operand() {
}
virtual ~com_raytheon_uf_common_dataquery_requests_ConstraintType() throw() {}
@ -74,6 +73,10 @@ class com_raytheon_uf_common_dataquery_requests_ConstraintType {
_com_raytheon_uf_common_dataquery_requests_ConstraintType__isset __isset;
void __set_operand(const std::string& val) {
operand = val;
}
bool operator == (const com_raytheon_uf_common_dataquery_requests_ConstraintType & rhs) const
{
if (!(operand == rhs.operand))
@ -91,6 +94,8 @@ class com_raytheon_uf_common_dataquery_requests_ConstraintType {
};
void swap(com_raytheon_uf_common_dataquery_requests_ConstraintType &a, com_raytheon_uf_common_dataquery_requests_ConstraintType &b);
typedef struct _com_raytheon_uf_common_dataquery_requests_RequestConstraint__isset {
_com_raytheon_uf_common_dataquery_requests_RequestConstraint__isset() : constraintType(false), constraintValue(false) {}
bool constraintType;
@ -103,7 +108,7 @@ class com_raytheon_uf_common_dataquery_requests_RequestConstraint {
static const char* ascii_fingerprint; // = "BDAF55DAA660FA1ADBE30760752211A8";
static const uint8_t binary_fingerprint[16]; // = {0xBD,0xAF,0x55,0xDA,0xA6,0x60,0xFA,0x1A,0xDB,0xE3,0x07,0x60,0x75,0x22,0x11,0xA8};
com_raytheon_uf_common_dataquery_requests_RequestConstraint() : constraintValue("") {
com_raytheon_uf_common_dataquery_requests_RequestConstraint() : constraintValue() {
}
virtual ~com_raytheon_uf_common_dataquery_requests_RequestConstraint() throw() {}
@ -113,6 +118,14 @@ class com_raytheon_uf_common_dataquery_requests_RequestConstraint {
_com_raytheon_uf_common_dataquery_requests_RequestConstraint__isset __isset;
void __set_constraintType(const com_raytheon_uf_common_dataquery_requests_ConstraintType& val) {
constraintType = val;
}
void __set_constraintValue(const std::string& val) {
constraintValue = val;
}
bool operator == (const com_raytheon_uf_common_dataquery_requests_RequestConstraint & rhs) const
{
if (!(constraintType == rhs.constraintType))
@ -132,6 +145,8 @@ class com_raytheon_uf_common_dataquery_requests_RequestConstraint {
};
void swap(com_raytheon_uf_common_dataquery_requests_RequestConstraint &a, com_raytheon_uf_common_dataquery_requests_RequestConstraint &b);
typedef struct _com_raytheon_uf_common_pointdata_PointDataServerRequest__isset {
_com_raytheon_uf_common_pointdata_PointDataServerRequest__isset() : rcMap(false) {}
bool rcMap;
@ -152,6 +167,10 @@ class com_raytheon_uf_common_pointdata_PointDataServerRequest {
_com_raytheon_uf_common_pointdata_PointDataServerRequest__isset __isset;
void __set_rcMap(const std::map<std::string, com_raytheon_uf_common_dataquery_requests_RequestConstraint> & val) {
rcMap = val;
}
bool operator == (const com_raytheon_uf_common_pointdata_PointDataServerRequest & rhs) const
{
if (!(rcMap == rhs.rcMap))
@ -169,6 +188,8 @@ class com_raytheon_uf_common_pointdata_PointDataServerRequest {
};
void swap(com_raytheon_uf_common_pointdata_PointDataServerRequest &a, com_raytheon_uf_common_pointdata_PointDataServerRequest &b);
#endif

View file

@ -1,3 +1,10 @@
/**
* Autogenerated by Thrift Compiler (0.9.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
/*****************************************************************************************
* COPYRIGHT (c), 2009, RAYTHEON COMPANY
* ALL RIGHTS RESERVED, An Unpublished Work
@ -19,8 +26,7 @@
******************************************************************************************/
/*
* Support for point data request capability to retrieve point data
* from EDEX Thrift service.
* Extended thrift protocol to handle messages from edex.
*
* <pre>
*
@ -28,19 +34,13 @@
*
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* 01/18/10 3747 brockwoo Initial Creation
* 07/29/13 2215 bkowal Regenerated for thrift 0.9.0
*
* </pre>
*
* @author brockwoo
* @author bkowal
* @version 1
*/
/**
* Autogenerated by Thrift
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
*/
#include "PointData_constants.h"

View file

@ -1,3 +1,10 @@
/**
* Autogenerated by Thrift Compiler (0.9.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
/*****************************************************************************************
* COPYRIGHT (c), 2009, RAYTHEON COMPANY
* ALL RIGHTS RESERVED, An Unpublished Work
@ -19,8 +26,7 @@
******************************************************************************************/
/*
* Support for point data request capability to retrieve point data
* from EDEX Thrift service.
* Extended thrift protocol to handle messages from edex.
*
* <pre>
*
@ -28,19 +34,13 @@
*
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* 01/18/10 3747 brockwoo Initial Creation
* 07/29/13 2215 bkowal Regenerated for thrift 0.9.0
*
* </pre>
*
* @author brockwoo
* @author bkowal
* @version 1
*/
/**
* Autogenerated by Thrift
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
*/
#ifndef PointData_CONSTANTS_H
#define PointData_CONSTANTS_H

File diff suppressed because it is too large Load diff

View file

@ -1,3 +1,10 @@
/**
* Autogenerated by Thrift Compiler (0.9.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
/*****************************************************************************************
* COPYRIGHT (c), 2009, RAYTHEON COMPANY
* ALL RIGHTS RESERVED, An Unpublished Work
@ -19,8 +26,7 @@
******************************************************************************************/
/*
* Support for point data request capability to retrieve point data
* from EDEX Thrift service.
* Extended thrift protocol to handle messages from edex.
*
* <pre>
*
@ -28,37 +34,43 @@
*
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* 01/18/10 3747 brockwoo Initial Creation
* 07/29/13 2215 bkowal Regenerated for thrift 0.9.0
*
* </pre>
*
* @author brockwoo
* @author bkowal
* @version 1
*/
/**
* Autogenerated by Thrift
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
*/
#ifndef PointData_TYPES_H
#define PointData_TYPES_H
#include <Thrift.h>
#include <protocol/TProtocol.h>
#include <transport/TTransport.h>
#include <thrift/Thrift.h>
#include <thrift/TApplicationException.h>
#include <thrift/protocol/TProtocol.h>
#include <thrift/transport/TTransport.h>
typedef struct _com_raytheon_uf_common_pointdata_ParameterDescription__isset {
_com_raytheon_uf_common_pointdata_ParameterDescription__isset() : dimension(false), dimensionAsInt(false), fillValue(false), maxLength(false), numDims(false), parameterName(false), unit(false) {}
bool dimension;
bool dimensionAsInt;
bool fillValue;
bool maxLength;
bool numDims;
bool parameterName;
bool unit;
} _com_raytheon_uf_common_pointdata_ParameterDescription__isset;
class com_raytheon_uf_common_pointdata_ParameterDescription {
public:
static const char* ascii_fingerprint; // = "F8914BAC237E22C5EFA279EDDBA3C5C6";
static const uint8_t binary_fingerprint[16]; // = {0xF8,0x91,0x4B,0xAC,0x23,0x7E,0x22,0xC5,0xEF,0xA2,0x79,0xED,0xDB,0xA3,0xC5,0xC6};
com_raytheon_uf_common_pointdata_ParameterDescription() : dimension(""), dimensionAsInt(0), fillValue(0), maxLength(0), numDims(0), parameterName(""), unit("") {
com_raytheon_uf_common_pointdata_ParameterDescription() : dimension(), dimensionAsInt(0), fillValue(0), maxLength(0), numDims(0), parameterName(), unit() {
}
virtual ~com_raytheon_uf_common_pointdata_ParameterDescription() throw() {}
@ -71,16 +83,35 @@ class com_raytheon_uf_common_pointdata_ParameterDescription {
std::string parameterName;
std::string unit;
struct __isset {
__isset() : dimension(false), dimensionAsInt(false), fillValue(false), maxLength(false), numDims(false), parameterName(false), unit(false) {}
bool dimension;
bool dimensionAsInt;
bool fillValue;
bool maxLength;
bool numDims;
bool parameterName;
bool unit;
} __isset;
_com_raytheon_uf_common_pointdata_ParameterDescription__isset __isset;
void __set_dimension(const std::string& val) {
dimension = val;
}
void __set_dimensionAsInt(const int32_t val) {
dimensionAsInt = val;
}
void __set_fillValue(const double val) {
fillValue = val;
}
void __set_maxLength(const int32_t val) {
maxLength = val;
}
void __set_numDims(const int32_t val) {
numDims = val;
}
void __set_parameterName(const std::string& val) {
parameterName = val;
}
void __set_unit(const std::string& val) {
unit = val;
}
bool operator == (const com_raytheon_uf_common_pointdata_ParameterDescription & rhs) const
{
@ -106,11 +137,20 @@ class com_raytheon_uf_common_pointdata_ParameterDescription {
bool operator < (const com_raytheon_uf_common_pointdata_ParameterDescription & ) const;
uint32_t read(apache::thrift::protocol::TProtocol* iprot);
uint32_t write(apache::thrift::protocol::TProtocol* oprot) const;
uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
};
void swap(com_raytheon_uf_common_pointdata_ParameterDescription &a, com_raytheon_uf_common_pointdata_ParameterDescription &b);
typedef struct _com_raytheon_uf_common_pointdata_elements_StringPointDataObject__isset {
_com_raytheon_uf_common_pointdata_elements_StringPointDataObject__isset() : description(false), dimensions(false), stringData(false) {}
bool description;
bool dimensions;
bool stringData;
} _com_raytheon_uf_common_pointdata_elements_StringPointDataObject__isset;
class com_raytheon_uf_common_pointdata_elements_StringPointDataObject {
public:
@ -126,12 +166,19 @@ class com_raytheon_uf_common_pointdata_elements_StringPointDataObject {
int32_t dimensions;
std::vector<std::string> stringData;
struct __isset {
__isset() : description(false), dimensions(false), stringData(false) {}
bool description;
bool dimensions;
bool stringData;
} __isset;
_com_raytheon_uf_common_pointdata_elements_StringPointDataObject__isset __isset;
void __set_description(const com_raytheon_uf_common_pointdata_ParameterDescription& val) {
description = val;
}
void __set_dimensions(const int32_t val) {
dimensions = val;
}
void __set_stringData(const std::vector<std::string> & val) {
stringData = val;
}
bool operator == (const com_raytheon_uf_common_pointdata_elements_StringPointDataObject & rhs) const
{
@ -149,16 +196,26 @@ class com_raytheon_uf_common_pointdata_elements_StringPointDataObject {
bool operator < (const com_raytheon_uf_common_pointdata_elements_StringPointDataObject & ) const;
uint32_t read(apache::thrift::protocol::TProtocol* iprot);
uint32_t write(apache::thrift::protocol::TProtocol* oprot) const;
uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
};
void swap(com_raytheon_uf_common_pointdata_elements_StringPointDataObject &a, com_raytheon_uf_common_pointdata_elements_StringPointDataObject &b);
typedef struct _com_raytheon_uf_common_pointdata_elements_FloatPointDataObject__isset {
_com_raytheon_uf_common_pointdata_elements_FloatPointDataObject__isset() : description(false), dimensions(false), floatData(false), trueFloatData(false) {}
bool description;
bool dimensions;
bool floatData;
bool trueFloatData;
} _com_raytheon_uf_common_pointdata_elements_FloatPointDataObject__isset;
class com_raytheon_uf_common_pointdata_elements_FloatPointDataObject {
public:
static const char* ascii_fingerprint; // = "3E090BC5D21490BE0856576B426175A4";
static const uint8_t binary_fingerprint[16]; // = {0x3E,0x09,0x0B,0xC5,0xD2,0x14,0x90,0xBE,0x08,0x56,0x57,0x6B,0x42,0x61,0x75,0xA4};
static const char* ascii_fingerprint; // = "89584E5DAFB01EC75A91F6E88874692D";
static const uint8_t binary_fingerprint[16]; // = {0x89,0x58,0x4E,0x5D,0xAF,0xB0,0x1E,0xC7,0x5A,0x91,0xF6,0xE8,0x88,0x74,0x69,0x2D};
com_raytheon_uf_common_pointdata_elements_FloatPointDataObject() : dimensions(0) {
}
@ -168,14 +225,25 @@ class com_raytheon_uf_common_pointdata_elements_FloatPointDataObject {
com_raytheon_uf_common_pointdata_ParameterDescription description;
int32_t dimensions;
std::vector<int32_t> floatData;
std::vector<float> trueFloatData;
std::vector<double> trueFloatData;
struct __isset {
__isset() : description(false), dimensions(false), floatData(false) {}
bool description;
bool dimensions;
bool floatData;
} __isset;
_com_raytheon_uf_common_pointdata_elements_FloatPointDataObject__isset __isset;
void __set_description(const com_raytheon_uf_common_pointdata_ParameterDescription& val) {
description = val;
}
void __set_dimensions(const int32_t val) {
dimensions = val;
}
void __set_floatData(const std::vector<int32_t> & val) {
floatData = val;
}
void __set_trueFloatData(const std::vector<double> & val) {
trueFloatData = val;
}
bool operator == (const com_raytheon_uf_common_pointdata_elements_FloatPointDataObject & rhs) const
{
@ -185,6 +253,8 @@ class com_raytheon_uf_common_pointdata_elements_FloatPointDataObject {
return false;
if (!(floatData == rhs.floatData))
return false;
if (!(trueFloatData == rhs.trueFloatData))
return false;
return true;
}
bool operator != (const com_raytheon_uf_common_pointdata_elements_FloatPointDataObject &rhs) const {
@ -193,11 +263,20 @@ class com_raytheon_uf_common_pointdata_elements_FloatPointDataObject {
bool operator < (const com_raytheon_uf_common_pointdata_elements_FloatPointDataObject & ) const;
uint32_t read(apache::thrift::protocol::TProtocol* iprot);
uint32_t write(apache::thrift::protocol::TProtocol* oprot) const;
uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
};
void swap(com_raytheon_uf_common_pointdata_elements_FloatPointDataObject &a, com_raytheon_uf_common_pointdata_elements_FloatPointDataObject &b);
typedef struct _com_raytheon_uf_common_pointdata_elements_IntPointDataObject__isset {
_com_raytheon_uf_common_pointdata_elements_IntPointDataObject__isset() : description(false), dimensions(false), intData(false) {}
bool description;
bool dimensions;
bool intData;
} _com_raytheon_uf_common_pointdata_elements_IntPointDataObject__isset;
class com_raytheon_uf_common_pointdata_elements_IntPointDataObject {
public:
@ -213,12 +292,19 @@ class com_raytheon_uf_common_pointdata_elements_IntPointDataObject {
int32_t dimensions;
std::vector<int32_t> intData;
struct __isset {
__isset() : description(false), dimensions(false), intData(false) {}
bool description;
bool dimensions;
bool intData;
} __isset;
_com_raytheon_uf_common_pointdata_elements_IntPointDataObject__isset __isset;
void __set_description(const com_raytheon_uf_common_pointdata_ParameterDescription& val) {
description = val;
}
void __set_dimensions(const int32_t val) {
dimensions = val;
}
void __set_intData(const std::vector<int32_t> & val) {
intData = val;
}
bool operator == (const com_raytheon_uf_common_pointdata_elements_IntPointDataObject & rhs) const
{
@ -236,11 +322,20 @@ class com_raytheon_uf_common_pointdata_elements_IntPointDataObject {
bool operator < (const com_raytheon_uf_common_pointdata_elements_IntPointDataObject & ) const;
uint32_t read(apache::thrift::protocol::TProtocol* iprot);
uint32_t write(apache::thrift::protocol::TProtocol* oprot) const;
uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
};
void swap(com_raytheon_uf_common_pointdata_elements_IntPointDataObject &a, com_raytheon_uf_common_pointdata_elements_IntPointDataObject &b);
typedef struct _com_raytheon_uf_common_pointdata_elements_LongPointDataObject__isset {
_com_raytheon_uf_common_pointdata_elements_LongPointDataObject__isset() : description(false), dimensions(false), longData(false) {}
bool description;
bool dimensions;
bool longData;
} _com_raytheon_uf_common_pointdata_elements_LongPointDataObject__isset;
class com_raytheon_uf_common_pointdata_elements_LongPointDataObject {
public:
@ -256,12 +351,19 @@ class com_raytheon_uf_common_pointdata_elements_LongPointDataObject {
int32_t dimensions;
std::vector<int64_t> longData;
struct __isset {
__isset() : description(false), dimensions(false), longData(false) {}
bool description;
bool dimensions;
bool longData;
} __isset;
_com_raytheon_uf_common_pointdata_elements_LongPointDataObject__isset __isset;
void __set_description(const com_raytheon_uf_common_pointdata_ParameterDescription& val) {
description = val;
}
void __set_dimensions(const int32_t val) {
dimensions = val;
}
void __set_longData(const std::vector<int64_t> & val) {
longData = val;
}
bool operator == (const com_raytheon_uf_common_pointdata_elements_LongPointDataObject & rhs) const
{
@ -279,16 +381,27 @@ class com_raytheon_uf_common_pointdata_elements_LongPointDataObject {
bool operator < (const com_raytheon_uf_common_pointdata_elements_LongPointDataObject & ) const;
uint32_t read(apache::thrift::protocol::TProtocol* iprot);
uint32_t write(apache::thrift::protocol::TProtocol* oprot) const;
uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
};
void swap(com_raytheon_uf_common_pointdata_elements_LongPointDataObject &a, com_raytheon_uf_common_pointdata_elements_LongPointDataObject &b);
typedef struct _com_raytheon_uf_common_pointdata_PointDataThriftContainer__isset {
_com_raytheon_uf_common_pointdata_PointDataThriftContainer__isset() : floatData(false), intData(false), longData(false), size(false), stringData(false) {}
bool floatData;
bool intData;
bool longData;
bool size;
bool stringData;
} _com_raytheon_uf_common_pointdata_PointDataThriftContainer__isset;
class com_raytheon_uf_common_pointdata_PointDataThriftContainer {
public:
static const char* ascii_fingerprint; // = "1FBB5099264525B0793D6869D0E4CD21";
static const uint8_t binary_fingerprint[16]; // = {0x1F,0xBB,0x50,0x99,0x26,0x45,0x25,0xB0,0x79,0x3D,0x68,0x69,0xD0,0xE4,0xCD,0x21};
static const char* ascii_fingerprint; // = "8E622421D449B7CCD34FF11BE324DA19";
static const uint8_t binary_fingerprint[16]; // = {0x8E,0x62,0x24,0x21,0xD4,0x49,0xB7,0xCC,0xD3,0x4F,0xF1,0x1B,0xE3,0x24,0xDA,0x19};
com_raytheon_uf_common_pointdata_PointDataThriftContainer() : size(0) {
}
@ -301,14 +414,27 @@ class com_raytheon_uf_common_pointdata_PointDataThriftContainer {
int32_t size;
std::vector<com_raytheon_uf_common_pointdata_elements_StringPointDataObject> stringData;
struct __isset {
__isset() : floatData(false), intData(false), longData(false), size(false), stringData(false) {}
bool floatData;
bool intData;
bool longData;
bool size;
bool stringData;
} __isset;
_com_raytheon_uf_common_pointdata_PointDataThriftContainer__isset __isset;
void __set_floatData(const std::vector<com_raytheon_uf_common_pointdata_elements_FloatPointDataObject> & val) {
floatData = val;
}
void __set_intData(const std::vector<com_raytheon_uf_common_pointdata_elements_IntPointDataObject> & val) {
intData = val;
}
void __set_longData(const std::vector<com_raytheon_uf_common_pointdata_elements_LongPointDataObject> & val) {
longData = val;
}
void __set_size(const int32_t val) {
size = val;
}
void __set_stringData(const std::vector<com_raytheon_uf_common_pointdata_elements_StringPointDataObject> & val) {
stringData = val;
}
bool operator == (const com_raytheon_uf_common_pointdata_PointDataThriftContainer & rhs) const
{
@ -330,18 +456,27 @@ class com_raytheon_uf_common_pointdata_PointDataThriftContainer {
bool operator < (const com_raytheon_uf_common_pointdata_PointDataThriftContainer & ) const;
uint32_t read(apache::thrift::protocol::TProtocol* iprot);
uint32_t write(apache::thrift::protocol::TProtocol* oprot) const;
uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
};
void swap(com_raytheon_uf_common_pointdata_PointDataThriftContainer &a, com_raytheon_uf_common_pointdata_PointDataThriftContainer &b);
typedef struct _com_raytheon_uf_common_pointdata_PointDataRequestMessageConstraint__isset {
_com_raytheon_uf_common_pointdata_PointDataRequestMessageConstraint__isset() : constraintType(false), parameter(false), value(false) {}
bool constraintType;
bool parameter;
bool value;
} _com_raytheon_uf_common_pointdata_PointDataRequestMessageConstraint__isset;
class com_raytheon_uf_common_pointdata_PointDataRequestMessageConstraint {
public:
static const char* ascii_fingerprint; // = "3368C2F81F2FEF71F11EDACDB2A3ECEF";
static const uint8_t binary_fingerprint[16]; // = {0x33,0x68,0xC2,0xF8,0x1F,0x2F,0xEF,0x71,0xF1,0x1E,0xDA,0xCD,0xB2,0xA3,0xEC,0xEF};
com_raytheon_uf_common_pointdata_PointDataRequestMessageConstraint() : constraintType(0), parameter(""), value("") {
com_raytheon_uf_common_pointdata_PointDataRequestMessageConstraint() : constraintType(0), parameter(), value() {
}
virtual ~com_raytheon_uf_common_pointdata_PointDataRequestMessageConstraint() throw() {}
@ -350,12 +485,19 @@ class com_raytheon_uf_common_pointdata_PointDataRequestMessageConstraint {
std::string parameter;
std::string value;
struct __isset {
__isset() : constraintType(false), parameter(false), value(false) {}
bool constraintType;
bool parameter;
bool value;
} __isset;
_com_raytheon_uf_common_pointdata_PointDataRequestMessageConstraint__isset __isset;
void __set_constraintType(const int32_t val) {
constraintType = val;
}
void __set_parameter(const std::string& val) {
parameter = val;
}
void __set_value(const std::string& val) {
value = val;
}
bool operator == (const com_raytheon_uf_common_pointdata_PointDataRequestMessageConstraint & rhs) const
{
@ -373,18 +515,30 @@ class com_raytheon_uf_common_pointdata_PointDataRequestMessageConstraint {
bool operator < (const com_raytheon_uf_common_pointdata_PointDataRequestMessageConstraint & ) const;
uint32_t read(apache::thrift::protocol::TProtocol* iprot);
uint32_t write(apache::thrift::protocol::TProtocol* oprot) const;
uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
};
void swap(com_raytheon_uf_common_pointdata_PointDataRequestMessageConstraint &a, com_raytheon_uf_common_pointdata_PointDataRequestMessageConstraint &b);
typedef struct _com_raytheon_uf_common_pointdata_PointDataRequestMessage__isset {
_com_raytheon_uf_common_pointdata_PointDataRequestMessage__isset() : allLevels(false), constraints(false), levelParameter(false), levelValue(false), parameters(false), pluginName(false) {}
bool allLevels;
bool constraints;
bool levelParameter;
bool levelValue;
bool parameters;
bool pluginName;
} _com_raytheon_uf_common_pointdata_PointDataRequestMessage__isset;
class com_raytheon_uf_common_pointdata_PointDataRequestMessage {
public:
static const char* ascii_fingerprint; // = "781EA3AAB5B079D92C9DA7774B669520";
static const uint8_t binary_fingerprint[16]; // = {0x78,0x1E,0xA3,0xAA,0xB5,0xB0,0x79,0xD9,0x2C,0x9D,0xA7,0x77,0x4B,0x66,0x95,0x20};
com_raytheon_uf_common_pointdata_PointDataRequestMessage() : allLevels(0), levelParameter(""), pluginName("") {
com_raytheon_uf_common_pointdata_PointDataRequestMessage() : allLevels(0), levelParameter(), pluginName() {
}
virtual ~com_raytheon_uf_common_pointdata_PointDataRequestMessage() throw() {}
@ -396,15 +550,31 @@ class com_raytheon_uf_common_pointdata_PointDataRequestMessage {
std::vector<std::string> parameters;
std::string pluginName;
struct __isset {
__isset() : allLevels(false), constraints(false), levelParameter(false), levelValue(false), parameters(false), pluginName(false) {}
bool allLevels;
bool constraints;
bool levelParameter;
bool levelValue;
bool parameters;
bool pluginName;
} __isset;
_com_raytheon_uf_common_pointdata_PointDataRequestMessage__isset __isset;
void __set_allLevels(const bool val) {
allLevels = val;
}
void __set_constraints(const std::vector<com_raytheon_uf_common_pointdata_PointDataRequestMessageConstraint> & val) {
constraints = val;
}
void __set_levelParameter(const std::string& val) {
levelParameter = val;
}
void __set_levelValue(const std::vector<double> & val) {
levelValue = val;
}
void __set_parameters(const std::vector<std::string> & val) {
parameters = val;
}
void __set_pluginName(const std::string& val) {
pluginName = val;
}
bool operator == (const com_raytheon_uf_common_pointdata_PointDataRequestMessage & rhs) const
{
@ -428,11 +598,13 @@ class com_raytheon_uf_common_pointdata_PointDataRequestMessage {
bool operator < (const com_raytheon_uf_common_pointdata_PointDataRequestMessage & ) const;
uint32_t read(apache::thrift::protocol::TProtocol* iprot);
uint32_t write(apache::thrift::protocol::TProtocol* oprot) const;
uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
};
void swap(com_raytheon_uf_common_pointdata_PointDataRequestMessage &a, com_raytheon_uf_common_pointdata_PointDataRequestMessage &b);
#endif

View file

@ -110,504 +110,6 @@
<storageModule moduleId="org.eclipse.cdt.core.language.mapping"/>
<storageModule moduleId="org.eclipse.cdt.internal.ui.text.commentOwnerProjectMappings"/>
<storageModule moduleId="org.eclipse.cdt.make.core.buildtargets"/>
<storageModule moduleId="scannerConfiguration">
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="org.eclipse.cdt.make.core.GCCStandardMakePerProjectProfile"/>
<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerProjectProfile">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="specsFile">
<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerFileProfile">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="makefileGenerator">
<runAction arguments="-f ${project_name}_scd.mk" command="make" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfile">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="specsFile">
<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileCPP">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="specsFile">
<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.cpp" command="g++" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileC">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="specsFile">
<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.c" command="gcc" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfile">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="specsFile">
<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileCPP">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="specsFile">
<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.cpp" command="g++" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileC">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="specsFile">
<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.c" command="gcc" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
<scannerConfigBuildInfo instanceId="cdt.managedbuild.config.gnu.so.release.517334012;cdt.managedbuild.config.gnu.so.release.517334012.1562609919;cdt.managedbuild.tool.gnu.c.compiler.so.release.1675088759;cdt.managedbuild.tool.gnu.c.compiler.input.637960694">
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileC"/>
<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerProjectProfile">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="specsFile">
<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerFileProfile">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="makefileGenerator">
<runAction arguments="-f ${project_name}_scd.mk" command="make" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfile">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="specsFile">
<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileCPP">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="specsFile">
<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.cpp" command="g++" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileC">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="specsFile">
<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.c" command="gcc" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfile">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="specsFile">
<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileCPP">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="specsFile">
<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.cpp" command="g++" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileC">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="specsFile">
<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.c" command="gcc" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
</scannerConfigBuildInfo>
<scannerConfigBuildInfo instanceId="cdt.managedbuild.config.gnu.so.debug.1670804518;cdt.managedbuild.config.gnu.so.debug.1670804518.275887876;cdt.managedbuild.tool.gnu.c.compiler.so.debug.24190383;cdt.managedbuild.tool.gnu.c.compiler.input.2103089487">
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileC"/>
<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerProjectProfile">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="specsFile">
<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerFileProfile">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="makefileGenerator">
<runAction arguments="-f ${project_name}_scd.mk" command="make" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfile">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="specsFile">
<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileCPP">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="specsFile">
<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.cpp" command="g++" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileC">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="specsFile">
<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.c" command="gcc" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfile">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="specsFile">
<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileCPP">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="specsFile">
<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.cpp" command="g++" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileC">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="specsFile">
<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.c" command="gcc" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
</scannerConfigBuildInfo>
<scannerConfigBuildInfo instanceId="cdt.managedbuild.config.gnu.so.release.517334012;cdt.managedbuild.config.gnu.so.release.517334012.;cdt.managedbuild.tool.gnu.c.compiler.so.release.1529313406;cdt.managedbuild.tool.gnu.c.compiler.input.1468063954">
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileC"/>
<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerProjectProfile">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="specsFile">
<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerFileProfile">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="makefileGenerator">
<runAction arguments="-f ${project_name}_scd.mk" command="make" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfile">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="specsFile">
<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileCPP">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="specsFile">
<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.cpp" command="g++" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileC">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="specsFile">
<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.c" command="gcc" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfile">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="specsFile">
<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileCPP">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="specsFile">
<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.cpp" command="g++" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileC">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="specsFile">
<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.c" command="gcc" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
</scannerConfigBuildInfo>
<scannerConfigBuildInfo instanceId="cdt.managedbuild.config.gnu.so.debug.1670804518;cdt.managedbuild.config.gnu.so.debug.1670804518.;cdt.managedbuild.tool.gnu.c.compiler.so.debug.1420709515;cdt.managedbuild.tool.gnu.c.compiler.input.1764183371">
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileC"/>
<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerProjectProfile">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="specsFile">
<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerFileProfile">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="makefileGenerator">
<runAction arguments="-f ${project_name}_scd.mk" command="make" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfile">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="specsFile">
<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileCPP">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="specsFile">
<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.cpp" command="g++" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileC">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="specsFile">
<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.c" command="gcc" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfile">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="specsFile">
<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileCPP">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="specsFile">
<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.cpp" command="g++" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileC">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="specsFile">
<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.c" command="gcc" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
</scannerConfigBuildInfo>
<scannerConfigBuildInfo instanceId="cdt.managedbuild.config.gnu.so.debug.1670804518;cdt.managedbuild.config.gnu.so.debug.1670804518.619617493;cdt.managedbuild.tool.gnu.c.compiler.so.debug.426221101;cdt.managedbuild.tool.gnu.c.compiler.input.1900393077">
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileC"/>
<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerProjectProfile">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="specsFile">
<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerFileProfile">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="makefileGenerator">
<runAction arguments="-f ${project_name}_scd.mk" command="make" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfile">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="specsFile">
<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileCPP">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="specsFile">
<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.cpp" command="g++" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileC">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="specsFile">
<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.c" command="gcc" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfile">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="specsFile">
<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileCPP">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="specsFile">
<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.cpp" command="g++" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileC">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="specsFile">
<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.c" command="gcc" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
</scannerConfigBuildInfo>
</storageModule>
</cconfiguration>
<cconfiguration id="cdt.managedbuild.config.gnu.so.debug.1670804518.380995065.712907077">
<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="cdt.managedbuild.config.gnu.so.debug.1670804518.380995065.712907077" moduleId="org.eclipse.cdt.core.settings" name="Build x86_64">
@ -719,6 +221,12 @@
<storageModule moduleId="org.eclipse.cdt.core.language.mapping"/>
<storageModule moduleId="org.eclipse.cdt.internal.ui.text.commentOwnerProjectMappings"/>
<storageModule moduleId="org.eclipse.cdt.make.core.buildtargets"/>
</cconfiguration>
</storageModule>
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
<project id="grib2.cdt.managedbuild.target.gnu.so.655859878" name="Shared Library" projectType="cdt.managedbuild.target.gnu.so"/>
</storageModule>
<storageModule moduleId="refreshScope"/>
<storageModule moduleId="scannerConfiguration">
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="org.eclipse.cdt.make.core.GCCStandardMakePerProjectProfile"/>
<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerProjectProfile">
@ -1217,9 +725,4 @@
</profile>
</scannerConfigBuildInfo>
</storageModule>
</cconfiguration>
</storageModule>
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
<project id="grib2.cdt.managedbuild.target.gnu.so.655859878" name="Shared Library" projectType="cdt.managedbuild.target.gnu.so"/>
</storageModule>
</cproject>

View file

@ -1 +1,2 @@
/Build x86
/Build x86_64

View file

@ -41,7 +41,7 @@
<option id="gnu.c.compiler.exe.debug.option.debugging.level.835394459" name="Debug Level" superClass="gnu.c.compiler.exe.debug.option.debugging.level" value="gnu.c.debugging.level.max" valueType="enumerated"/>
<option id="gnu.c.compiler.option.misc.other.1918326819" name="Other flags" superClass="gnu.c.compiler.option.misc.other" value="-m32 -c -fmessage-length=0" valueType="string"/>
<option id="gnu.c.compiler.option.include.paths.1652477461" name="Include paths (-I)" superClass="gnu.c.compiler.option.include.paths" valueType="includePath">
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/include}&quot;"/>
<listOptionValue builtIn="false" value="../org.apache.thrift/include"/>
</option>
<inputType id="cdt.managedbuild.tool.gnu.c.compiler.input.1864399189" superClass="cdt.managedbuild.tool.gnu.c.compiler.input"/>
</tool>
@ -55,433 +55,34 @@
</tool>
<tool id="cdt.managedbuild.tool.gnu.assembler.exe.debug.1490720075" name="GCC Assembler" superClass="cdt.managedbuild.tool.gnu.assembler.exe.debug">
<option id="gnu.both.asm.option.include.paths.2085529310" name="Include paths (-I)" superClass="gnu.both.asm.option.include.paths" valueType="includePath">
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/include}&quot;"/>
<listOptionValue builtIn="false" value="../org.apache.thrift/include"/>
</option>
<inputType id="cdt.managedbuild.tool.gnu.assembler.input.1225657310" superClass="cdt.managedbuild.tool.gnu.assembler.input"/>
</tool>
</toolChain>
</folderInfo>
<folderInfo id="cdt.managedbuild.config.gnu.exe.debug.1041397963.223874809" name="/" resourcePath="include">
<toolChain id="cdt.managedbuild.toolchain.gnu.exe.debug.1704436513" name="Linux GCC" superClass="cdt.managedbuild.toolchain.gnu.exe.debug" unusedChildren="">
<tool id="cdt.managedbuild.tool.gnu.archiver.base.14999754" name="GCC Archiver" superClass="cdt.managedbuild.tool.gnu.archiver.base.96629604"/>
<tool id="cdt.managedbuild.tool.gnu.cpp.compiler.exe.debug.665566604" name="GCC C++ Compiler" superClass="cdt.managedbuild.tool.gnu.cpp.compiler.exe.debug.2105636557">
<inputType id="cdt.managedbuild.tool.gnu.cpp.compiler.input.401173715" superClass="cdt.managedbuild.tool.gnu.cpp.compiler.input"/>
</tool>
<tool id="cdt.managedbuild.tool.gnu.c.compiler.exe.debug.1568372257" name="GCC C Compiler" superClass="cdt.managedbuild.tool.gnu.c.compiler.exe.debug.911634419">
<inputType id="cdt.managedbuild.tool.gnu.c.compiler.input.970279973" superClass="cdt.managedbuild.tool.gnu.c.compiler.input"/>
</tool>
<tool id="cdt.managedbuild.tool.gnu.c.linker.exe.debug.946597601" name="GCC C Linker" superClass="cdt.managedbuild.tool.gnu.c.linker.exe.debug.2051429786"/>
<tool id="cdt.managedbuild.tool.gnu.cpp.linker.exe.debug.1395437002" name="GCC C++ Linker" superClass="cdt.managedbuild.tool.gnu.cpp.linker.exe.debug.1694014208"/>
<tool id="cdt.managedbuild.tool.gnu.assembler.exe.debug.610198756" name="GCC Assembler" superClass="cdt.managedbuild.tool.gnu.assembler.exe.debug.1490720075">
<inputType id="cdt.managedbuild.tool.gnu.assembler.input.965928520" superClass="cdt.managedbuild.tool.gnu.assembler.input"/>
</tool>
</toolChain>
</folderInfo>
<sourceEntries>
<entry excluding="include|src" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name=""/>
<entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="include"/>
<entry flags="VALUE_WORKSPACE_PATH" kind="sourcePath" name="include"/>
</sourceEntries>
</configuration>
</storageModule>
<storageModule moduleId="scannerConfiguration">
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerProjectProfile">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="specsFile">
<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerFileProfile">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="makefileGenerator">
<runAction arguments="-E -P -v -dD" command="" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfile">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="specsFile">
<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileCPP">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="specsFile">
<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.cpp" command="g++" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileC">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="specsFile">
<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.c" command="gcc" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfile">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="specsFile">
<runAction arguments="-c 'gcc -E -P -v -dD &quot;${plugin_state_location}/${specs_file}&quot;'" command="sh" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileCPP">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="specsFile">
<runAction arguments="-c 'g++ -E -P -v -dD &quot;${plugin_state_location}/specs.cpp&quot;'" command="sh" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileC">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="specsFile">
<runAction arguments="-c 'gcc -E -P -v -dD &quot;${plugin_state_location}/specs.c&quot;'" command="sh" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
<scannerConfigBuildInfo instanceId="cdt.managedbuild.config.gnu.exe.release.1597153770;cdt.managedbuild.config.gnu.exe.release.1597153770.;cdt.managedbuild.tool.gnu.cpp.compiler.exe.release.1896544479;cdt.managedbuild.tool.gnu.cpp.compiler.input.1433448968">
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileCPP"/>
<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerProjectProfile">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="specsFile">
<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerFileProfile">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="makefileGenerator">
<runAction arguments="-E -P -v -dD" command="" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfile">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="specsFile">
<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileCPP">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="specsFile">
<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.cpp" command="g++" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileC">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="specsFile">
<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.c" command="gcc" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfile">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="specsFile">
<runAction arguments="-c 'gcc -E -P -v -dD &quot;${plugin_state_location}/${specs_file}&quot;'" command="sh" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileCPP">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="specsFile">
<runAction arguments="-c 'g++ -E -P -v -dD &quot;${plugin_state_location}/specs.cpp&quot;'" command="sh" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileC">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="specsFile">
<runAction arguments="-c 'gcc -E -P -v -dD &quot;${plugin_state_location}/specs.c&quot;'" command="sh" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
</scannerConfigBuildInfo>
<scannerConfigBuildInfo instanceId="cdt.managedbuild.config.gnu.exe.debug.1041397963;cdt.managedbuild.config.gnu.exe.debug.1041397963.;cdt.managedbuild.tool.gnu.c.compiler.exe.debug.911634419;cdt.managedbuild.tool.gnu.c.compiler.input.1864399189">
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileC"/>
<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerProjectProfile">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="specsFile">
<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerFileProfile">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="makefileGenerator">
<runAction arguments="-E -P -v -dD" command="" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfile">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="specsFile">
<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileCPP">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="specsFile">
<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.cpp" command="g++" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileC">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="specsFile">
<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.c" command="gcc" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfile">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="specsFile">
<runAction arguments="-c 'gcc -E -P -v -dD &quot;${plugin_state_location}/${specs_file}&quot;'" command="sh" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileCPP">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="specsFile">
<runAction arguments="-c 'g++ -E -P -v -dD &quot;${plugin_state_location}/specs.cpp&quot;'" command="sh" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileC">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="specsFile">
<runAction arguments="-c 'gcc -E -P -v -dD &quot;${plugin_state_location}/specs.c&quot;'" command="sh" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
</scannerConfigBuildInfo>
<scannerConfigBuildInfo instanceId="cdt.managedbuild.config.gnu.exe.debug.1041397963;cdt.managedbuild.config.gnu.exe.debug.1041397963.;cdt.managedbuild.tool.gnu.cpp.compiler.exe.debug.2105636557;cdt.managedbuild.tool.gnu.cpp.compiler.input.1816419173">
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileCPP"/>
<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerProjectProfile">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="specsFile">
<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerFileProfile">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="makefileGenerator">
<runAction arguments="-E -P -v -dD" command="" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfile">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="specsFile">
<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileCPP">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="specsFile">
<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.cpp" command="g++" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileC">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="specsFile">
<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.c" command="gcc" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfile">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="specsFile">
<runAction arguments="-c 'gcc -E -P -v -dD &quot;${plugin_state_location}/${specs_file}&quot;'" command="sh" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileCPP">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="specsFile">
<runAction arguments="-c 'g++ -E -P -v -dD &quot;${plugin_state_location}/specs.cpp&quot;'" command="sh" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileC">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="specsFile">
<runAction arguments="-c 'gcc -E -P -v -dD &quot;${plugin_state_location}/specs.c&quot;'" command="sh" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
</scannerConfigBuildInfo>
<scannerConfigBuildInfo instanceId="cdt.managedbuild.config.gnu.exe.release.1597153770;cdt.managedbuild.config.gnu.exe.release.1597153770.;cdt.managedbuild.tool.gnu.c.compiler.exe.release.356890239;cdt.managedbuild.tool.gnu.c.compiler.input.350062030">
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileC"/>
<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerProjectProfile">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="specsFile">
<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerFileProfile">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="makefileGenerator">
<runAction arguments="-E -P -v -dD" command="" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfile">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="specsFile">
<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileCPP">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="specsFile">
<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.cpp" command="g++" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileC">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="specsFile">
<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.c" command="gcc" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfile">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="specsFile">
<runAction arguments="-c 'gcc -E -P -v -dD &quot;${plugin_state_location}/${specs_file}&quot;'" command="sh" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileCPP">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="specsFile">
<runAction arguments="-c 'g++ -E -P -v -dD &quot;${plugin_state_location}/specs.cpp&quot;'" command="sh" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileC">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="specsFile">
<runAction arguments="-c 'gcc -E -P -v -dD &quot;${plugin_state_location}/specs.c&quot;'" command="sh" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
</scannerConfigBuildInfo>
</storageModule>
<storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
<storageModule moduleId="org.eclipse.cdt.core.language.mapping"/>
<storageModule moduleId="org.eclipse.cdt.make.core.buildtargets"/>
@ -532,10 +133,17 @@
</folderInfo>
<sourceEntries>
<entry excluding="include|src" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name=""/>
<entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="include"/>
</sourceEntries>
</configuration>
</storageModule>
<storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
<storageModule moduleId="org.eclipse.cdt.core.language.mapping"/>
<storageModule moduleId="org.eclipse.cdt.make.core.buildtargets"/>
</cconfiguration>
</storageModule>
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
<project id="org.apache.thrift.cdt.managedbuild.target.gnu.exe.1877152611" name="Executable" projectType="cdt.managedbuild.target.gnu.exe"/>
</storageModule>
<storageModule moduleId="scannerConfiguration">
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerProjectProfile">
@ -548,16 +156,6 @@
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerFileProfile">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="makefileGenerator">
<runAction arguments="-E -P -v -dD" command="" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfile">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
@ -588,36 +186,6 @@
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfile">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="specsFile">
<runAction arguments="-c 'gcc -E -P -v -dD &quot;${plugin_state_location}/${specs_file}&quot;'" command="sh" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileCPP">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="specsFile">
<runAction arguments="-c 'g++ -E -P -v -dD &quot;${plugin_state_location}/specs.cpp&quot;'" command="sh" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileC">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="specsFile">
<runAction arguments="-c 'gcc -E -P -v -dD &quot;${plugin_state_location}/specs.c&quot;'" command="sh" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
<scannerConfigBuildInfo instanceId="cdt.managedbuild.config.gnu.exe.release.1597153770;cdt.managedbuild.config.gnu.exe.release.1597153770.;cdt.managedbuild.tool.gnu.cpp.compiler.exe.release.1896544479;cdt.managedbuild.tool.gnu.cpp.compiler.input.1433448968">
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileCPP"/>
<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerProjectProfile">
@ -630,16 +198,6 @@
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerFileProfile">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="makefileGenerator">
<runAction arguments="-E -P -v -dD" command="" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfile">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
@ -670,33 +228,46 @@
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfile">
</scannerConfigBuildInfo>
<scannerConfigBuildInfo instanceId="cdt.managedbuild.config.gnu.exe.debug.1041397963;cdt.managedbuild.config.gnu.exe.debug.1041397963.223874809;cdt.managedbuild.tool.gnu.c.compiler.exe.debug.1568372257;cdt.managedbuild.tool.gnu.c.compiler.input.970279973">
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileC"/>
<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerProjectProfile">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="specsFile">
<runAction arguments="-c 'gcc -E -P -v -dD &quot;${plugin_state_location}/${specs_file}&quot;'" command="sh" useDefault="true"/>
<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileCPP">
<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfile">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="specsFile">
<runAction arguments="-c 'g++ -E -P -v -dD &quot;${plugin_state_location}/specs.cpp&quot;'" command="sh" useDefault="true"/>
<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileC">
<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileCPP">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="specsFile">
<runAction arguments="-c 'gcc -E -P -v -dD &quot;${plugin_state_location}/specs.c&quot;'" command="sh" useDefault="true"/>
<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.cpp" command="g++" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileC">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="specsFile">
<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.c" command="gcc" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
@ -713,16 +284,6 @@
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerFileProfile">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="makefileGenerator">
<runAction arguments="-E -P -v -dD" command="" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfile">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
@ -753,33 +314,46 @@
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfile">
</scannerConfigBuildInfo>
<scannerConfigBuildInfo instanceId="cdt.managedbuild.config.gnu.exe.debug.1041397963;cdt.managedbuild.config.gnu.exe.debug.1041397963.223874809;cdt.managedbuild.tool.gnu.cpp.compiler.exe.debug.665566604;cdt.managedbuild.tool.gnu.cpp.compiler.input.401173715">
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileCPP"/>
<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerProjectProfile">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="specsFile">
<runAction arguments="-c 'gcc -E -P -v -dD &quot;${plugin_state_location}/${specs_file}&quot;'" command="sh" useDefault="true"/>
<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileCPP">
<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfile">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="specsFile">
<runAction arguments="-c 'g++ -E -P -v -dD &quot;${plugin_state_location}/specs.cpp&quot;'" command="sh" useDefault="true"/>
<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileC">
<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileCPP">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="specsFile">
<runAction arguments="-c 'gcc -E -P -v -dD &quot;${plugin_state_location}/specs.c&quot;'" command="sh" useDefault="true"/>
<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.cpp" command="g++" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileC">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="specsFile">
<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.c" command="gcc" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
@ -796,16 +370,6 @@
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerFileProfile">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="makefileGenerator">
<runAction arguments="-E -P -v -dD" command="" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfile">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
@ -836,36 +400,6 @@
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfile">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="specsFile">
<runAction arguments="-c 'gcc -E -P -v -dD &quot;${plugin_state_location}/${specs_file}&quot;'" command="sh" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileCPP">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="specsFile">
<runAction arguments="-c 'g++ -E -P -v -dD &quot;${plugin_state_location}/specs.cpp&quot;'" command="sh" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileC">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="specsFile">
<runAction arguments="-c 'gcc -E -P -v -dD &quot;${plugin_state_location}/specs.c&quot;'" command="sh" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
</scannerConfigBuildInfo>
<scannerConfigBuildInfo instanceId="cdt.managedbuild.config.gnu.exe.release.1597153770;cdt.managedbuild.config.gnu.exe.release.1597153770.;cdt.managedbuild.tool.gnu.c.compiler.exe.release.356890239;cdt.managedbuild.tool.gnu.c.compiler.input.350062030">
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileC"/>
@ -879,16 +413,6 @@
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerFileProfile">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="makefileGenerator">
<runAction arguments="-E -P -v -dD" command="" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfile">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
@ -919,44 +443,6 @@
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfile">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="specsFile">
<runAction arguments="-c 'gcc -E -P -v -dD &quot;${plugin_state_location}/${specs_file}&quot;'" command="sh" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileCPP">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="specsFile">
<runAction arguments="-c 'g++ -E -P -v -dD &quot;${plugin_state_location}/specs.cpp&quot;'" command="sh" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileC">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="specsFile">
<runAction arguments="-c 'gcc -E -P -v -dD &quot;${plugin_state_location}/specs.c&quot;'" command="sh" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
</scannerConfigBuildInfo>
</storageModule>
<storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
<storageModule moduleId="org.eclipse.cdt.core.language.mapping"/>
<storageModule moduleId="org.eclipse.cdt.make.core.buildtargets"/>
</cconfiguration>
</storageModule>
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
<project id="org.apache.thrift.cdt.managedbuild.target.gnu.exe.1877152611" name="Executable" projectType="cdt.managedbuild.target.gnu.exe"/>
</storageModule>
</cproject>

View file

@ -1,80 +0,0 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
#include <thrift/TApplicationException.h>
#include <thrift/protocol/TProtocol.h>
namespace apache { namespace thrift {
uint32_t TApplicationException::read(apache::thrift::protocol::TProtocol* iprot) {
uint32_t xfer = 0;
std::string fname;
apache::thrift::protocol::TType ftype;
int16_t fid;
xfer += iprot->readStructBegin(fname);
while (true) {
xfer += iprot->readFieldBegin(fname, ftype, fid);
if (ftype == apache::thrift::protocol::T_STOP) {
break;
}
switch (fid) {
case 1:
if (ftype == apache::thrift::protocol::T_STRING) {
xfer += iprot->readString(message_);
} else {
xfer += iprot->skip(ftype);
}
break;
case 2:
if (ftype == apache::thrift::protocol::T_I32) {
int32_t type;
xfer += iprot->readI32(type);
type_ = (TApplicationExceptionType)type;
} else {
xfer += iprot->skip(ftype);
}
break;
default:
xfer += iprot->skip(ftype);
break;
}
xfer += iprot->readFieldEnd();
}
xfer += iprot->readStructEnd();
return xfer;
}
uint32_t TApplicationException::write(apache::thrift::protocol::TProtocol* oprot) const {
uint32_t xfer = 0;
xfer += oprot->writeStructBegin("TApplicationException");
xfer += oprot->writeFieldBegin("message", apache::thrift::protocol::T_STRING, 1);
xfer += oprot->writeString(message_);
xfer += oprot->writeFieldEnd();
xfer += oprot->writeFieldBegin("type", apache::thrift::protocol::T_I32, 2);
xfer += oprot->writeI32(type_);
xfer += oprot->writeFieldEnd();
xfer += oprot->writeFieldStop();
xfer += oprot->writeStructEnd();
return xfer;
}
}} // apache::thrift

View file

@ -1,93 +0,0 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
#include <thrift/Thrift.h>
#include <cstring>
#include <cstdlib>
#include <boost/lexical_cast.hpp>
#include <stdarg.h>
#include <stdio.h>
namespace apache { namespace thrift {
TOutput GlobalOutput;
void TOutput::printf(const char *message, ...) {
// Try to reduce heap usage, even if printf is called rarely.
static const int STACK_BUF_SIZE = 256;
char stack_buf[STACK_BUF_SIZE];
va_list ap;
va_start(ap, message);
int need = vsnprintf(stack_buf, STACK_BUF_SIZE, message, ap);
va_end(ap);
if (need < STACK_BUF_SIZE) {
f_(stack_buf);
return;
}
char *heap_buf = (char*)malloc((need+1) * sizeof(char));
if (heap_buf == NULL) {
// Malloc failed. We might as well print the stack buffer.
f_(stack_buf);
return;
}
va_start(ap, message);
int rval = vsnprintf(heap_buf, need+1, message, ap);
va_end(ap);
// TODO(shigin): inform user
if (rval != -1) {
f_(heap_buf);
}
free(heap_buf);
}
void TOutput::perror(const char *message, int errno_copy) {
std::string out = message + strerror_s(errno_copy);
f_(out.c_str());
}
std::string TOutput::strerror_s(int errno_copy) {
#ifndef HAVE_STRERROR_R
return "errno = " + boost::lexical_cast<std::string>(errno_copy);
#else // HAVE_STRERROR_R
char b_errbuf[1024] = { '\0' };
#ifdef STRERROR_R_CHAR_P
char *b_error = strerror_r(errno_copy, b_errbuf, sizeof(b_errbuf));
#else
char *b_error = b_errbuf;
int rv = strerror_r(errno_copy, b_errbuf, sizeof(b_errbuf));
if (rv == -1) {
// strerror_r failed. omgwtfbbq.
return "XSI-compliant strerror_r() failed with errno = " +
boost::lexical_cast<std::string>(errno_copy);
}
#endif
// Can anyone prove that explicit cast is probably not necessary
// to ensure that the string object is constructed before
// b_error becomes invalid?
return std::string(b_error);
#endif // HAVE_STRERROR_R
}
}} // apache::thrift

View file

@ -1,455 +0,0 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
#include <thrift/Thrift.h>
// Do nothing if virtual call profiling is not enabled
#if T_GLOBAL_DEBUG_VIRTUAL > 1
// TODO: This code only works with g++ (since we rely on the fact
// that all std::type_info instances referring to a particular type
// always return the exact same pointer value from name().)
#ifndef __GNUG__
#error "Thrift virtual function profiling currently only works with gcc"
#endif // !__GNUG__
// TODO: We also require glibc for the backtrace() and backtrace_symbols()
// functions.
#ifndef __GLIBC__
#error "Thrift virtual function profiling currently requires glibc"
#endif // !__GLIBC__
#include <thrift/concurrency/Mutex.h>
#include <ext/hash_map>
#include <execinfo.h>
#include <stdio.h>
namespace apache { namespace thrift {
using ::apache::thrift::concurrency::Mutex;
using ::apache::thrift::concurrency::Guard;
static const unsigned int MAX_STACK_DEPTH = 15;
/**
* A stack trace
*/
class Backtrace {
public:
Backtrace(int skip = 0);
Backtrace(Backtrace const &bt);
void operator=(Backtrace const &bt) {
numCallers_ = bt.numCallers_;
if (numCallers_ >= 0) {
memcpy(callers_, bt.callers_, numCallers_ * sizeof(void*));
}
}
bool operator==(Backtrace const &bt) const {
return (cmp(bt) == 0);
}
size_t hash() const {
intptr_t ret = 0;
for (int n = 0; n < numCallers_; ++n) {
ret ^= reinterpret_cast<intptr_t>(callers_[n]);
}
return static_cast<size_t>(ret);
}
int cmp(Backtrace const& bt) const {
int depth_diff = (numCallers_ - bt.numCallers_);
if (depth_diff != 0) {
return depth_diff;
}
for (int n = 0; n < numCallers_; ++n) {
int diff = reinterpret_cast<intptr_t>(callers_[n]) -
reinterpret_cast<intptr_t>(bt.callers_[n]);
if (diff != 0) {
return diff;
}
}
return 0;
}
void print(FILE *f, int indent=0, int start=0) const {
char **strings = backtrace_symbols(callers_, numCallers_);
if (strings) {
start += skip_;
if (start < 0) {
start = 0;
}
for (int n = start; n < numCallers_; ++n) {
fprintf(f, "%*s#%-2d %s\n", indent, "", n, strings[n]);
}
free(strings);
} else {
fprintf(f, "%*s<failed to determine symbols>\n", indent, "");
}
}
int getDepth() const {
return numCallers_ - skip_;
}
void *getFrame(int index) const {
int adjusted_index = index + skip_;
if (adjusted_index < 0 || adjusted_index >= numCallers_) {
return NULL;
}
return callers_[adjusted_index];
}
private:
void *callers_[MAX_STACK_DEPTH];
int numCallers_;
int skip_;
};
// Define the constructors non-inline, so they consistently add a single
// frame to the stack trace, regardless of whether optimization is enabled
Backtrace::Backtrace(int skip)
: skip_(skip + 1) // ignore the constructor itself
{
numCallers_ = backtrace(callers_, MAX_STACK_DEPTH);
if (skip_ > numCallers_) {
skip_ = numCallers_;
}
}
Backtrace::Backtrace(Backtrace const &bt)
: numCallers_(bt.numCallers_)
, skip_(bt.skip_) {
if (numCallers_ >= 0) {
memcpy(callers_, bt.callers_, numCallers_ * sizeof(void*));
}
}
/**
* A backtrace, plus one or two type names
*/
class Key {
public:
class Hash {
public:
size_t operator()(Key const& k) const {
return k.hash();
}
};
Key(const Backtrace* bt, const std::type_info& type_info)
: backtrace_(bt)
, typeName1_(type_info.name())
, typeName2_(NULL) {
}
Key(const Backtrace* bt, const std::type_info& type_info1,
const std::type_info& type_info2)
: backtrace_(bt)
, typeName1_(type_info1.name())
, typeName2_(type_info2.name()) {
}
Key(const Key& k)
: backtrace_(k.backtrace_)
, typeName1_(k.typeName1_)
, typeName2_(k.typeName2_) {
}
void operator=(const Key& k) {
backtrace_ = k.backtrace_;
typeName1_ = k.typeName1_;
typeName2_ = k.typeName2_;
}
const Backtrace* getBacktrace() const {
return backtrace_;
}
const char* getTypeName() const {
return typeName1_;
}
const char* getTypeName2() const {
return typeName2_;
}
void makePersistent() {
// Copy the Backtrace object
backtrace_ = new Backtrace(*backtrace_);
// NOTE: We don't copy the type name.
// The GNU libstdc++ implementation of type_info::name() returns a value
// that will be valid for the lifetime of the program. (Although the C++
// standard doesn't guarantee this will be true on all implementations.)
}
/**
* Clean up memory allocated by makePersistent()
*
* Should only be invoked if makePersistent() has previously been called.
* The Key should no longer be used after cleanup() is called.
*/
void cleanup() {
delete backtrace_;
backtrace_ = NULL;
}
int cmp(const Key& k) const {
int ret = backtrace_->cmp(*k.backtrace_);
if (ret != 0) {
return ret;
}
// NOTE: We compare just the name pointers.
// With GNU libstdc++, every type_info object for the same type points to
// exactly the same name string. (Although this isn't guaranteed by the
// C++ standard.)
ret = k.typeName1_ - typeName1_;
if (ret != 0) {
return ret;
}
return k.typeName2_ - typeName2_;
}
bool operator==(const Key& k) const {
return cmp(k) == 0;
}
size_t hash() const {
// NOTE: As above, we just use the name pointer value.
// Works with GNU libstdc++, but not guaranteed to be correct on all
// implementations.
return backtrace_->hash() ^
reinterpret_cast<size_t>(typeName1_) ^
reinterpret_cast<size_t>(typeName2_);
}
private:
const Backtrace* backtrace_;
const char* typeName1_;
const char* typeName2_;
};
/**
* A functor that determines which of two BacktraceMap entries
* has a higher count.
*/
class CountGreater {
public:
bool operator()(std::pair<Key, size_t> bt1,
std::pair<Key, size_t> bt2) const {
return bt1.second > bt2.second;
}
};
typedef __gnu_cxx::hash_map<Key, size_t, Key::Hash> BacktraceMap;
/**
* A map describing how many times T_VIRTUAL_CALL() has been invoked.
*/
BacktraceMap virtual_calls;
Mutex virtual_calls_mutex;
/**
* A map describing how many times T_GENERIC_PROTOCOL() has been invoked.
*/
BacktraceMap generic_calls;
Mutex generic_calls_mutex;
void _record_backtrace(BacktraceMap* map, const Mutex& mutex, Key *k) {
Guard guard(mutex);
BacktraceMap::iterator it = map->find(*k);
if (it == map->end()) {
k->makePersistent();
map->insert(std::make_pair(*k, 1));
} else {
// increment the count
// NOTE: we could assert if it->second is 0 afterwards, since that would
// mean we've wrapped.
++(it->second);
}
}
/**
* Record an unnecessary virtual function call.
*
* This method is invoked by the T_VIRTUAL_CALL() macro.
*/
void profile_virtual_call(const std::type_info& type) {
int const skip = 1; // ignore this frame
Backtrace bt(skip);
Key k(&bt, type);
_record_backtrace(&virtual_calls, virtual_calls_mutex, &k);
}
/**
* Record a call to a template processor with a protocol that is not the one
* specified in the template parameter.
*
* This method is invoked by the T_GENERIC_PROTOCOL() macro.
*/
void profile_generic_protocol(const std::type_info& template_type,
const std::type_info& prot_type) {
int const skip = 1; // ignore this frame
Backtrace bt(skip);
Key k(&bt, template_type, prot_type);
_record_backtrace(&generic_calls, generic_calls_mutex, &k);
}
/**
* Print the recorded profiling information to the specified file.
*/
void profile_print_info(FILE* f) {
typedef std::vector< std::pair<Key, size_t> > BacktraceVector;
CountGreater is_greater;
// Grab both locks for the duration of the print operation,
// to ensure the output is a consistent snapshot of a single point in time
Guard generic_calls_guard(generic_calls_mutex);
Guard virtual_calls_guard(virtual_calls_mutex);
// print the info from generic_calls, sorted by frequency
//
// We print the generic_calls info ahead of virtual_calls, since it is more
// useful in some cases. All T_GENERIC_PROTOCOL calls can be eliminated
// from most programs. Not all T_VIRTUAL_CALLs will be eliminated by
// converting to templates.
BacktraceVector gp_sorted(generic_calls.begin(), generic_calls.end());
std::sort(gp_sorted.begin(), gp_sorted.end(), is_greater);
for (BacktraceVector::const_iterator it = gp_sorted.begin();
it != gp_sorted.end();
++it) {
Key const &key = it->first;
size_t const count = it->second;
fprintf(f, "T_GENERIC_PROTOCOL: %zu calls to %s with a %s:\n",
count, key.getTypeName(), key.getTypeName2());
key.getBacktrace()->print(f, 2);
fprintf(f, "\n");
}
// print the info from virtual_calls, sorted by frequency
BacktraceVector vc_sorted(virtual_calls.begin(), virtual_calls.end());
std::sort(vc_sorted.begin(), vc_sorted.end(), is_greater);
for (BacktraceVector::const_iterator it = vc_sorted.begin();
it != vc_sorted.end();
++it) {
Key const &key = it->first;
size_t const count = it->second;
fprintf(f, "T_VIRTUAL_CALL: %zu calls on %s:\n", count, key.getTypeName());
key.getBacktrace()->print(f, 2);
fprintf(f, "\n");
}
}
/**
* Print the recorded profiling information to stdout.
*/
void profile_print_info() {
profile_print_info(stdout);
}
/**
* Write a BacktraceMap as Google CPU profiler binary data.
*/
static void profile_write_pprof_file(FILE* f, BacktraceMap const& map) {
// Write the header
uintptr_t header[5] = { 0, 3, 0, 0, 0 };
fwrite(&header, sizeof(header), 1, f);
// Write the profile records
for (BacktraceMap::const_iterator it = map.begin(); it != map.end(); ++it) {
uintptr_t count = it->second;
fwrite(&count, sizeof(count), 1, f);
Backtrace const* bt = it->first.getBacktrace();
uintptr_t num_pcs = bt->getDepth();
fwrite(&num_pcs, sizeof(num_pcs), 1, f);
for (uintptr_t n = 0; n < num_pcs; ++n) {
void* pc = bt->getFrame(n);
fwrite(&pc, sizeof(pc), 1, f);
}
}
// Write the trailer
uintptr_t trailer[3] = { 0, 1, 0 };
fwrite(&trailer, sizeof(trailer), 1, f);
// Write /proc/self/maps
// TODO(simpkins): This only works on linux
FILE *proc_maps = fopen("/proc/self/maps", "r");
if (proc_maps) {
uint8_t buf[4096];
while (true) {
size_t bytes_read = fread(buf, 1, sizeof(buf), proc_maps);
if (bytes_read == 0) {
break;
}
fwrite(buf, 1, bytes_read, f);
}
fclose(proc_maps);
}
}
/**
* Write the recorded profiling information as pprof files.
*
* This writes the information using the Google CPU profiler binary data
* format, so it can be analyzed with pprof. Note that information about the
* protocol/transport data types cannot be stored in this file format.
*
* See http://code.google.com/p/google-perftools/ for more details.
*
* @param gen_calls_f The information about calls to
* profile_generic_protocol() will be written to this
* file.
* @param virtual_calls_f The information about calls to
* profile_virtual_call() will be written to this file.
*/
void profile_write_pprof(FILE* gen_calls_f, FILE* virtual_calls_f) {
typedef std::vector< std::pair<Key, size_t> > BacktraceVector;
CountGreater is_greater;
// Grab both locks for the duration of the print operation,
// to ensure the output is a consistent snapshot of a single point in time
Guard generic_calls_guard(generic_calls_mutex);
Guard virtual_calls_guard(virtual_calls_mutex);
// write the info from generic_calls
profile_write_pprof_file(gen_calls_f, generic_calls);
// write the info from virtual_calls
profile_write_pprof_file(virtual_calls_f, virtual_calls);
}
}} // apache::thrift
#endif // T_GLOBAL_PROFILE_VIRTUAL > 0

View file

@ -1,34 +0,0 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
#include <thrift/async/TAsyncChannel.h>
#include <tr1/functional>
namespace apache { namespace thrift { namespace async {
void TAsyncChannel::sendAndRecvMessage(const VoidCallback& cob,
TMemoryBuffer* sendBuf,
TMemoryBuffer* recvBuf) {
std::tr1::function<void()> send_done =
std::tr1::bind(&TAsyncChannel::recvMessage, this, cob, recvBuf);
sendMessage(send_done, sendBuf);
}
}}} // apache::thrift::async

View file

@ -1,51 +0,0 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
#include "TAsyncProtocolProcessor.h"
using apache::thrift::transport::TBufferBase;
using apache::thrift::protocol::TProtocol;
namespace apache { namespace thrift { namespace async {
void TAsyncProtocolProcessor::process(
std::tr1::function<void(bool healthy)> _return,
boost::shared_ptr<TBufferBase> ibuf,
boost::shared_ptr<TBufferBase> obuf) {
boost::shared_ptr<TProtocol> iprot(pfact_->getProtocol(ibuf));
boost::shared_ptr<TProtocol> oprot(pfact_->getProtocol(obuf));
return underlying_->process(
std::tr1::bind(
&TAsyncProtocolProcessor::finish,
_return,
oprot,
std::tr1::placeholders::_1),
iprot, oprot);
}
/* static */ void TAsyncProtocolProcessor::finish(
std::tr1::function<void(bool healthy)> _return,
boost::shared_ptr<TProtocol> oprot,
bool healthy) {
(void) oprot;
// This is a stub function to hold a reference to oprot.
return _return(healthy);
}
}}} // apache::thrift::async

View file

@ -1,162 +0,0 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
#include "TEvhttpClientChannel.h"
#include <evhttp.h>
#include <thrift/transport/TBufferTransports.h>
#include <thrift/protocol/TProtocolException.h>
#include <iostream>
#include <sstream>
using namespace apache::thrift::protocol;
using apache::thrift::transport::TTransportException;
namespace apache { namespace thrift { namespace async {
TEvhttpClientChannel::TEvhttpClientChannel(
const std::string& host,
const std::string& path,
const char* address,
int port,
struct event_base* eb)
: host_(host)
, path_(path)
, recvBuf_(NULL)
, conn_(NULL)
{
conn_ = evhttp_connection_new(address, port);
if (conn_ == NULL) {
throw TException("evhttp_connection_new failed");
}
evhttp_connection_set_base(conn_, eb);
}
TEvhttpClientChannel::~TEvhttpClientChannel() {
if (conn_ != NULL) {
evhttp_connection_free(conn_);
}
}
void TEvhttpClientChannel::sendAndRecvMessage(
const VoidCallback& cob,
apache::thrift::transport::TMemoryBuffer* sendBuf,
apache::thrift::transport::TMemoryBuffer* recvBuf) {
cob_ = cob;
recvBuf_ = recvBuf;
struct evhttp_request* req = evhttp_request_new(response, this);
if (req == NULL) {
throw TException("evhttp_request_new failed");
}
int rv;
rv = evhttp_add_header(req->output_headers, "Host", host_.c_str());
if (rv != 0) {
throw TException("evhttp_add_header failed");
}
rv = evhttp_add_header(req->output_headers, "Content-Type", "application/x-thrift");
if (rv != 0) {
throw TException("evhttp_add_header failed");
}
uint8_t* obuf;
uint32_t sz;
sendBuf->getBuffer(&obuf, &sz);
rv = evbuffer_add(req->output_buffer, obuf, sz);
if (rv != 0) {
throw TException("evbuffer_add failed");
}
rv = evhttp_make_request(conn_, req, EVHTTP_REQ_POST, path_.c_str());
if (rv != 0) {
throw TException("evhttp_make_request failed");
}
}
void TEvhttpClientChannel::sendMessage(
const VoidCallback& cob, apache::thrift::transport::TMemoryBuffer* message) {
(void) cob;
(void) message;
throw TProtocolException(TProtocolException::NOT_IMPLEMENTED,
"Unexpected call to TEvhttpClientChannel::sendMessage");
}
void TEvhttpClientChannel::recvMessage(
const VoidCallback& cob, apache::thrift::transport::TMemoryBuffer* message) {
(void) cob;
(void) message;
throw TProtocolException(TProtocolException::NOT_IMPLEMENTED,
"Unexpected call to TEvhttpClientChannel::recvMessage");
}
void TEvhttpClientChannel::finish(struct evhttp_request* req) {
if (req == NULL) {
try {
cob_();
} catch(const TTransportException& e) {
if(e.getType() == TTransportException::END_OF_FILE)
throw TException("connect failed");
else
throw;
}
return;
} else if (req->response_code != 200) {
try {
cob_();
} catch(const TTransportException& e) {
std::stringstream ss;
ss << "server returned code " << req->response_code;
if(req->response_code_line)
ss << ": " << req->response_code_line;
if(e.getType() == TTransportException::END_OF_FILE)
throw TException(ss.str());
else
throw;
}
return;
}
recvBuf_->resetBuffer(
EVBUFFER_DATA(req->input_buffer),
EVBUFFER_LENGTH(req->input_buffer));
cob_();
return;
}
/* static */ void TEvhttpClientChannel::response(struct evhttp_request* req, void* arg) {
TEvhttpClientChannel* self = (TEvhttpClientChannel*)arg;
try {
self->finish(req);
} catch(std::exception& e) {
// don't propagate a C++ exception in C code (e.g. libevent)
std::cerr << "TEvhttpClientChannel::response exception thrown (ignored): " << e.what() << std::endl;
}
}
}}} // apache::thrift::async

View file

@ -1,169 +0,0 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
#include "TEvhttpServer.h"
#include "TAsyncBufferProcessor.h"
#include <thrift/transport/TBufferTransports.h>
#include <evhttp.h>
#include <iostream>
#ifndef HTTP_INTERNAL // libevent < 2
#define HTTP_INTERNAL 500
#endif
using apache::thrift::transport::TMemoryBuffer;
namespace apache { namespace thrift { namespace async {
struct TEvhttpServer::RequestContext {
struct evhttp_request* req;
boost::shared_ptr<apache::thrift::transport::TMemoryBuffer> ibuf;
boost::shared_ptr<apache::thrift::transport::TMemoryBuffer> obuf;
RequestContext(struct evhttp_request* req);
};
TEvhttpServer::TEvhttpServer(boost::shared_ptr<TAsyncBufferProcessor> processor)
: processor_(processor)
, eb_(NULL)
, eh_(NULL)
{}
TEvhttpServer::TEvhttpServer(boost::shared_ptr<TAsyncBufferProcessor> processor, int port)
: processor_(processor)
, eb_(NULL)
, eh_(NULL)
{
// Create event_base and evhttp.
eb_ = event_base_new();
if (eb_ == NULL) {
throw TException("event_base_new failed");
}
eh_ = evhttp_new(eb_);
if (eh_ == NULL) {
event_base_free(eb_);
throw TException("evhttp_new failed");
}
// Bind to port.
int ret = evhttp_bind_socket(eh_, NULL, port);
if (ret < 0) {
evhttp_free(eh_);
event_base_free(eb_);
throw TException("evhttp_bind_socket failed");
}
// Register a handler. If you use the other constructor,
// you will want to do this yourself.
// Don't forget to unregister before destorying this TEvhttpServer.
evhttp_set_cb(eh_, "/", request, (void*)this);
}
TEvhttpServer::~TEvhttpServer() {
if (eh_ != NULL) {
evhttp_free(eh_);
}
if (eb_ != NULL) {
event_base_free(eb_);
}
}
int TEvhttpServer::serve() {
if (eb_ == NULL) {
throw TException("Unexpected call to TEvhttpServer::serve");
}
return event_base_dispatch(eb_);
}
TEvhttpServer::RequestContext::RequestContext(struct evhttp_request* req) : req(req)
, ibuf(new TMemoryBuffer(EVBUFFER_DATA(req->input_buffer), EVBUFFER_LENGTH(req->input_buffer)))
, obuf(new TMemoryBuffer())
{}
void TEvhttpServer::request(struct evhttp_request* req, void* self) {
try {
static_cast<TEvhttpServer*>(self)->process(req);
} catch(std::exception& e) {
evhttp_send_reply(req, HTTP_INTERNAL, e.what(), 0);
}
}
void TEvhttpServer::process(struct evhttp_request* req) {
RequestContext* ctx = new RequestContext(req);
return processor_->process(
std::tr1::bind(
&TEvhttpServer::complete,
this,
ctx,
std::tr1::placeholders::_1),
ctx->ibuf,
ctx->obuf);
}
void TEvhttpServer::complete(RequestContext* ctx, bool success) {
(void) success;
std::auto_ptr<RequestContext> ptr(ctx);
int code = success ? 200 : 400;
const char* reason = success ? "OK" : "Bad Request";
int rv = evhttp_add_header(ctx->req->output_headers, "Content-Type", "application/x-thrift");
if (rv != 0) {
// TODO: Log an error.
std::cerr << "evhttp_add_header failed " << __FILE__ << ":" << __LINE__ << std::endl;
}
struct evbuffer* buf = evbuffer_new();
if (buf == NULL) {
// TODO: Log an error.
std::cerr << "evbuffer_new failed " << __FILE__ << ":" << __LINE__ << std::endl;
} else {
uint8_t* obuf;
uint32_t sz;
ctx->obuf->getBuffer(&obuf, &sz);
int ret = evbuffer_add(buf, obuf, sz);
if (ret != 0) {
// TODO: Log an error.
std::cerr << "evhttp_add failed with " << ret << " " << __FILE__ << ":" << __LINE__ << std::endl;
}
}
evhttp_send_reply(ctx->req, code, reason, buf);
if (buf != NULL) {
evbuffer_free(buf);
}
}
struct event_base* TEvhttpServer::getEventBase() {
return eb_;
}
}}} // apache::thrift::async

View file

@ -1,198 +0,0 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#include "Monitor.h"
#include "Exception.h"
#include "Util.h"
#include <assert.h>
#include <errno.h>
#include <boost/scoped_ptr.hpp>
#include <boost/thread.hpp>
#include <boost/date_time/posix_time/posix_time.hpp>
namespace apache { namespace thrift { namespace concurrency {
/**
* Monitor implementation using the boost thread library
*
* @version $Id:$
*/
class Monitor::Impl : public boost::condition_variable_any {
public:
Impl()
: ownedMutex_(new Mutex()),
mutex_(NULL) {
init(ownedMutex_.get());
}
Impl(Mutex* mutex)
: mutex_(NULL) {
init(mutex);
}
Impl(Monitor* monitor)
: mutex_(NULL) {
init(&(monitor->mutex()));
}
Mutex& mutex() { return *mutex_; }
void lock() { mutex().lock(); }
void unlock() { mutex().unlock(); }
/**
* Exception-throwing version of waitForTimeRelative(), called simply
* wait(int64) for historical reasons. Timeout is in milliseconds.
*
* If the condition occurs, this function returns cleanly; on timeout or
* error an exception is thrown.
*/
void wait(int64_t timeout_ms) {
int result = waitForTimeRelative(timeout_ms);
if (result == ETIMEDOUT) {
throw TimedOutException();
} else if (result != 0) {
throw TException(
"Monitor::wait() failed");
}
}
/**
* Waits until the specified timeout in milliseconds for the condition to
* occur, or waits forever if timeout_ms == 0.
*
* Returns 0 if condition occurs, ETIMEDOUT on timeout, or an error code.
*/
int waitForTimeRelative(int64_t timeout_ms) {
if (timeout_ms == 0LL) {
return waitForever();
}
assert(mutex_);
boost::timed_mutex* mutexImpl =
reinterpret_cast<boost::timed_mutex*>(mutex_->getUnderlyingImpl());
assert(mutexImpl);
boost::timed_mutex::scoped_lock lock(*mutexImpl, boost::adopt_lock);
int res = timed_wait(lock, boost::get_system_time()+boost::posix_time::milliseconds(timeout_ms)) ? 0 : ETIMEDOUT;
lock.release();
return res;
}
/**
* Waits until the absolute time specified using struct timespec.
* Returns 0 if condition occurs, ETIMEDOUT on timeout, or an error code.
*/
int waitForTime(const timespec* abstime) {
assert(mutex_);
boost::timed_mutex* mutexImpl =
reinterpret_cast<boost::timed_mutex*>(mutex_->getUnderlyingImpl());
assert(mutexImpl);
struct timespec currenttime;
Util::toTimespec(currenttime, Util::currentTime());
long tv_sec = static_cast<long>(abstime->tv_sec - currenttime.tv_sec);
long tv_nsec = static_cast<long>(abstime->tv_nsec - currenttime.tv_nsec);
if(tv_sec < 0)
tv_sec = 0;
if(tv_nsec < 0)
tv_nsec = 0;
boost::timed_mutex::scoped_lock lock(*mutexImpl, boost::adopt_lock);
int res = timed_wait(lock, boost::get_system_time() +
boost::posix_time::seconds(tv_sec) +
boost::posix_time::microseconds(tv_nsec / 1000)
) ? 0 : ETIMEDOUT;
lock.release();
return res;
}
/**
* Waits forever until the condition occurs.
* Returns 0 if condition occurs, or an error code otherwise.
*/
int waitForever() {
assert(mutex_);
boost::timed_mutex* mutexImpl =
reinterpret_cast<boost::timed_mutex*>(mutex_->getUnderlyingImpl());
assert(mutexImpl);
boost::timed_mutex::scoped_lock lock(*mutexImpl, boost::adopt_lock);
((boost::condition_variable_any*)this)->wait(lock);
lock.release();
return 0;
}
void notify() {
notify_one();
}
void notifyAll() {
notify_all();
}
private:
void init(Mutex* mutex) {
mutex_ = mutex;
}
boost::scoped_ptr<Mutex> ownedMutex_;
Mutex* mutex_;
};
Monitor::Monitor() : impl_(new Monitor::Impl()) {}
Monitor::Monitor(Mutex* mutex) : impl_(new Monitor::Impl(mutex)) {}
Monitor::Monitor(Monitor* monitor) : impl_(new Monitor::Impl(monitor)) {}
Monitor::~Monitor() { delete impl_; }
Mutex& Monitor::mutex() const { return const_cast<Monitor::Impl*>(impl_)->mutex(); }
void Monitor::lock() const { const_cast<Monitor::Impl*>(impl_)->lock(); }
void Monitor::unlock() const { const_cast<Monitor::Impl*>(impl_)->unlock(); }
void Monitor::wait(int64_t timeout) const { const_cast<Monitor::Impl*>(impl_)->wait(timeout); }
int Monitor::waitForTime(const timespec* abstime) const {
return const_cast<Monitor::Impl*>(impl_)->waitForTime(abstime);
}
int Monitor::waitForTimeRelative(int64_t timeout_ms) const {
return const_cast<Monitor::Impl*>(impl_)->waitForTimeRelative(timeout_ms);
}
int Monitor::waitForever() const {
return const_cast<Monitor::Impl*>(impl_)->waitForever();
}
void Monitor::notify() const { const_cast<Monitor::Impl*>(impl_)->notify(); }
void Monitor::notifyAll() const { const_cast<Monitor::Impl*>(impl_)->notifyAll(); }
}}} // apache::thrift::concurrency

View file

@ -1,57 +0,0 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#include "Mutex.h"
#include "Util.h"
#include <cassert>
#include <boost/thread.hpp>
#include <boost/thread/mutex.hpp>
#include <boost/date_time/posix_time/posix_time.hpp>
namespace apache { namespace thrift { namespace concurrency {
/**
* Implementation of Mutex class using boost interprocess mutex
*
* @version $Id:$
*/
class Mutex::impl : public boost::timed_mutex {
};
Mutex::Mutex(Initializer init) : impl_(new Mutex::impl()) {}
void* Mutex::getUnderlyingImpl() const { return impl_.get(); }
void Mutex::lock() const { impl_->lock(); }
bool Mutex::trylock() const { return impl_->try_lock(); }
bool Mutex::timedlock(int64_t ms) const { return impl_->timed_lock(boost::get_system_time()+boost::posix_time::milliseconds(ms)); }
void Mutex::unlock() const { impl_->unlock(); }
void Mutex::DEFAULT_INITIALIZER(void* arg) {
}
}}} // apache::thrift::concurrency

View file

@ -1,181 +0,0 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#include "BoostThreadFactory.h"
#include "Exception.h"
#include <cassert>
#include <boost/weak_ptr.hpp>
#include <boost/thread.hpp>
namespace apache { namespace thrift { namespace concurrency {
using boost::shared_ptr;
using boost::weak_ptr;
/**
* The boost thread class.
*
* @version $Id:$
*/
class BoostThread: public Thread {
public:
enum STATE {
uninitialized,
starting,
started,
stopping,
stopped
};
static void* threadMain(void* arg);
private:
std::auto_ptr<boost::thread> thread_;
STATE state_;
weak_ptr<BoostThread> self_;
bool detached_;
public:
BoostThread(bool detached, shared_ptr<Runnable> runnable) :
state_(uninitialized),
detached_(detached) {
this->Thread::runnable(runnable);
}
~BoostThread() {
if(!detached_) {
try {
join();
} catch(...) {
// We're really hosed.
}
}
}
void start() {
if (state_ != uninitialized) {
return;
}
// Create reference
shared_ptr<BoostThread>* selfRef = new shared_ptr<BoostThread>();
*selfRef = self_.lock();
state_ = starting;
thread_ = std::auto_ptr<boost::thread>(new boost::thread(boost::bind(threadMain, (void*)selfRef)));
if(detached_)
thread_->detach();
}
void join() {
if (!detached_ && state_ != uninitialized) {
thread_->join();
}
}
Thread::id_t getId() {
return thread_.get() ? thread_->get_id() : boost::thread::id();
}
shared_ptr<Runnable> runnable() const { return Thread::runnable(); }
void runnable(shared_ptr<Runnable> value) { Thread::runnable(value); }
void weakRef(shared_ptr<BoostThread> self) {
assert(self.get() == this);
self_ = weak_ptr<BoostThread>(self);
}
};
void* BoostThread::threadMain(void* arg) {
shared_ptr<BoostThread> thread = *(shared_ptr<BoostThread>*)arg;
delete reinterpret_cast<shared_ptr<BoostThread>*>(arg);
if (thread == NULL) {
return (void*)0;
}
if (thread->state_ != starting) {
return (void*)0;
}
thread->state_ = started;
thread->runnable()->run();
if (thread->state_ != stopping && thread->state_ != stopped) {
thread->state_ = stopping;
}
return (void*)0;
}
/**
* POSIX Thread factory implementation
*/
class BoostThreadFactory::Impl {
private:
bool detached_;
public:
Impl(bool detached) :
detached_(detached) {}
/**
* Creates a new POSIX thread to run the runnable object
*
* @param runnable A runnable object
*/
shared_ptr<Thread> newThread(shared_ptr<Runnable> runnable) const {
shared_ptr<BoostThread> result = shared_ptr<BoostThread>(new BoostThread(detached_, runnable));
result->weakRef(result);
runnable->thread(result);
return result;
}
bool isDetached() const { return detached_; }
void setDetached(bool value) { detached_ = value; }
Thread::id_t getCurrentThreadId() const {
return boost::this_thread::get_id();
}
};
BoostThreadFactory::BoostThreadFactory(bool detached) :
impl_(new BoostThreadFactory::Impl(detached)) {}
shared_ptr<Thread> BoostThreadFactory::newThread(shared_ptr<Runnable> runnable) const { return impl_->newThread(runnable); }
bool BoostThreadFactory::isDetached() const { return impl_->isDetached(); }
void BoostThreadFactory::setDetached(bool value) { impl_->setDetached(value); }
Thread::id_t BoostThreadFactory::getCurrentThreadId() const { return impl_->getCurrentThreadId(); }
}}} // apache::thrift::concurrency

View file

@ -1,208 +0,0 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
#include "Monitor.h"
#include "Exception.h"
#include "Util.h"
#include <boost/scoped_ptr.hpp>
#include <assert.h>
#include <errno.h>
#include <iostream>
#include <pthread.h>
namespace apache { namespace thrift { namespace concurrency {
using boost::scoped_ptr;
/**
* Monitor implementation using the POSIX pthread library
*
* @version $Id:$
*/
class Monitor::Impl {
public:
Impl()
: ownedMutex_(new Mutex()),
mutex_(NULL),
condInitialized_(false) {
init(ownedMutex_.get());
}
Impl(Mutex* mutex)
: mutex_(NULL),
condInitialized_(false) {
init(mutex);
}
Impl(Monitor* monitor)
: mutex_(NULL),
condInitialized_(false) {
init(&(monitor->mutex()));
}
~Impl() { cleanup(); }
Mutex& mutex() { return *mutex_; }
void lock() { mutex().lock(); }
void unlock() { mutex().unlock(); }
/**
* Exception-throwing version of waitForTimeRelative(), called simply
* wait(int64) for historical reasons. Timeout is in milliseconds.
*
* If the condition occurs, this function returns cleanly; on timeout or
* error an exception is thrown.
*/
void wait(int64_t timeout_ms) const {
int result = waitForTimeRelative(timeout_ms);
if (result == ETIMEDOUT) {
// pthread_cond_timedwait has been observed to return early on
// various platforms, so comment out this assert.
//assert(Util::currentTime() >= (now + timeout));
throw TimedOutException();
} else if (result != 0) {
throw TException(
"pthread_cond_wait() or pthread_cond_timedwait() failed");
}
}
/**
* Waits until the specified timeout in milliseconds for the condition to
* occur, or waits forever if timeout_ms == 0.
*
* Returns 0 if condition occurs, ETIMEDOUT on timeout, or an error code.
*/
int waitForTimeRelative(int64_t timeout_ms) const {
if (timeout_ms == 0LL) {
return waitForever();
}
struct timespec abstime;
Util::toTimespec(abstime, Util::currentTime() + timeout_ms);
return waitForTime(&abstime);
}
/**
* Waits until the absolute time specified using struct timespec.
* Returns 0 if condition occurs, ETIMEDOUT on timeout, or an error code.
*/
int waitForTime(const timespec* abstime) const {
assert(mutex_);
pthread_mutex_t* mutexImpl =
reinterpret_cast<pthread_mutex_t*>(mutex_->getUnderlyingImpl());
assert(mutexImpl);
// XXX Need to assert that caller owns mutex
return pthread_cond_timedwait(&pthread_cond_,
mutexImpl,
abstime);
}
/**
* Waits forever until the condition occurs.
* Returns 0 if condition occurs, or an error code otherwise.
*/
int waitForever() const {
assert(mutex_);
pthread_mutex_t* mutexImpl =
reinterpret_cast<pthread_mutex_t*>(mutex_->getUnderlyingImpl());
assert(mutexImpl);
return pthread_cond_wait(&pthread_cond_, mutexImpl);
}
void notify() {
// XXX Need to assert that caller owns mutex
int iret = pthread_cond_signal(&pthread_cond_);
assert(iret == 0);
}
void notifyAll() {
// XXX Need to assert that caller owns mutex
int iret = pthread_cond_broadcast(&pthread_cond_);
assert(iret == 0);
}
private:
void init(Mutex* mutex) {
mutex_ = mutex;
if (pthread_cond_init(&pthread_cond_, NULL) == 0) {
condInitialized_ = true;
}
if (!condInitialized_) {
cleanup();
throw SystemResourceException();
}
}
void cleanup() {
if (condInitialized_) {
condInitialized_ = false;
int iret = pthread_cond_destroy(&pthread_cond_);
assert(iret == 0);
}
}
scoped_ptr<Mutex> ownedMutex_;
Mutex* mutex_;
mutable pthread_cond_t pthread_cond_;
mutable bool condInitialized_;
};
Monitor::Monitor() : impl_(new Monitor::Impl()) {}
Monitor::Monitor(Mutex* mutex) : impl_(new Monitor::Impl(mutex)) {}
Monitor::Monitor(Monitor* monitor) : impl_(new Monitor::Impl(monitor)) {}
Monitor::~Monitor() { delete impl_; }
Mutex& Monitor::mutex() const { return impl_->mutex(); }
void Monitor::lock() const { impl_->lock(); }
void Monitor::unlock() const { impl_->unlock(); }
void Monitor::wait(int64_t timeout) const { impl_->wait(timeout); }
int Monitor::waitForTime(const timespec* abstime) const {
return impl_->waitForTime(abstime);
}
int Monitor::waitForTimeRelative(int64_t timeout_ms) const {
return impl_->waitForTimeRelative(timeout_ms);
}
int Monitor::waitForever() const {
return impl_->waitForever();
}
void Monitor::notify() const { impl_->notify(); }
void Monitor::notifyAll() const { impl_->notifyAll(); }
}}} // apache::thrift::concurrency

View file

@ -1,348 +0,0 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#include "Mutex.h"
#include "Util.h"
#include <assert.h>
#ifdef HAVE_PTHREAD_H
#include <pthread.h>
#endif
#include <signal.h>
using boost::shared_ptr;
namespace apache { namespace thrift { namespace concurrency {
#ifndef THRIFT_NO_CONTENTION_PROFILING
static sig_atomic_t mutexProfilingSampleRate = 0;
static MutexWaitCallback mutexProfilingCallback = 0;
volatile static sig_atomic_t mutexProfilingCounter = 0;
void enableMutexProfiling(int32_t profilingSampleRate,
MutexWaitCallback callback) {
mutexProfilingSampleRate = profilingSampleRate;
mutexProfilingCallback = callback;
}
#define PROFILE_MUTEX_START_LOCK() \
int64_t _lock_startTime = maybeGetProfilingStartTime();
#define PROFILE_MUTEX_NOT_LOCKED() \
do { \
if (_lock_startTime > 0) { \
int64_t endTime = Util::currentTimeUsec(); \
(*mutexProfilingCallback)(this, endTime - _lock_startTime); \
} \
} while (0)
#define PROFILE_MUTEX_LOCKED() \
do { \
profileTime_ = _lock_startTime; \
if (profileTime_ > 0) { \
profileTime_ = Util::currentTimeUsec() - profileTime_; \
} \
} while (0)
#define PROFILE_MUTEX_START_UNLOCK() \
int64_t _temp_profileTime = profileTime_; \
profileTime_ = 0;
#define PROFILE_MUTEX_UNLOCKED() \
do { \
if (_temp_profileTime > 0) { \
(*mutexProfilingCallback)(this, _temp_profileTime); \
} \
} while (0)
static inline int64_t maybeGetProfilingStartTime() {
if (mutexProfilingSampleRate && mutexProfilingCallback) {
// This block is unsynchronized, but should produce a reasonable sampling
// rate on most architectures. The main race conditions are the gap
// between the decrement and the test, the non-atomicity of decrement, and
// potential caching of different values at different CPUs.
//
// - if two decrements race, the likeliest result is that the counter
// decrements slowly (perhaps much more slowly) than intended.
//
// - many threads could potentially decrement before resetting the counter
// to its large value, causing each additional incoming thread to
// profile every call. This situation is unlikely to persist for long
// as the critical gap is quite short, but profiling could be bursty.
sig_atomic_t localValue = --mutexProfilingCounter;
if (localValue <= 0) {
mutexProfilingCounter = mutexProfilingSampleRate;
return Util::currentTimeUsec();
}
}
return 0;
}
#else
# define PROFILE_MUTEX_START_LOCK()
# define PROFILE_MUTEX_NOT_LOCKED()
# define PROFILE_MUTEX_LOCKED()
# define PROFILE_MUTEX_START_UNLOCK()
# define PROFILE_MUTEX_UNLOCKED()
#endif // THRIFT_NO_CONTENTION_PROFILING
/**
* Implementation of Mutex class using POSIX mutex
*
* @version $Id:$
*/
class Mutex::impl {
public:
impl(Initializer init) : initialized_(false) {
#ifndef THRIFT_NO_CONTENTION_PROFILING
profileTime_ = 0;
#endif
init(&pthread_mutex_);
initialized_ = true;
}
~impl() {
if (initialized_) {
initialized_ = false;
int ret = pthread_mutex_destroy(&pthread_mutex_);
assert(ret == 0);
}
}
void lock() const {
PROFILE_MUTEX_START_LOCK();
pthread_mutex_lock(&pthread_mutex_);
PROFILE_MUTEX_LOCKED();
}
bool trylock() const { return (0 == pthread_mutex_trylock(&pthread_mutex_)); }
bool timedlock(int64_t milliseconds) const {
#if defined(_POSIX_TIMEOUTS) && _POSIX_TIMEOUTS >= 200112L
PROFILE_MUTEX_START_LOCK();
struct timespec ts;
Util::toTimespec(ts, milliseconds + Util::currentTime());
int ret = pthread_mutex_timedlock(&pthread_mutex_, &ts);
if (ret == 0) {
PROFILE_MUTEX_LOCKED();
return true;
}
PROFILE_MUTEX_NOT_LOCKED();
return false;
#else
/* Otherwise follow solution used by Mono for Android */
struct timespec sleepytime, now, to;
/* This is just to avoid a completely busy wait */
sleepytime.tv_sec = 0;
sleepytime.tv_nsec = 10000000L; /* 10ms */
Util::toTimespec(to, milliseconds + Util::currentTime());
while ((trylock()) == false) {
Util::toTimespec(now, Util::currentTime());
if (now.tv_sec >= to.tv_sec && now.tv_nsec >= to.tv_nsec) {
return false;
}
nanosleep(&sleepytime, NULL);
}
return true;
#endif
}
void unlock() const {
PROFILE_MUTEX_START_UNLOCK();
pthread_mutex_unlock(&pthread_mutex_);
PROFILE_MUTEX_UNLOCKED();
}
void* getUnderlyingImpl() const { return (void*) &pthread_mutex_; }
private:
mutable pthread_mutex_t pthread_mutex_;
mutable bool initialized_;
#ifndef THRIFT_NO_CONTENTION_PROFILING
mutable int64_t profileTime_;
#endif
};
Mutex::Mutex(Initializer init) : impl_(new Mutex::impl(init)) {}
void* Mutex::getUnderlyingImpl() const { return impl_->getUnderlyingImpl(); }
void Mutex::lock() const { impl_->lock(); }
bool Mutex::trylock() const { return impl_->trylock(); }
bool Mutex::timedlock(int64_t ms) const { return impl_->timedlock(ms); }
void Mutex::unlock() const { impl_->unlock(); }
void Mutex::DEFAULT_INITIALIZER(void* arg) {
pthread_mutex_t* pthread_mutex = (pthread_mutex_t*)arg;
int ret = pthread_mutex_init(pthread_mutex, NULL);
assert(ret == 0);
}
#if defined(PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP) || defined(PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP)
static void init_with_kind(pthread_mutex_t* mutex, int kind) {
pthread_mutexattr_t mutexattr;
int ret = pthread_mutexattr_init(&mutexattr);
assert(ret == 0);
// Apparently, this can fail. Should we really be aborting?
ret = pthread_mutexattr_settype(&mutexattr, kind);
assert(ret == 0);
ret = pthread_mutex_init(mutex, &mutexattr);
assert(ret == 0);
ret = pthread_mutexattr_destroy(&mutexattr);
assert(ret == 0);
}
#endif
#ifdef PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP
void Mutex::ADAPTIVE_INITIALIZER(void* arg) {
// From mysql source: mysys/my_thr_init.c
// Set mutex type to "fast" a.k.a "adaptive"
//
// In this case the thread may steal the mutex from some other thread
// that is waiting for the same mutex. This will save us some
// context switches but may cause a thread to 'starve forever' while
// waiting for the mutex (not likely if the code within the mutex is
// short).
init_with_kind((pthread_mutex_t*)arg, PTHREAD_MUTEX_ADAPTIVE_NP);
}
#endif
#ifdef PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP
void Mutex::RECURSIVE_INITIALIZER(void* arg) {
init_with_kind((pthread_mutex_t*)arg, PTHREAD_MUTEX_RECURSIVE_NP);
}
#endif
/**
* Implementation of ReadWriteMutex class using POSIX rw lock
*
* @version $Id:$
*/
class ReadWriteMutex::impl {
public:
impl() : initialized_(false) {
#ifndef THRIFT_NO_CONTENTION_PROFILING
profileTime_ = 0;
#endif
int ret = pthread_rwlock_init(&rw_lock_, NULL);
assert(ret == 0);
initialized_ = true;
}
~impl() {
if(initialized_) {
initialized_ = false;
int ret = pthread_rwlock_destroy(&rw_lock_);
assert(ret == 0);
}
}
void acquireRead() const {
PROFILE_MUTEX_START_LOCK();
pthread_rwlock_rdlock(&rw_lock_);
PROFILE_MUTEX_NOT_LOCKED(); // not exclusive, so use not-locked path
}
void acquireWrite() const {
PROFILE_MUTEX_START_LOCK();
pthread_rwlock_wrlock(&rw_lock_);
PROFILE_MUTEX_LOCKED();
}
bool attemptRead() const { return !pthread_rwlock_tryrdlock(&rw_lock_); }
bool attemptWrite() const { return !pthread_rwlock_trywrlock(&rw_lock_); }
void release() const {
PROFILE_MUTEX_START_UNLOCK();
pthread_rwlock_unlock(&rw_lock_);
PROFILE_MUTEX_UNLOCKED();
}
private:
mutable pthread_rwlock_t rw_lock_;
mutable bool initialized_;
#ifndef THRIFT_NO_CONTENTION_PROFILING
mutable int64_t profileTime_;
#endif
};
ReadWriteMutex::ReadWriteMutex() : impl_(new ReadWriteMutex::impl()) {}
void ReadWriteMutex::acquireRead() const { impl_->acquireRead(); }
void ReadWriteMutex::acquireWrite() const { impl_->acquireWrite(); }
bool ReadWriteMutex::attemptRead() const { return impl_->attemptRead(); }
bool ReadWriteMutex::attemptWrite() const { return impl_->attemptWrite(); }
void ReadWriteMutex::release() const { impl_->release(); }
NoStarveReadWriteMutex::NoStarveReadWriteMutex() : writerWaiting_(false) {}
void NoStarveReadWriteMutex::acquireRead() const
{
if (writerWaiting_) {
// writer is waiting, block on the writer's mutex until he's done with it
mutex_.lock();
mutex_.unlock();
}
ReadWriteMutex::acquireRead();
}
void NoStarveReadWriteMutex::acquireWrite() const
{
// if we can acquire the rwlock the easy way, we're done
if (attemptWrite()) {
return;
}
// failed to get the rwlock, do it the hard way:
// locking the mutex and setting writerWaiting will cause all new readers to
// block on the mutex rather than on the rwlock.
mutex_.lock();
writerWaiting_ = true;
ReadWriteMutex::acquireWrite();
writerWaiting_ = false;
mutex_.unlock();
}
}}} // apache::thrift::concurrency

View file

@ -1,342 +0,0 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#include "PosixThreadFactory.h"
#include "Exception.h"
#if GOOGLE_PERFTOOLS_REGISTER_THREAD
# include <google/profiler.h>
#endif
#include <assert.h>
#include <pthread.h>
#include <iostream>
#include <boost/weak_ptr.hpp>
namespace apache { namespace thrift { namespace concurrency {
using boost::shared_ptr;
using boost::weak_ptr;
/**
* The POSIX thread class.
*
* @version $Id:$
*/
class PthreadThread: public Thread {
public:
enum STATE {
uninitialized,
starting,
started,
stopping,
stopped
};
static const int MB = 1024 * 1024;
static void* threadMain(void* arg);
private:
pthread_t pthread_;
STATE state_;
int policy_;
int priority_;
int stackSize_;
weak_ptr<PthreadThread> self_;
bool detached_;
public:
PthreadThread(int policy, int priority, int stackSize, bool detached, shared_ptr<Runnable> runnable) :
#ifndef _WIN32
pthread_(0),
#endif // _WIN32
state_(uninitialized),
policy_(policy),
priority_(priority),
stackSize_(stackSize),
detached_(detached) {
this->Thread::runnable(runnable);
}
~PthreadThread() {
/* Nothing references this thread, if is is not detached, do a join
now, otherwise the thread-id and, possibly, other resources will
be leaked. */
if(!detached_) {
try {
join();
} catch(...) {
// We're really hosed.
}
}
}
void start() {
if (state_ != uninitialized) {
return;
}
pthread_attr_t thread_attr;
if (pthread_attr_init(&thread_attr) != 0) {
throw SystemResourceException("pthread_attr_init failed");
}
if(pthread_attr_setdetachstate(&thread_attr,
detached_ ?
PTHREAD_CREATE_DETACHED :
PTHREAD_CREATE_JOINABLE) != 0) {
throw SystemResourceException("pthread_attr_setdetachstate failed");
}
// Set thread stack size
if (pthread_attr_setstacksize(&thread_attr, MB * stackSize_) != 0) {
throw SystemResourceException("pthread_attr_setstacksize failed");
}
// Set thread policy
#ifdef _WIN32
//WIN32 Pthread implementation doesn't seem to support sheduling policies other then PosixThreadFactory::OTHER - runtime error
policy_ = PosixThreadFactory::OTHER;
#endif
if (pthread_attr_setschedpolicy(&thread_attr, policy_) != 0) {
throw SystemResourceException("pthread_attr_setschedpolicy failed");
}
struct sched_param sched_param;
sched_param.sched_priority = priority_;
// Set thread priority
if (pthread_attr_setschedparam(&thread_attr, &sched_param) != 0) {
throw SystemResourceException("pthread_attr_setschedparam failed");
}
// Create reference
shared_ptr<PthreadThread>* selfRef = new shared_ptr<PthreadThread>();
*selfRef = self_.lock();
state_ = starting;
if (pthread_create(&pthread_, &thread_attr, threadMain, (void*)selfRef) != 0) {
throw SystemResourceException("pthread_create failed");
}
}
void join() {
if (!detached_ && state_ != uninitialized) {
void* ignore;
/* XXX
If join fails it is most likely due to the fact
that the last reference was the thread itself and cannot
join. This results in leaked threads and will eventually
cause the process to run out of thread resources.
We're beyond the point of throwing an exception. Not clear how
best to handle this. */
int res = pthread_join(pthread_, &ignore);
detached_ = (res == 0);
if (res != 0) {
GlobalOutput.printf("PthreadThread::join(): fail with code %d", res);
}
} else {
GlobalOutput.printf("PthreadThread::join(): detached thread");
}
}
Thread::id_t getId() {
#ifndef _WIN32
return (Thread::id_t)pthread_;
#else
return (Thread::id_t)pthread_.p;
#endif // _WIN32
}
shared_ptr<Runnable> runnable() const { return Thread::runnable(); }
void runnable(shared_ptr<Runnable> value) { Thread::runnable(value); }
void weakRef(shared_ptr<PthreadThread> self) {
assert(self.get() == this);
self_ = weak_ptr<PthreadThread>(self);
}
};
void* PthreadThread::threadMain(void* arg) {
shared_ptr<PthreadThread> thread = *(shared_ptr<PthreadThread>*)arg;
delete reinterpret_cast<shared_ptr<PthreadThread>*>(arg);
if (thread == NULL) {
return (void*)0;
}
if (thread->state_ != starting) {
return (void*)0;
}
#if GOOGLE_PERFTOOLS_REGISTER_THREAD
ProfilerRegisterThread();
#endif
thread->state_ = started;
thread->runnable()->run();
if (thread->state_ != stopping && thread->state_ != stopped) {
thread->state_ = stopping;
}
return (void*)0;
}
/**
* POSIX Thread factory implementation
*/
class PosixThreadFactory::Impl {
private:
POLICY policy_;
PRIORITY priority_;
int stackSize_;
bool detached_;
/**
* Converts generic posix thread schedule policy enums into pthread
* API values.
*/
static int toPthreadPolicy(POLICY policy) {
switch (policy) {
case OTHER:
return SCHED_OTHER;
case FIFO:
return SCHED_FIFO;
case ROUND_ROBIN:
return SCHED_RR;
}
return SCHED_OTHER;
}
/**
* Converts relative thread priorities to absolute value based on posix
* thread scheduler policy
*
* The idea is simply to divide up the priority range for the given policy
* into the correpsonding relative priority level (lowest..highest) and
* then pro-rate accordingly.
*/
static int toPthreadPriority(POLICY policy, PRIORITY priority) {
int pthread_policy = toPthreadPolicy(policy);
int min_priority = 0;
int max_priority = 0;
#ifdef HAVE_SCHED_GET_PRIORITY_MIN
min_priority = sched_get_priority_min(pthread_policy);
#endif
#ifdef HAVE_SCHED_GET_PRIORITY_MAX
max_priority = sched_get_priority_max(pthread_policy);
#endif
int quanta = (HIGHEST - LOWEST) + 1;
float stepsperquanta = (float)(max_priority - min_priority) / quanta;
if (priority <= HIGHEST) {
return (int)(min_priority + stepsperquanta * priority);
} else {
// should never get here for priority increments.
assert(false);
return (int)(min_priority + stepsperquanta * NORMAL);
}
}
public:
Impl(POLICY policy, PRIORITY priority, int stackSize, bool detached) :
policy_(policy),
priority_(priority),
stackSize_(stackSize),
detached_(detached) {}
/**
* Creates a new POSIX thread to run the runnable object
*
* @param runnable A runnable object
*/
shared_ptr<Thread> newThread(shared_ptr<Runnable> runnable) const {
shared_ptr<PthreadThread> result = shared_ptr<PthreadThread>(new PthreadThread(toPthreadPolicy(policy_), toPthreadPriority(policy_, priority_), stackSize_, detached_, runnable));
result->weakRef(result);
runnable->thread(result);
return result;
}
int getStackSize() const { return stackSize_; }
void setStackSize(int value) { stackSize_ = value; }
PRIORITY getPriority() const { return priority_; }
/**
* Sets priority.
*
* XXX
* Need to handle incremental priorities properly.
*/
void setPriority(PRIORITY value) { priority_ = value; }
bool isDetached() const { return detached_; }
void setDetached(bool value) { detached_ = value; }
Thread::id_t getCurrentThreadId() const {
#ifndef _WIN32
return (Thread::id_t)pthread_self();
#else
return (Thread::id_t)pthread_self().p;
#endif // _WIN32
}
};
PosixThreadFactory::PosixThreadFactory(POLICY policy, PRIORITY priority, int stackSize, bool detached) :
impl_(new PosixThreadFactory::Impl(policy, priority, stackSize, detached)) {}
shared_ptr<Thread> PosixThreadFactory::newThread(shared_ptr<Runnable> runnable) const { return impl_->newThread(runnable); }
int PosixThreadFactory::getStackSize() const { return impl_->getStackSize(); }
void PosixThreadFactory::setStackSize(int value) { impl_->setStackSize(value); }
PosixThreadFactory::PRIORITY PosixThreadFactory::getPriority() const { return impl_->getPriority(); }
void PosixThreadFactory::setPriority(PosixThreadFactory::PRIORITY value) { impl_->setPriority(value); }
bool PosixThreadFactory::isDetached() const { return impl_->isDetached(); }
void PosixThreadFactory::setDetached(bool value) { impl_->setDetached(value); }
Thread::id_t PosixThreadFactory::getCurrentThreadId() const { return impl_->getCurrentThreadId(); }
}}} // apache::thrift::concurrency

View file

@ -1,585 +0,0 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#include "ThreadManager.h"
#include "Exception.h"
#include "Monitor.h"
#include "Util.h"
#include <boost/shared_ptr.hpp>
#include <assert.h>
#include <queue>
#include <set>
#if defined(DEBUG)
#include <iostream>
#endif //defined(DEBUG)
namespace apache { namespace thrift { namespace concurrency {
using boost::shared_ptr;
using boost::dynamic_pointer_cast;
/**
* ThreadManager class
*
* This class manages a pool of threads. It uses a ThreadFactory to create
* threads. It never actually creates or destroys worker threads, rather
* it maintains statistics on number of idle threads, number of active threads,
* task backlog, and average wait and service times.
*
* @version $Id:$
*/
class ThreadManager::Impl : public ThreadManager {
public:
Impl() :
workerCount_(0),
workerMaxCount_(0),
idleCount_(0),
pendingTaskCountMax_(0),
expiredCount_(0),
state_(ThreadManager::UNINITIALIZED),
monitor_(&mutex_),
maxMonitor_(&mutex_) {}
~Impl() { stop(); }
void start();
void stop() { stopImpl(false); }
void join() { stopImpl(true); }
ThreadManager::STATE state() const {
return state_;
}
shared_ptr<ThreadFactory> threadFactory() const {
Synchronized s(monitor_);
return threadFactory_;
}
void threadFactory(shared_ptr<ThreadFactory> value) {
Synchronized s(monitor_);
threadFactory_ = value;
}
void addWorker(size_t value);
void removeWorker(size_t value);
size_t idleWorkerCount() const {
return idleCount_;
}
size_t workerCount() const {
Synchronized s(monitor_);
return workerCount_;
}
size_t pendingTaskCount() const {
Synchronized s(monitor_);
return tasks_.size();
}
size_t totalTaskCount() const {
Synchronized s(monitor_);
return tasks_.size() + workerCount_ - idleCount_;
}
size_t pendingTaskCountMax() const {
Synchronized s(monitor_);
return pendingTaskCountMax_;
}
size_t expiredTaskCount() {
Synchronized s(monitor_);
size_t result = expiredCount_;
expiredCount_ = 0;
return result;
}
void pendingTaskCountMax(const size_t value) {
Synchronized s(monitor_);
pendingTaskCountMax_ = value;
}
bool canSleep();
void add(shared_ptr<Runnable> value, int64_t timeout, int64_t expiration);
void remove(shared_ptr<Runnable> task);
shared_ptr<Runnable> removeNextPending();
void removeExpiredTasks();
void setExpireCallback(ExpireCallback expireCallback);
private:
void stopImpl(bool join);
size_t workerCount_;
size_t workerMaxCount_;
size_t idleCount_;
size_t pendingTaskCountMax_;
size_t expiredCount_;
ExpireCallback expireCallback_;
ThreadManager::STATE state_;
shared_ptr<ThreadFactory> threadFactory_;
friend class ThreadManager::Task;
std::queue<shared_ptr<Task> > tasks_;
Mutex mutex_;
Monitor monitor_;
Monitor maxMonitor_;
Monitor workerMonitor_;
friend class ThreadManager::Worker;
std::set<shared_ptr<Thread> > workers_;
std::set<shared_ptr<Thread> > deadWorkers_;
std::map<const Thread::id_t, shared_ptr<Thread> > idMap_;
};
class ThreadManager::Task : public Runnable {
public:
enum STATE {
WAITING,
EXECUTING,
CANCELLED,
COMPLETE
};
Task(shared_ptr<Runnable> runnable, int64_t expiration=0LL) :
runnable_(runnable),
state_(WAITING),
expireTime_(expiration != 0LL ? Util::currentTime() + expiration : 0LL) {}
~Task() {}
void run() {
if (state_ == EXECUTING) {
runnable_->run();
state_ = COMPLETE;
}
}
shared_ptr<Runnable> getRunnable() {
return runnable_;
}
int64_t getExpireTime() const {
return expireTime_;
}
private:
shared_ptr<Runnable> runnable_;
friend class ThreadManager::Worker;
STATE state_;
int64_t expireTime_;
};
class ThreadManager::Worker: public Runnable {
enum STATE {
UNINITIALIZED,
STARTING,
STARTED,
STOPPING,
STOPPED
};
public:
Worker(ThreadManager::Impl* manager) :
manager_(manager),
state_(UNINITIALIZED),
idle_(false) {}
~Worker() {}
private:
bool isActive() const {
return
(manager_->workerCount_ <= manager_->workerMaxCount_) ||
(manager_->state_ == JOINING && !manager_->tasks_.empty());
}
public:
/**
* Worker entry point
*
* As long as worker thread is running, pull tasks off the task queue and
* execute.
*/
void run() {
bool active = false;
bool notifyManager = false;
/**
* Increment worker semaphore and notify manager if worker count reached
* desired max
*
* Note: We have to release the monitor and acquire the workerMonitor
* since that is what the manager blocks on for worker add/remove
*/
{
Synchronized s(manager_->monitor_);
active = manager_->workerCount_ < manager_->workerMaxCount_;
if (active) {
manager_->workerCount_++;
notifyManager = manager_->workerCount_ == manager_->workerMaxCount_;
}
}
if (notifyManager) {
Synchronized s(manager_->workerMonitor_);
manager_->workerMonitor_.notify();
notifyManager = false;
}
while (active) {
shared_ptr<ThreadManager::Task> task;
/**
* While holding manager monitor block for non-empty task queue (Also
* check that the thread hasn't been requested to stop). Once the queue
* is non-empty, dequeue a task, release monitor, and execute. If the
* worker max count has been decremented such that we exceed it, mark
* ourself inactive, decrement the worker count and notify the manager
* (technically we're notifying the next blocked thread but eventually
* the manager will see it.
*/
{
Guard g(manager_->mutex_);
active = isActive();
while (active && manager_->tasks_.empty()) {
manager_->idleCount_++;
idle_ = true;
manager_->monitor_.wait();
active = isActive();
idle_ = false;
manager_->idleCount_--;
}
if (active) {
manager_->removeExpiredTasks();
if (!manager_->tasks_.empty()) {
task = manager_->tasks_.front();
manager_->tasks_.pop();
if (task->state_ == ThreadManager::Task::WAITING) {
task->state_ = ThreadManager::Task::EXECUTING;
}
/* If we have a pending task max and we just dropped below it, wakeup any
thread that might be blocked on add. */
if (manager_->pendingTaskCountMax_ != 0 &&
manager_->tasks_.size() <= manager_->pendingTaskCountMax_ - 1) {
manager_->maxMonitor_.notify();
}
}
} else {
idle_ = true;
manager_->workerCount_--;
notifyManager = (manager_->workerCount_ == manager_->workerMaxCount_);
}
}
if (task != NULL) {
if (task->state_ == ThreadManager::Task::EXECUTING) {
try {
task->run();
} catch(...) {
// XXX need to log this
}
}
}
}
{
Synchronized s(manager_->workerMonitor_);
manager_->deadWorkers_.insert(this->thread());
if (notifyManager) {
manager_->workerMonitor_.notify();
}
}
return;
}
private:
ThreadManager::Impl* manager_;
friend class ThreadManager::Impl;
STATE state_;
bool idle_;
};
void ThreadManager::Impl::addWorker(size_t value) {
std::set<shared_ptr<Thread> > newThreads;
for (size_t ix = 0; ix < value; ix++) {
shared_ptr<ThreadManager::Worker> worker = shared_ptr<ThreadManager::Worker>(new ThreadManager::Worker(this));
newThreads.insert(threadFactory_->newThread(worker));
}
{
Synchronized s(monitor_);
workerMaxCount_ += value;
workers_.insert(newThreads.begin(), newThreads.end());
}
for (std::set<shared_ptr<Thread> >::iterator ix = newThreads.begin(); ix != newThreads.end(); ix++) {
shared_ptr<ThreadManager::Worker> worker = dynamic_pointer_cast<ThreadManager::Worker, Runnable>((*ix)->runnable());
worker->state_ = ThreadManager::Worker::STARTING;
(*ix)->start();
idMap_.insert(std::pair<const Thread::id_t, shared_ptr<Thread> >((*ix)->getId(), *ix));
}
{
Synchronized s(workerMonitor_);
while (workerCount_ != workerMaxCount_) {
workerMonitor_.wait();
}
}
}
void ThreadManager::Impl::start() {
if (state_ == ThreadManager::STOPPED) {
return;
}
{
Synchronized s(monitor_);
if (state_ == ThreadManager::UNINITIALIZED) {
if (threadFactory_ == NULL) {
throw InvalidArgumentException();
}
state_ = ThreadManager::STARTED;
monitor_.notifyAll();
}
while (state_ == STARTING) {
monitor_.wait();
}
}
}
void ThreadManager::Impl::stopImpl(bool join) {
bool doStop = false;
if (state_ == ThreadManager::STOPPED) {
return;
}
{
Synchronized s(monitor_);
if (state_ != ThreadManager::STOPPING &&
state_ != ThreadManager::JOINING &&
state_ != ThreadManager::STOPPED) {
doStop = true;
state_ = join ? ThreadManager::JOINING : ThreadManager::STOPPING;
}
}
if (doStop) {
removeWorker(workerCount_);
}
// XXX
// should be able to block here for transition to STOPPED since we're no
// using shared_ptrs
{
Synchronized s(monitor_);
state_ = ThreadManager::STOPPED;
}
}
void ThreadManager::Impl::removeWorker(size_t value) {
std::set<shared_ptr<Thread> > removedThreads;
{
Synchronized s(monitor_);
if (value > workerMaxCount_) {
throw InvalidArgumentException();
}
workerMaxCount_ -= value;
if (idleCount_ < value) {
for (size_t ix = 0; ix < idleCount_; ix++) {
monitor_.notify();
}
} else {
monitor_.notifyAll();
}
}
{
Synchronized s(workerMonitor_);
while (workerCount_ != workerMaxCount_) {
workerMonitor_.wait();
}
for (std::set<shared_ptr<Thread> >::iterator ix = deadWorkers_.begin(); ix != deadWorkers_.end(); ix++) {
workers_.erase(*ix);
idMap_.erase((*ix)->getId());
}
deadWorkers_.clear();
}
}
bool ThreadManager::Impl::canSleep() {
const Thread::id_t id = threadFactory_->getCurrentThreadId();
return idMap_.find(id) == idMap_.end();
}
void ThreadManager::Impl::add(shared_ptr<Runnable> value,
int64_t timeout,
int64_t expiration) {
Guard g(mutex_, timeout);
if (!g) {
throw TimedOutException();
}
if (state_ != ThreadManager::STARTED) {
throw IllegalStateException("ThreadManager::Impl::add ThreadManager "
"not started");
}
removeExpiredTasks();
if (pendingTaskCountMax_ > 0 && (tasks_.size() >= pendingTaskCountMax_)) {
if (canSleep() && timeout >= 0) {
while (pendingTaskCountMax_ > 0 && tasks_.size() >= pendingTaskCountMax_) {
// This is thread safe because the mutex is shared between monitors.
maxMonitor_.wait(timeout);
}
} else {
throw TooManyPendingTasksException();
}
}
tasks_.push(shared_ptr<ThreadManager::Task>(new ThreadManager::Task(value, expiration)));
// If idle thread is available notify it, otherwise all worker threads are
// running and will get around to this task in time.
if (idleCount_ > 0) {
monitor_.notify();
}
}
void ThreadManager::Impl::remove(shared_ptr<Runnable> task) {
(void) task;
Synchronized s(monitor_);
if (state_ != ThreadManager::STARTED) {
throw IllegalStateException("ThreadManager::Impl::remove ThreadManager not "
"started");
}
}
boost::shared_ptr<Runnable> ThreadManager::Impl::removeNextPending() {
Guard g(mutex_);
if (state_ != ThreadManager::STARTED) {
throw IllegalStateException("ThreadManager::Impl::removeNextPending "
"ThreadManager not started");
}
if (tasks_.empty()) {
return boost::shared_ptr<Runnable>();
}
shared_ptr<ThreadManager::Task> task = tasks_.front();
tasks_.pop();
return task->getRunnable();
}
void ThreadManager::Impl::removeExpiredTasks() {
int64_t now = 0LL; // we won't ask for the time untile we need it
// note that this loop breaks at the first non-expiring task
while (!tasks_.empty()) {
shared_ptr<ThreadManager::Task> task = tasks_.front();
if (task->getExpireTime() == 0LL) {
break;
}
if (now == 0LL) {
now = Util::currentTime();
}
if (task->getExpireTime() > now) {
break;
}
if (expireCallback_) {
expireCallback_(task->getRunnable());
}
tasks_.pop();
expiredCount_++;
}
}
void ThreadManager::Impl::setExpireCallback(ExpireCallback expireCallback) {
expireCallback_ = expireCallback;
}
class SimpleThreadManager : public ThreadManager::Impl {
public:
SimpleThreadManager(size_t workerCount=4, size_t pendingTaskCountMax=0) :
workerCount_(workerCount),
pendingTaskCountMax_(pendingTaskCountMax),
firstTime_(true) {
}
void start() {
ThreadManager::Impl::pendingTaskCountMax(pendingTaskCountMax_);
ThreadManager::Impl::start();
addWorker(workerCount_);
}
private:
const size_t workerCount_;
const size_t pendingTaskCountMax_;
bool firstTime_;
Monitor monitor_;
};
shared_ptr<ThreadManager> ThreadManager::newThreadManager() {
return shared_ptr<ThreadManager>(new ThreadManager::Impl());
}
shared_ptr<ThreadManager> ThreadManager::newSimpleThreadManager(size_t count, size_t pendingTaskCountMax) {
return shared_ptr<ThreadManager>(new SimpleThreadManager(count, pendingTaskCountMax));
}
}}} // apache::thrift::concurrency

View file

@ -1,292 +0,0 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
#include "TimerManager.h"
#include "Exception.h"
#include "Util.h"
#include <assert.h>
#include <iostream>
#include <set>
namespace apache { namespace thrift { namespace concurrency {
using boost::shared_ptr;
/**
* TimerManager class
*
* @version $Id:$
*/
class TimerManager::Task : public Runnable {
public:
enum STATE {
WAITING,
EXECUTING,
CANCELLED,
COMPLETE
};
Task(shared_ptr<Runnable> runnable) :
runnable_(runnable),
state_(WAITING) {}
~Task() {
}
void run() {
if (state_ == EXECUTING) {
runnable_->run();
state_ = COMPLETE;
}
}
private:
shared_ptr<Runnable> runnable_;
friend class TimerManager::Dispatcher;
STATE state_;
};
class TimerManager::Dispatcher: public Runnable {
public:
Dispatcher(TimerManager* manager) :
manager_(manager) {}
~Dispatcher() {}
/**
* Dispatcher entry point
*
* As long as dispatcher thread is running, pull tasks off the task taskMap_
* and execute.
*/
void run() {
{
Synchronized s(manager_->monitor_);
if (manager_->state_ == TimerManager::STARTING) {
manager_->state_ = TimerManager::STARTED;
manager_->monitor_.notifyAll();
}
}
do {
std::set<shared_ptr<TimerManager::Task> > expiredTasks;
{
Synchronized s(manager_->monitor_);
task_iterator expiredTaskEnd;
int64_t now = Util::currentTime();
while (manager_->state_ == TimerManager::STARTED &&
(expiredTaskEnd = manager_->taskMap_.upper_bound(now)) == manager_->taskMap_.begin()) {
int64_t timeout = 0LL;
if (!manager_->taskMap_.empty()) {
timeout = manager_->taskMap_.begin()->first - now;
}
assert((timeout != 0 && manager_->taskCount_ > 0) || (timeout == 0 && manager_->taskCount_ == 0));
try {
manager_->monitor_.wait(timeout);
} catch (TimedOutException &) {}
now = Util::currentTime();
}
if (manager_->state_ == TimerManager::STARTED) {
for (task_iterator ix = manager_->taskMap_.begin(); ix != expiredTaskEnd; ix++) {
shared_ptr<TimerManager::Task> task = ix->second;
expiredTasks.insert(task);
if (task->state_ == TimerManager::Task::WAITING) {
task->state_ = TimerManager::Task::EXECUTING;
}
manager_->taskCount_--;
}
manager_->taskMap_.erase(manager_->taskMap_.begin(), expiredTaskEnd);
}
}
for (std::set<shared_ptr<Task> >::iterator ix = expiredTasks.begin(); ix != expiredTasks.end(); ix++) {
(*ix)->run();
}
} while (manager_->state_ == TimerManager::STARTED);
{
Synchronized s(manager_->monitor_);
if (manager_->state_ == TimerManager::STOPPING) {
manager_->state_ = TimerManager::STOPPED;
manager_->monitor_.notify();
}
}
return;
}
private:
TimerManager* manager_;
friend class TimerManager;
};
#if defined(_MSC_VER)
#pragma warning(push)
#pragma warning(disable: 4355) // 'this' used in base member initializer list
#endif
TimerManager::TimerManager() :
taskCount_(0),
state_(TimerManager::UNINITIALIZED),
dispatcher_(shared_ptr<Dispatcher>(new Dispatcher(this))) {
}
#if defined(_MSC_VER)
#pragma warning(pop)
#endif
TimerManager::~TimerManager() {
// If we haven't been explicitly stopped, do so now. We don't need to grab
// the monitor here, since stop already takes care of reentrancy.
if (state_ != STOPPED) {
try {
stop();
} catch(...) {
throw;
// uhoh
}
}
}
void TimerManager::start() {
bool doStart = false;
{
Synchronized s(monitor_);
if (threadFactory_ == NULL) {
throw InvalidArgumentException();
}
if (state_ == TimerManager::UNINITIALIZED) {
state_ = TimerManager::STARTING;
doStart = true;
}
}
if (doStart) {
dispatcherThread_ = threadFactory_->newThread(dispatcher_);
dispatcherThread_->start();
}
{
Synchronized s(monitor_);
while (state_ == TimerManager::STARTING) {
monitor_.wait();
}
assert(state_ != TimerManager::STARTING);
}
}
void TimerManager::stop() {
bool doStop = false;
{
Synchronized s(monitor_);
if (state_ == TimerManager::UNINITIALIZED) {
state_ = TimerManager::STOPPED;
} else if (state_ != STOPPING && state_ != STOPPED) {
doStop = true;
state_ = STOPPING;
monitor_.notifyAll();
}
while (state_ != STOPPED) {
monitor_.wait();
}
}
if (doStop) {
// Clean up any outstanding tasks
taskMap_.clear();
// Remove dispatcher's reference to us.
dispatcher_->manager_ = NULL;
}
}
shared_ptr<const ThreadFactory> TimerManager::threadFactory() const {
Synchronized s(monitor_);
return threadFactory_;
}
void TimerManager::threadFactory(shared_ptr<const ThreadFactory> value) {
Synchronized s(monitor_);
threadFactory_ = value;
}
size_t TimerManager::taskCount() const {
return taskCount_;
}
void TimerManager::add(shared_ptr<Runnable> task, int64_t timeout) {
int64_t now = Util::currentTime();
timeout += now;
{
Synchronized s(monitor_);
if (state_ != TimerManager::STARTED) {
throw IllegalStateException();
}
// If the task map is empty, we will kick the dispatcher for sure. Otherwise, we kick him
// if the expiration time is shorter than the current value. Need to test before we insert,
// because the new task might insert at the front.
bool notifyRequired = (taskCount_ == 0) ? true : timeout < taskMap_.begin()->first;
taskCount_++;
taskMap_.insert(std::pair<int64_t, shared_ptr<Task> >(timeout, shared_ptr<Task>(new Task(task))));
// If the task map was empty, or if we have an expiration that is earlier
// than any previously seen, kick the dispatcher so it can update its
// timeout
if (notifyRequired) {
monitor_.notify();
}
}
}
void TimerManager::add(shared_ptr<Runnable> task, const struct timespec& value) {
int64_t expiration;
Util::toMilliseconds(expiration, value);
int64_t now = Util::currentTime();
if (expiration < now) {
throw InvalidArgumentException();
}
add(task, expiration - now);
}
void TimerManager::remove(shared_ptr<Runnable> task) {
(void) task;
Synchronized s(monitor_);
if (state_ != TimerManager::STARTED) {
throw IllegalStateException();
}
}
TimerManager::STATE TimerManager::state() const { return state_; }
}}} // apache::thrift::concurrency

View file

@ -1,55 +0,0 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#include "Util.h"
#if defined(HAVE_CLOCK_GETTIME)
#include <time.h>
#elif defined(HAVE_SYS_TIME_H)
#include <sys/time.h>
#endif // defined(HAVE_CLOCK_GETTIME)
namespace apache { namespace thrift { namespace concurrency {
int64_t Util::currentTimeTicks(int64_t ticksPerSec) {
int64_t result;
#if defined(HAVE_CLOCK_GETTIME)
struct timespec now;
int ret = clock_gettime(CLOCK_REALTIME, &now);
assert(ret == 0);
ret = ret; //squelching "unused variable" warning
toTicks(result, now, ticksPerSec);
#elif defined(HAVE_GETTIMEOFDAY)
struct timeval now;
int ret = gettimeofday(&now, NULL);
assert(ret == 0);
toTicks(result, now, ticksPerSec);
#else
#error "No high-precision clock is available."
#endif // defined(HAVE_CLOCK_GETTIME)
return result;
}
}}} // apache::thrift::concurrency

View file

@ -1,127 +0,0 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
#include "PeekProcessor.h"
using namespace apache::thrift::transport;
using namespace apache::thrift::protocol;
using namespace apache::thrift;
namespace apache { namespace thrift { namespace processor {
PeekProcessor::PeekProcessor() {
memoryBuffer_.reset(new TMemoryBuffer());
targetTransport_ = memoryBuffer_;
}
PeekProcessor::~PeekProcessor() {}
void PeekProcessor::initialize(boost::shared_ptr<TProcessor> actualProcessor,
boost::shared_ptr<TProtocolFactory> protocolFactory,
boost::shared_ptr<TPipedTransportFactory> transportFactory) {
actualProcessor_ = actualProcessor;
pipedProtocol_ = protocolFactory->getProtocol(targetTransport_);
transportFactory_ = transportFactory;
transportFactory_->initializeTargetTransport(targetTransport_);
}
boost::shared_ptr<TTransport> PeekProcessor::getPipedTransport(boost::shared_ptr<TTransport> in) {
return transportFactory_->getTransport(in);
}
void PeekProcessor::setTargetTransport(boost::shared_ptr<TTransport> targetTransport) {
targetTransport_ = targetTransport;
if (boost::dynamic_pointer_cast<TMemoryBuffer>(targetTransport_)) {
memoryBuffer_ = boost::dynamic_pointer_cast<TMemoryBuffer>(targetTransport);
} else if (boost::dynamic_pointer_cast<TPipedTransport>(targetTransport_)) {
memoryBuffer_ = boost::dynamic_pointer_cast<TMemoryBuffer>(boost::dynamic_pointer_cast<TPipedTransport>(targetTransport_)->getTargetTransport());
}
if (!memoryBuffer_) {
throw TException("Target transport must be a TMemoryBuffer or a TPipedTransport with TMemoryBuffer");
}
}
bool PeekProcessor::process(boost::shared_ptr<TProtocol> in,
boost::shared_ptr<TProtocol> out,
void* connectionContext) {
std::string fname;
TMessageType mtype;
int32_t seqid;
in->readMessageBegin(fname, mtype, seqid);
if (mtype != T_CALL) {
throw TException("Unexpected message type");
}
// Peek at the name
peekName(fname);
TType ftype;
int16_t fid;
while (true) {
in->readFieldBegin(fname, ftype, fid);
if (ftype == T_STOP) {
break;
}
// Peek at the variable
peek(in, ftype, fid);
in->readFieldEnd();
}
in->readMessageEnd();
in->getTransport()->readEnd();
//
// All the data is now in memoryBuffer_ and ready to be processed
//
// Let's first take a peek at the full data in memory
uint8_t* buffer;
uint32_t size;
memoryBuffer_->getBuffer(&buffer, &size);
peekBuffer(buffer, size);
// Done peeking at variables
peekEnd();
bool ret = actualProcessor_->process(pipedProtocol_, out, connectionContext);
memoryBuffer_->resetBuffer();
return ret;
}
void PeekProcessor::peekName(const std::string& fname) {
(void) fname;
}
void PeekProcessor::peekBuffer(uint8_t* buffer, uint32_t size) {
(void) buffer;
(void) size;
}
void PeekProcessor::peek(boost::shared_ptr<TProtocol> in,
TType ftype,
int16_t fid) {
(void) fid;
in->skip(ftype);
}
void PeekProcessor::peekEnd() {}
}}}

View file

@ -1,79 +0,0 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
#include "TBase64Utils.h"
#include <boost/static_assert.hpp>
using std::string;
namespace apache { namespace thrift { namespace protocol {
static const uint8_t *kBase64EncodeTable = (const uint8_t *)
"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
void base64_encode(const uint8_t *in, uint32_t len, uint8_t *buf) {
buf[0] = kBase64EncodeTable[(in[0] >> 2) & 0x3f];
if (len == 3) {
buf[1] = kBase64EncodeTable[((in[0] << 4) & 0x30) | ((in[1] >> 4) & 0x0f)];
buf[2] = kBase64EncodeTable[((in[1] << 2) & 0x3c) | ((in[2] >> 6) & 0x03)];
buf[3] = kBase64EncodeTable[in[2] & 0x3f];
} else if (len == 2) {
buf[1] = kBase64EncodeTable[((in[0] << 4) & 0x30) | ((in[1] >> 4) & 0x0f)];
buf[2] = kBase64EncodeTable[(in[1] << 2) & 0x3c];
} else { // len == 1
buf[1] = kBase64EncodeTable[(in[0] << 4) & 0x30];
}
}
static const uint8_t kBase64DecodeTable[256] ={
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x3e,0xff,0xff,0xff,0x3f,
0x34,0x35,0x36,0x37,0x38,0x39,0x3a,0x3b,0x3c,0x3d,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0a,0x0b,0x0c,0x0d,0x0e,
0x0f,0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0xff,0xff,0xff,0xff,0xff,
0xff,0x1a,0x1b,0x1c,0x1d,0x1e,0x1f,0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,
0x29,0x2a,0x2b,0x2c,0x2d,0x2e,0x2f,0x30,0x31,0x32,0x33,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
};
void base64_decode(uint8_t *buf, uint32_t len) {
buf[0] = (kBase64DecodeTable[buf[0]] << 2) |
(kBase64DecodeTable[buf[1]] >> 4);
if (len > 2) {
buf[1] = ((kBase64DecodeTable[buf[1]] << 4) & 0xf0) |
(kBase64DecodeTable[buf[2]] >> 2);
if (len > 3) {
buf[2] = ((kBase64DecodeTable[buf[2]] << 6) & 0xc0) |
(kBase64DecodeTable[buf[3]]);
}
}
}
}}} // apache::thrift::protocol

View file

@ -1,358 +0,0 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
#include "TDebugProtocol.h"
#include <cassert>
#include <cctype>
#include <cstdio>
#include <stdexcept>
#include <boost/static_assert.hpp>
#include <boost/lexical_cast.hpp>
using std::string;
static string byte_to_hex(const uint8_t byte) {
char buf[3];
int ret = std::sprintf(buf, "%02x", (int)byte);
ret = ret; //squelching "unused variable" warning
assert(ret == 2);
assert(buf[2] == '\0');
return buf;
}
namespace apache { namespace thrift { namespace protocol {
string TDebugProtocol::fieldTypeName(TType type) {
switch (type) {
case T_STOP : return "stop" ;
case T_VOID : return "void" ;
case T_BOOL : return "bool" ;
case T_BYTE : return "byte" ;
case T_I16 : return "i16" ;
case T_I32 : return "i32" ;
case T_U64 : return "u64" ;
case T_I64 : return "i64" ;
case T_DOUBLE : return "double" ;
case T_STRING : return "string" ;
case T_STRUCT : return "struct" ;
case T_MAP : return "map" ;
case T_SET : return "set" ;
case T_LIST : return "list" ;
case T_UTF8 : return "utf8" ;
case T_UTF16 : return "utf16" ;
default: return "unknown";
}
}
void TDebugProtocol::indentUp() {
indent_str_ += string(indent_inc, ' ');
}
void TDebugProtocol::indentDown() {
if (indent_str_.length() < (string::size_type)indent_inc) {
throw TProtocolException(TProtocolException::INVALID_DATA);
}
indent_str_.erase(indent_str_.length() - indent_inc);
}
uint32_t TDebugProtocol::writePlain(const string& str) {
if(str.length() > (std::numeric_limits<uint32_t>::max)())
throw TProtocolException(TProtocolException::SIZE_LIMIT);
trans_->write((uint8_t*)str.data(), static_cast<uint32_t>(str.length()));
return static_cast<uint32_t>(str.length());
}
uint32_t TDebugProtocol::writeIndented(const string& str) {
if(str.length() > (std::numeric_limits<uint32_t>::max)())
throw TProtocolException(TProtocolException::SIZE_LIMIT);
if(indent_str_.length() > (std::numeric_limits<uint32_t>::max)())
throw TProtocolException(TProtocolException::SIZE_LIMIT);
uint64_t total_len = indent_str_.length() + str.length();
if(total_len > (std::numeric_limits<uint32_t>::max)())
throw TProtocolException(TProtocolException::SIZE_LIMIT);
trans_->write((uint8_t*)indent_str_.data(), static_cast<uint32_t>(indent_str_.length()));
trans_->write((uint8_t*)str.data(), static_cast<uint32_t>(str.length()));
return static_cast<uint32_t>(indent_str_.length() + str.length());
}
uint32_t TDebugProtocol::startItem() {
uint32_t size;
switch (write_state_.back()) {
case UNINIT:
// XXX figure out what to do here.
//throw TProtocolException(TProtocolException::INVALID_DATA);
//return writeIndented(str);
return 0;
case STRUCT:
return 0;
case SET:
return writeIndented("");
case MAP_KEY:
return writeIndented("");
case MAP_VALUE:
return writePlain(" -> ");
case LIST:
size = writeIndented(
"[" + boost::lexical_cast<string>(list_idx_.back()) + "] = ");
list_idx_.back()++;
return size;
default:
throw std::logic_error("Invalid enum value.");
}
}
uint32_t TDebugProtocol::endItem() {
//uint32_t size;
switch (write_state_.back()) {
case UNINIT:
// XXX figure out what to do here.
//throw TProtocolException(TProtocolException::INVALID_DATA);
//return writeIndented(str);
return 0;
case STRUCT:
return writePlain(",\n");
case SET:
return writePlain(",\n");
case MAP_KEY:
write_state_.back() = MAP_VALUE;
return 0;
case MAP_VALUE:
write_state_.back() = MAP_KEY;
return writePlain(",\n");
case LIST:
return writePlain(",\n");
default:
throw std::logic_error("Invalid enum value.");
}
}
uint32_t TDebugProtocol::writeItem(const std::string& str) {
uint32_t size = 0;
size += startItem();
size += writePlain(str);
size += endItem();
return size;
}
uint32_t TDebugProtocol::writeMessageBegin(const std::string& name,
const TMessageType messageType,
const int32_t seqid) {
(void) seqid;
string mtype;
switch (messageType) {
case T_CALL : mtype = "call" ; break;
case T_REPLY : mtype = "reply" ; break;
case T_EXCEPTION : mtype = "exn" ; break;
case T_ONEWAY : mtype = "oneway" ; break;
}
uint32_t size = writeIndented("(" + mtype + ") " + name + "(");
indentUp();
return size;
}
uint32_t TDebugProtocol::writeMessageEnd() {
indentDown();
return writeIndented(")\n");
}
uint32_t TDebugProtocol::writeStructBegin(const char* name) {
uint32_t size = 0;
size += startItem();
size += writePlain(string(name) + " {\n");
indentUp();
write_state_.push_back(STRUCT);
return size;
}
uint32_t TDebugProtocol::writeStructEnd() {
indentDown();
write_state_.pop_back();
uint32_t size = 0;
size += writeIndented("}");
size += endItem();
return size;
}
uint32_t TDebugProtocol::writeFieldBegin(const char* name,
const TType fieldType,
const int16_t fieldId) {
// sprintf(id_str, "%02d", fieldId);
string id_str = boost::lexical_cast<string>(fieldId);
if (id_str.length() == 1) id_str = '0' + id_str;
return writeIndented(
id_str + ": " +
name + " (" +
fieldTypeName(fieldType) + ") = ");
}
uint32_t TDebugProtocol::writeFieldEnd() {
assert(write_state_.back() == STRUCT);
return 0;
}
uint32_t TDebugProtocol::writeFieldStop() {
return 0;
//writeIndented("***STOP***\n");
}
uint32_t TDebugProtocol::writeMapBegin(const TType keyType,
const TType valType,
const uint32_t size) {
// TODO(dreiss): Optimize short maps?
uint32_t bsize = 0;
bsize += startItem();
bsize += writePlain(
"map<" + fieldTypeName(keyType) + "," + fieldTypeName(valType) + ">"
"[" + boost::lexical_cast<string>(size) + "] {\n");
indentUp();
write_state_.push_back(MAP_KEY);
return bsize;
}
uint32_t TDebugProtocol::writeMapEnd() {
indentDown();
write_state_.pop_back();
uint32_t size = 0;
size += writeIndented("}");
size += endItem();
return size;
}
uint32_t TDebugProtocol::writeListBegin(const TType elemType,
const uint32_t size) {
// TODO(dreiss): Optimize short arrays.
uint32_t bsize = 0;
bsize += startItem();
bsize += writePlain(
"list<" + fieldTypeName(elemType) + ">"
"[" + boost::lexical_cast<string>(size) + "] {\n");
indentUp();
write_state_.push_back(LIST);
list_idx_.push_back(0);
return bsize;
}
uint32_t TDebugProtocol::writeListEnd() {
indentDown();
write_state_.pop_back();
list_idx_.pop_back();
uint32_t size = 0;
size += writeIndented("}");
size += endItem();
return size;
}
uint32_t TDebugProtocol::writeSetBegin(const TType elemType,
const uint32_t size) {
// TODO(dreiss): Optimize short sets.
uint32_t bsize = 0;
bsize += startItem();
bsize += writePlain(
"set<" + fieldTypeName(elemType) + ">"
"[" + boost::lexical_cast<string>(size) + "] {\n");
indentUp();
write_state_.push_back(SET);
return bsize;
}
uint32_t TDebugProtocol::writeSetEnd() {
indentDown();
write_state_.pop_back();
uint32_t size = 0;
size += writeIndented("}");
size += endItem();
return size;
}
uint32_t TDebugProtocol::writeBool(const bool value) {
return writeItem(value ? "true" : "false");
}
uint32_t TDebugProtocol::writeByte(const int8_t byte) {
return writeItem("0x" + byte_to_hex(byte));
}
uint32_t TDebugProtocol::writeI16(const int16_t i16) {
return writeItem(boost::lexical_cast<string>(i16));
}
uint32_t TDebugProtocol::writeI32(const int32_t i32) {
return writeItem(boost::lexical_cast<string>(i32));
}
uint32_t TDebugProtocol::writeI64(const int64_t i64) {
return writeItem(boost::lexical_cast<string>(i64));
}
uint32_t TDebugProtocol::writeDouble(const double dub) {
return writeItem(boost::lexical_cast<string>(dub));
}
uint32_t TDebugProtocol::writeString(const string& str) {
// XXX Raw/UTF-8?
string to_show = str;
if (to_show.length() > (string::size_type)string_limit_) {
to_show = str.substr(0, string_prefix_size_);
to_show += "[...](" + boost::lexical_cast<string>(str.length()) + ")";
}
string output = "\"";
for (string::const_iterator it = to_show.begin(); it != to_show.end(); ++it) {
if (*it == '\\') {
output += "\\\\";
} else if (*it == '"') {
output += "\\\"";
} else if (std::isprint(*it)) {
output += *it;
} else {
switch (*it) {
case '\a': output += "\\a"; break;
case '\b': output += "\\b"; break;
case '\f': output += "\\f"; break;
case '\n': output += "\\n"; break;
case '\r': output += "\\r"; break;
case '\t': output += "\\t"; break;
case '\v': output += "\\v"; break;
default:
output += "\\x";
output += byte_to_hex(*it);
}
}
}
output += '\"';
return writeItem(output);
}
uint32_t TDebugProtocol::writeBinary(const string& str) {
// XXX Hex?
return TDebugProtocol::writeString(str);
}
}}} // apache::thrift::protocol

View file

@ -1,768 +0,0 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
/*
IMPLEMENTATION DETAILS
TDenseProtocol was designed to have a smaller serialized form than
TBinaryProtocol. This is accomplished using two techniques. The first is
variable-length integer encoding. We use the same technique that the Standard
MIDI File format uses for "variable-length quantities"
(http://en.wikipedia.org/wiki/Variable-length_quantity).
All integers (including i16, but not byte) are first cast to uint64_t,
then written out as variable-length quantities. This has the unfortunate side
effect that all negative numbers require 10 bytes, but negative numbers tend
to be far less common than positive ones.
The second technique eliminating the field ids used by TBinaryProtocol. This
decision required support from the Thrift compiler and also sacrifices some of
the backward and forward compatibility of TBinaryProtocol.
We considered implementing this technique by generating separate readers and
writers for the dense protocol (this is how Pillar, Thrift's predecessor,
worked), but this idea had a few problems:
- Our abstractions go out the window.
- We would have to maintain a second code generator.
- Preserving compatibility with old versions of the structures would be a
nightmare.
Therefore, we chose an alternate implementation that stored the description of
the data neither in the data itself (like TBinaryProtocol) nor in the
serialization code (like Pillar), but instead in a separate data structure,
called a TypeSpec. TypeSpecs are generated by the Thrift compiler
(specifically in the t_cpp_generator), and their structure should be
documented there (TODO(dreiss): s/should be/is/).
We maintain a stack of TypeSpecs within the protocol so it knows where the
generated code is in the reading/writing process. For example, if we are
writing an i32 contained in a struct bar, contained in a struct foo, then the
stack would look like: TOP , i32 , struct bar , struct foo , BOTTOM.
The following invariant: whenever we are about to read/write an object
(structBegin, containerBegin, or a scalar), the TypeSpec on the top of the
stack must match the type being read/written. The main reasons that this
invariant must be maintained is that if we ever start reading a structure, we
must have its exact TypeSpec in order to pass the right tags to the
deserializer.
We use the following strategies for maintaining this invariant:
- For structures, we have a separate stack of indexes, one for each structure
on the TypeSpec stack. These are indexes into the list of fields in the
structure's TypeSpec. When we {read,write}FieldBegin, we push on the
TypeSpec for the field.
- When we begin writing a list or set, we push on the TypeSpec for the
element type.
- For maps, we have a separate stack of booleans, one for each map on the
TypeSpec stack. The boolean is true if we are writing the key for that
map, and false if we are writing the value. Maps are the trickiest case
because the generated code does not call any protocol method between
the key and the value. As a result, we potentially have to switch
between map key state and map value state after reading/writing any object.
- This job is handled by the stateTransition method. It is called after
reading/writing every object. It pops the current TypeSpec off the stack,
then optionally pushes a new one on, depending on what the next TypeSpec is.
If it is a struct, the job is left to the next writeFieldBegin. If it is a
set or list, the just-popped typespec is pushed back on. If it is a map,
the top of the key/value stack is toggled, and the appropriate TypeSpec
is pushed.
Optional fields are a little tricky also. We write a zero byte if they are
absent and prefix them with an 0x01 byte if they are present
*/
#define __STDC_LIMIT_MACROS
#include <stdint.h>
#include <thrift/protocol/TDenseProtocol.h>
#include <thrift/TReflectionLocal.h>
// Leaving this on for now. Disabling it will turn off asserts, which should
// give a performance boost. When we have *really* thorough test cases,
// we should drop this.
#define DEBUG_TDENSEPROTOCOL
// NOTE: Assertions should *only* be used to detect bugs in code,
// either in TDenseProtocol itself, or in code using it.
// (For example, using the wrong TypeSpec.)
// Invalid data should NEVER cause an assertion failure,
// no matter how grossly corrupted, nor how ingeniously crafted.
#ifdef DEBUG_TDENSEPROTOCOL
#undef NDEBUG
#else
#define NDEBUG
#endif
#include <cassert>
using std::string;
#ifdef __GNUC__
#define UNLIKELY(val) (__builtin_expect((val), 0))
#else
#define UNLIKELY(val) (val)
#endif
namespace apache { namespace thrift { namespace protocol {
const int TDenseProtocol::FP_PREFIX_LEN =
apache::thrift::reflection::local::FP_PREFIX_LEN;
// Top TypeSpec. TypeSpec of the structure being encoded.
#define TTS (ts_stack_.back()) // type = TypeSpec*
// InDeX. Index into TTS of the current/next field to encode.
#define IDX (idx_stack_.back()) // type = int
// Field TypeSpec. TypeSpec of the current/next field to encode.
#define FTS (TTS->tstruct.specs[IDX]) // type = TypeSpec*
// Field MeTa. Metadata of the current/next field to encode.
#define FMT (TTS->tstruct.metas[IDX]) // type = FieldMeta
// SubType 1/2. TypeSpec of the first/second subtype of this container.
#define ST1 (TTS->tcontainer.subtype1)
#define ST2 (TTS->tcontainer.subtype2)
/**
* Checks that @c ttype is indeed the ttype that we should be writing,
* according to our typespec. Aborts if the test fails and debugging in on.
*/
inline void TDenseProtocol::checkTType(const TType ttype) {
assert(!ts_stack_.empty());
assert(TTS->ttype == ttype);
}
/**
* Makes sure that the TypeSpec stack is correct for the next object.
* See top-of-file comments.
*/
inline void TDenseProtocol::stateTransition() {
TypeSpec* old_tts = ts_stack_.back();
ts_stack_.pop_back();
// If this is the end of the top-level write, we should have just popped
// the TypeSpec passed to the constructor.
if (ts_stack_.empty()) {
assert(old_tts = type_spec_);
return;
}
switch (TTS->ttype) {
case T_STRUCT:
assert(old_tts == FTS);
break;
case T_LIST:
case T_SET:
assert(old_tts == ST1);
ts_stack_.push_back(old_tts);
break;
case T_MAP:
assert(old_tts == (mkv_stack_.back() ? ST1 : ST2));
mkv_stack_.back() = !mkv_stack_.back();
ts_stack_.push_back(mkv_stack_.back() ? ST1 : ST2);
break;
default:
assert(!"Invalid TType in stateTransition.");
break;
}
}
/*
* Variable-length quantity functions.
*/
inline uint32_t TDenseProtocol::vlqRead(uint64_t& vlq) {
uint32_t used = 0;
uint64_t val = 0;
uint8_t buf[10]; // 64 bits / (7 bits/byte) = 10 bytes.
uint32_t buf_size = sizeof(buf);
const uint8_t* borrowed = trans_->borrow(buf, &buf_size);
// Fast path. TODO(dreiss): Make it faster.
if (borrowed != NULL) {
while (true) {
uint8_t byte = borrowed[used];
used++;
val = (val << 7) | (byte & 0x7f);
if (!(byte & 0x80)) {
vlq = val;
trans_->consume(used);
return used;
}
// Have to check for invalid data so we don't crash.
if (UNLIKELY(used == sizeof(buf))) {
resetState();
throw TProtocolException(TProtocolException::INVALID_DATA, "Variable-length int over 10 bytes.");
}
}
}
// Slow path.
else {
while (true) {
uint8_t byte;
used += trans_->readAll(&byte, 1);
val = (val << 7) | (byte & 0x7f);
if (!(byte & 0x80)) {
vlq = val;
return used;
}
// Might as well check for invalid data on the slow path too.
if (UNLIKELY(used >= sizeof(buf))) {
resetState();
throw TProtocolException(TProtocolException::INVALID_DATA, "Variable-length int over 10 bytes.");
}
}
}
}
inline uint32_t TDenseProtocol::vlqWrite(uint64_t vlq) {
uint8_t buf[10]; // 64 bits / (7 bits/byte) = 10 bytes.
int32_t pos = sizeof(buf) - 1;
// Write the thing from back to front.
buf[pos] = vlq & 0x7f;
vlq >>= 7;
pos--;
while (vlq > 0) {
assert(pos >= 0);
buf[pos] = static_cast<uint8_t>(vlq | 0x80);
vlq >>= 7;
pos--;
}
// Back up one step before writing.
pos++;
trans_->write(buf+pos, sizeof(buf) - pos);
return sizeof(buf) - pos;
}
/*
* Writing functions.
*/
uint32_t TDenseProtocol::writeMessageBegin(const std::string& name,
const TMessageType messageType,
const int32_t seqid) {
throw TException("TDenseProtocol doesn't work with messages (yet).");
int32_t version = (VERSION_2) | ((int32_t)messageType);
uint32_t wsize = 0;
wsize += subWriteI32(version);
wsize += subWriteString(name);
wsize += subWriteI32(seqid);
return wsize;
}
uint32_t TDenseProtocol::writeMessageEnd() {
return 0;
}
uint32_t TDenseProtocol::writeStructBegin(const char* name) {
(void) name;
uint32_t xfer = 0;
// The TypeSpec stack should be empty if this is the top-level read/write.
// If it is, we push the TypeSpec passed to the constructor.
if (ts_stack_.empty()) {
assert(standalone_);
if (type_spec_ == NULL) {
resetState();
throw TException("TDenseProtocol: No type specified.");
} else {
assert(type_spec_->ttype == T_STRUCT);
ts_stack_.push_back(type_spec_);
// Write out a prefix of the structure fingerprint.
trans_->write(type_spec_->fp_prefix, FP_PREFIX_LEN);
xfer += FP_PREFIX_LEN;
}
}
// We need a new field index for this structure.
idx_stack_.push_back(0);
return 0;
}
uint32_t TDenseProtocol::writeStructEnd() {
idx_stack_.pop_back();
stateTransition();
return 0;
}
uint32_t TDenseProtocol::writeFieldBegin(const char* name,
const TType fieldType,
const int16_t fieldId) {
(void) name;
uint32_t xfer = 0;
// Skip over optional fields.
while (FMT.tag != fieldId) {
// TODO(dreiss): Old meta here.
assert(FTS->ttype != T_STOP);
assert(FMT.is_optional);
// Write a zero byte so the reader can skip it.
xfer += subWriteBool(false);
// And advance to the next field.
IDX++;
}
// TODO(dreiss): give a better exception.
assert(FTS->ttype == fieldType);
if (FMT.is_optional) {
subWriteBool(true);
xfer += 1;
}
// writeFieldStop shares all lot of logic up to this point.
// Instead of replicating it all, we just call this method from that one
// and use a gross special case here.
if (UNLIKELY(FTS->ttype != T_STOP)) {
// For normal fields, push the TypeSpec that we're about to use.
ts_stack_.push_back(FTS);
}
return xfer;
}
uint32_t TDenseProtocol::writeFieldEnd() {
// Just move on to the next field.
IDX++;
return 0;
}
uint32_t TDenseProtocol::writeFieldStop() {
return TDenseProtocol::writeFieldBegin("", T_STOP, 0);
}
uint32_t TDenseProtocol::writeMapBegin(const TType keyType,
const TType valType,
const uint32_t size) {
checkTType(T_MAP);
assert(keyType == ST1->ttype);
assert(valType == ST2->ttype);
ts_stack_.push_back(ST1);
mkv_stack_.push_back(true);
return subWriteI32((int32_t)size);
}
uint32_t TDenseProtocol::writeMapEnd() {
// Pop off the value type, as well as our entry in the map key/value stack.
// stateTransition takes care of popping off our TypeSpec.
ts_stack_.pop_back();
mkv_stack_.pop_back();
stateTransition();
return 0;
}
uint32_t TDenseProtocol::writeListBegin(const TType elemType,
const uint32_t size) {
checkTType(T_LIST);
assert(elemType == ST1->ttype);
ts_stack_.push_back(ST1);
return subWriteI32((int32_t)size);
}
uint32_t TDenseProtocol::writeListEnd() {
// Pop off the element type. stateTransition takes care of popping off ours.
ts_stack_.pop_back();
stateTransition();
return 0;
}
uint32_t TDenseProtocol::writeSetBegin(const TType elemType,
const uint32_t size) {
checkTType(T_SET);
assert(elemType == ST1->ttype);
ts_stack_.push_back(ST1);
return subWriteI32((int32_t)size);
}
uint32_t TDenseProtocol::writeSetEnd() {
// Pop off the element type. stateTransition takes care of popping off ours.
ts_stack_.pop_back();
stateTransition();
return 0;
}
uint32_t TDenseProtocol::writeBool(const bool value) {
checkTType(T_BOOL);
stateTransition();
return TBinaryProtocol::writeBool(value);
}
uint32_t TDenseProtocol::writeByte(const int8_t byte) {
checkTType(T_BYTE);
stateTransition();
return TBinaryProtocol::writeByte(byte);
}
uint32_t TDenseProtocol::writeI16(const int16_t i16) {
checkTType(T_I16);
stateTransition();
return vlqWrite(i16);
}
uint32_t TDenseProtocol::writeI32(const int32_t i32) {
checkTType(T_I32);
stateTransition();
return vlqWrite(i32);
}
uint32_t TDenseProtocol::writeI64(const int64_t i64) {
checkTType(T_I64);
stateTransition();
return vlqWrite(i64);
}
uint32_t TDenseProtocol::writeDouble(const double dub) {
checkTType(T_DOUBLE);
stateTransition();
return TBinaryProtocol::writeDouble(dub);
}
uint32_t TDenseProtocol::writeString(const std::string& str) {
checkTType(T_STRING);
stateTransition();
return subWriteString(str);
}
uint32_t TDenseProtocol::writeBinary(const std::string& str) {
return TDenseProtocol::writeString(str);
}
inline uint32_t TDenseProtocol::subWriteI32(const int32_t i32) {
return vlqWrite(i32);
}
uint32_t TDenseProtocol::subWriteString(const std::string& str) {
if(str.size() > static_cast<size_t>((std::numeric_limits<int32_t>::max)()))
throw TProtocolException(TProtocolException::SIZE_LIMIT);
uint32_t size = static_cast<uint32_t>(str.size());
uint32_t xfer = subWriteI32((int32_t)size);
if (size > 0) {
trans_->write((uint8_t*)str.data(), size);
}
return xfer + size;
}
/*
* Reading functions
*
* These have a lot of the same logic as the writing functions, so if
* something is confusing, look for comments in the corresponding writer.
*/
uint32_t TDenseProtocol::readMessageBegin(std::string& name,
TMessageType& messageType,
int32_t& seqid) {
throw TException("TDenseProtocol doesn't work with messages (yet).");
uint32_t xfer = 0;
int32_t sz;
xfer += subReadI32(sz);
if (sz < 0) {
// Check for correct version number
int32_t version = sz & VERSION_MASK;
if (version != VERSION_2) {
throw TProtocolException(TProtocolException::BAD_VERSION, "Bad version identifier");
}
messageType = (TMessageType)(sz & 0x000000ff);
xfer += subReadString(name);
xfer += subReadI32(seqid);
} else {
throw TProtocolException(TProtocolException::BAD_VERSION, "No version identifier... old protocol client in strict mode?");
}
return xfer;
}
uint32_t TDenseProtocol::readMessageEnd() {
return 0;
}
uint32_t TDenseProtocol::readStructBegin(string& name) {
(void) name;
uint32_t xfer = 0;
if (ts_stack_.empty()) {
assert(standalone_);
if (type_spec_ == NULL) {
resetState();
throw TException("TDenseProtocol: No type specified.");
} else {
assert(type_spec_->ttype == T_STRUCT);
ts_stack_.push_back(type_spec_);
// Check the fingerprint prefix.
uint8_t buf[FP_PREFIX_LEN];
xfer += trans_->read(buf, FP_PREFIX_LEN);
if (std::memcmp(buf, type_spec_->fp_prefix, FP_PREFIX_LEN) != 0) {
resetState();
throw TProtocolException(TProtocolException::INVALID_DATA,
"Fingerprint in data does not match type_spec.");
}
}
}
// We need a new field index for this structure.
idx_stack_.push_back(0);
return 0;
}
uint32_t TDenseProtocol::readStructEnd() {
idx_stack_.pop_back();
stateTransition();
return 0;
}
uint32_t TDenseProtocol::readFieldBegin(string& name,
TType& fieldType,
int16_t& fieldId) {
(void) name;
uint32_t xfer = 0;
// For optional fields, check to see if they are there.
while (FMT.is_optional) {
bool is_present;
xfer += subReadBool(is_present);
if (is_present) {
break;
}
IDX++;
}
// Once we hit a mandatory field, or an optional field that is present,
// we know that FMT and FTS point to the appropriate field.
fieldId = FMT.tag;
fieldType = FTS->ttype;
// Normally, we push the TypeSpec that we are about to read,
// but no reading is done for T_STOP.
if (FTS->ttype != T_STOP) {
ts_stack_.push_back(FTS);
}
return xfer;
}
uint32_t TDenseProtocol::readFieldEnd() {
IDX++;
return 0;
}
uint32_t TDenseProtocol::readMapBegin(TType& keyType,
TType& valType,
uint32_t& size) {
checkTType(T_MAP);
uint32_t xfer = 0;
int32_t sizei;
xfer += subReadI32(sizei);
if (sizei < 0) {
resetState();
throw TProtocolException(TProtocolException::NEGATIVE_SIZE);
} else if (container_limit_ && sizei > container_limit_) {
resetState();
throw TProtocolException(TProtocolException::SIZE_LIMIT);
}
size = (uint32_t)sizei;
keyType = ST1->ttype;
valType = ST2->ttype;
ts_stack_.push_back(ST1);
mkv_stack_.push_back(true);
return xfer;
}
uint32_t TDenseProtocol::readMapEnd() {
ts_stack_.pop_back();
mkv_stack_.pop_back();
stateTransition();
return 0;
}
uint32_t TDenseProtocol::readListBegin(TType& elemType,
uint32_t& size) {
checkTType(T_LIST);
uint32_t xfer = 0;
int32_t sizei;
xfer += subReadI32(sizei);
if (sizei < 0) {
resetState();
throw TProtocolException(TProtocolException::NEGATIVE_SIZE);
} else if (container_limit_ && sizei > container_limit_) {
resetState();
throw TProtocolException(TProtocolException::SIZE_LIMIT);
}
size = (uint32_t)sizei;
elemType = ST1->ttype;
ts_stack_.push_back(ST1);
return xfer;
}
uint32_t TDenseProtocol::readListEnd() {
ts_stack_.pop_back();
stateTransition();
return 0;
}
uint32_t TDenseProtocol::readSetBegin(TType& elemType,
uint32_t& size) {
checkTType(T_SET);
uint32_t xfer = 0;
int32_t sizei;
xfer += subReadI32(sizei);
if (sizei < 0) {
resetState();
throw TProtocolException(TProtocolException::NEGATIVE_SIZE);
} else if (container_limit_ && sizei > container_limit_) {
resetState();
throw TProtocolException(TProtocolException::SIZE_LIMIT);
}
size = (uint32_t)sizei;
elemType = ST1->ttype;
ts_stack_.push_back(ST1);
return xfer;
}
uint32_t TDenseProtocol::readSetEnd() {
ts_stack_.pop_back();
stateTransition();
return 0;
}
uint32_t TDenseProtocol::readBool(bool& value) {
checkTType(T_BOOL);
stateTransition();
return TBinaryProtocol::readBool(value);
}
uint32_t TDenseProtocol::readByte(int8_t& byte) {
checkTType(T_BYTE);
stateTransition();
return TBinaryProtocol::readByte(byte);
}
uint32_t TDenseProtocol::readI16(int16_t& i16) {
checkTType(T_I16);
stateTransition();
uint64_t u64;
uint32_t rv = vlqRead(u64);
int64_t val = (int64_t)u64;
if (UNLIKELY(val > INT16_MAX || val < INT16_MIN)) {
resetState();
throw TProtocolException(TProtocolException::INVALID_DATA,
"i16 out of range.");
}
i16 = (int16_t)val;
return rv;
}
uint32_t TDenseProtocol::readI32(int32_t& i32) {
checkTType(T_I32);
stateTransition();
uint64_t u64;
uint32_t rv = vlqRead(u64);
int64_t val = (int64_t)u64;
if (UNLIKELY(val > INT32_MAX || val < INT32_MIN)) {
resetState();
throw TProtocolException(TProtocolException::INVALID_DATA,
"i32 out of range.");
}
i32 = (int32_t)val;
return rv;
}
uint32_t TDenseProtocol::readI64(int64_t& i64) {
checkTType(T_I64);
stateTransition();
uint64_t u64;
uint32_t rv = vlqRead(u64);
int64_t val = (int64_t)u64;
if (UNLIKELY(val > INT64_MAX || val < INT64_MIN)) {
resetState();
throw TProtocolException(TProtocolException::INVALID_DATA,
"i64 out of range.");
}
i64 = (int64_t)val;
return rv;
}
uint32_t TDenseProtocol::readDouble(double& dub) {
checkTType(T_DOUBLE);
stateTransition();
return TBinaryProtocol::readDouble(dub);
}
uint32_t TDenseProtocol::readString(std::string& str) {
checkTType(T_STRING);
stateTransition();
return subReadString(str);
}
uint32_t TDenseProtocol::readBinary(std::string& str) {
return TDenseProtocol::readString(str);
}
uint32_t TDenseProtocol::subReadI32(int32_t& i32) {
uint64_t u64;
uint32_t rv = vlqRead(u64);
int64_t val = (int64_t)u64;
if (UNLIKELY(val > INT32_MAX || val < INT32_MIN)) {
resetState();
throw TProtocolException(TProtocolException::INVALID_DATA,
"i32 out of range.");
}
i32 = (int32_t)val;
return rv;
}
uint32_t TDenseProtocol::subReadString(std::string& str) {
uint32_t xfer;
int32_t size;
xfer = subReadI32(size);
return xfer + readStringBody(str, size);
}
}}} // apache::thrift::protocol

File diff suppressed because it is too large Load diff

View file

@ -1,179 +0,0 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
#include <thrift/qt/TQIODeviceTransport.h>
#include <QAbstractSocket>
#include <QIODevice>
#include <thrift/transport/TBufferTransports.h>
using boost::shared_ptr;
namespace apache { namespace thrift { namespace transport {
TQIODeviceTransport::TQIODeviceTransport(shared_ptr<QIODevice> dev)
: dev_(dev)
{
}
TQIODeviceTransport::~TQIODeviceTransport()
{
dev_->close();
}
void TQIODeviceTransport::open()
{
if (!isOpen()) {
throw TTransportException(TTransportException::NOT_OPEN,
"open(): underlying QIODevice isn't open");
}
}
bool TQIODeviceTransport::isOpen()
{
return dev_->isOpen();
}
bool TQIODeviceTransport::peek()
{
return dev_->bytesAvailable() > 0;
}
void TQIODeviceTransport::close()
{
dev_->close();
}
uint32_t TQIODeviceTransport::readAll(uint8_t* buf, uint32_t len)
{
uint32_t requestLen = len;
while (len) {
uint32_t readSize;
try {
readSize = read(buf, len);
} catch (...) {
if (len != requestLen) {
// something read already
return requestLen - len;
}
// error but nothing read yet
throw;
}
if (readSize == 0) {
dev_->waitForReadyRead(50);
} else {
buf += readSize;
len -= readSize;
}
}
return requestLen;
}
uint32_t TQIODeviceTransport::read(uint8_t* buf, uint32_t len)
{
uint32_t actualSize;
qint64 readSize;
if (!dev_->isOpen()) {
throw TTransportException(TTransportException::NOT_OPEN,
"read(): underlying QIODevice is not open");
}
actualSize = (uint32_t)std::min((qint64)len, dev_->bytesAvailable());
readSize = dev_->read(reinterpret_cast<char *>(buf), actualSize);
if (readSize < 0) {
QAbstractSocket* socket;
if ((socket = qobject_cast<QAbstractSocket* >(dev_.get()))) {
throw TTransportException(TTransportException::UNKNOWN,
"Failed to read() from QAbstractSocket",
socket->error());
}
throw TTransportException(TTransportException::UNKNOWN,
"Failed to read from from QIODevice");
}
return (uint32_t)readSize;
}
void TQIODeviceTransport::write(const uint8_t* buf, uint32_t len)
{
while (len) {
uint32_t written = write_partial(buf, len);
len -= written;
dev_->waitForBytesWritten(50);
}
}
uint32_t TQIODeviceTransport::write_partial(const uint8_t* buf, uint32_t len)
{
qint64 written;
if (!dev_->isOpen()) {
throw TTransportException(TTransportException::NOT_OPEN,
"write_partial(): underlying QIODevice is not open");
}
written = dev_->write(reinterpret_cast<const char*>(buf), len);
if (written < 0) {
QAbstractSocket* socket;
if ((socket = qobject_cast<QAbstractSocket*>(dev_.get()))) {
throw TTransportException(TTransportException::UNKNOWN,
"write_partial(): failed to write to QAbstractSocket", socket->error());
}
throw TTransportException(TTransportException::UNKNOWN,
"write_partial(): failed to write to underlying QIODevice");
}
return (uint32_t)written;
}
void TQIODeviceTransport::flush()
{
if (!dev_->isOpen()) {
throw TTransportException(TTransportException::NOT_OPEN,
"flush(): underlying QIODevice is not open");
}
QAbstractSocket* socket;
if ((socket = qobject_cast<QAbstractSocket*>(dev_.get()))) {
socket->flush();
} else {
dev_->waitForBytesWritten(1);
}
}
uint8_t* TQIODeviceTransport::borrow(uint8_t* buf, uint32_t* len)
{
(void) buf;
(void) len;
return NULL;
}
void TQIODeviceTransport::consume(uint32_t len)
{
(void) len;
throw TTransportException(TTransportException::UNKNOWN);
}
}}} // apache::thrift::transport

View file

@ -1,157 +0,0 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
#include "TQTcpServer.h"
#include "TQIODeviceTransport.h"
#include <QTcpSocket>
#include <tr1/functional>
#include <thrift/protocol/TProtocol.h>
#include <thrift/async/TAsyncProcessor.h>
using boost::shared_ptr;
using apache::thrift::protocol::TProtocol;
using apache::thrift::protocol::TProtocolFactory;
using apache::thrift::transport::TTransport;
using apache::thrift::transport::TTransportException;
using apache::thrift::transport::TQIODeviceTransport;
using std::tr1::function;
using std::tr1::bind;
QT_USE_NAMESPACE
namespace apache { namespace thrift { namespace async {
struct TQTcpServer::ConnectionContext {
shared_ptr<QTcpSocket> connection_;
shared_ptr<TTransport> transport_;
shared_ptr<TProtocol> iprot_;
shared_ptr<TProtocol> oprot_;
explicit ConnectionContext(shared_ptr<QTcpSocket> connection,
shared_ptr<TTransport> transport,
shared_ptr<TProtocol> iprot,
shared_ptr<TProtocol> oprot)
: connection_(connection)
, transport_(transport)
, iprot_(iprot)
, oprot_(oprot)
{}
};
TQTcpServer::TQTcpServer(shared_ptr<QTcpServer> server,
shared_ptr<TAsyncProcessor> processor,
shared_ptr<TProtocolFactory> pfact,
QObject* parent)
: QObject(parent)
, server_(server)
, processor_(processor)
, pfact_(pfact)
{
connect(server.get(), SIGNAL(newConnection()), SLOT(processIncoming()));
}
TQTcpServer::~TQTcpServer()
{
}
void TQTcpServer::processIncoming()
{
while (server_->hasPendingConnections()) {
// take ownership of the QTcpSocket; technically it could be deleted
// when the QTcpServer is destroyed, but any real app should delete this
// class before deleting the QTcpServer that we are using
shared_ptr<QTcpSocket> connection(server_->nextPendingConnection());
shared_ptr<TTransport> transport;
shared_ptr<TProtocol> iprot;
shared_ptr<TProtocol> oprot;
try {
transport = shared_ptr<TTransport>(new TQIODeviceTransport(connection));
iprot = shared_ptr<TProtocol>(pfact_->getProtocol(transport));
oprot = shared_ptr<TProtocol>(pfact_->getProtocol(transport));
} catch(...) {
qWarning("[TQTcpServer] Failed to initialize transports/protocols");
continue;
}
ctxMap_[connection.get()] =
shared_ptr<ConnectionContext>(
new ConnectionContext(connection, transport, iprot, oprot));
connect(connection.get(), SIGNAL(readyRead()), SLOT(beginDecode()));
// need to use QueuedConnection since we will be deleting the socket in the slot
connect(connection.get(), SIGNAL(disconnected()), SLOT(socketClosed()),
Qt::QueuedConnection);
}
}
void TQTcpServer::beginDecode()
{
QTcpSocket* connection(qobject_cast<QTcpSocket*>(sender()));
Q_ASSERT(connection);
if (ctxMap_.find(connection) == ctxMap_.end()) {
qWarning("[TQTcpServer] Got data on an unknown QTcpSocket");
return;
}
shared_ptr<ConnectionContext> ctx = ctxMap_[connection];
try {
processor_->process(
bind(&TQTcpServer::finish, this,
ctx, std::tr1::placeholders::_1),
ctx->iprot_, ctx->oprot_);
} catch(const TTransportException& ex) {
qWarning("[TQTcpServer] TTransportException during processing: '%s'",
ex.what());
ctxMap_.erase(connection);
} catch(...) {
qWarning("[TQTcpServer] Unknown processor exception");
ctxMap_.erase(connection);
}
}
void TQTcpServer::socketClosed()
{
QTcpSocket* connection(qobject_cast<QTcpSocket*>(sender()));
Q_ASSERT(connection);
if (ctxMap_.find(connection) == ctxMap_.end()) {
qWarning("[TQTcpServer] Unknown QTcpSocket closed");
return;
}
ctxMap_.erase(connection);
}
void TQTcpServer::finish(shared_ptr<ConnectionContext> ctx, bool healthy)
{
if (!healthy) {
qWarning("[TQTcpServer] Processor failed to process data successfully");
ctxMap_.erase(ctx->connection_.get());
}
}
}}} // apache::thrift::async

View file

@ -1,100 +0,0 @@
/****************************************************************************
** Meta object code from reading C++ file 'TQTcpServer.h'
**
** Created: Thu Oct 11 18:00:54 2012
** by: The Qt Meta Object Compiler version 63 (Qt 4.8.1)
**
** WARNING! All changes made in this file will be lost!
*****************************************************************************/
#include "TQTcpServer.h"
#if !defined(Q_MOC_OUTPUT_REVISION)
#error "The header file 'TQTcpServer.h' doesn't include <QObject>."
#elif Q_MOC_OUTPUT_REVISION != 63
#error "This file was generated using the moc from 4.8.1. It"
#error "cannot be used with the include files from this version of Qt."
#error "(The moc has changed too much.)"
#endif
QT_BEGIN_MOC_NAMESPACE
static const uint qt_meta_data_apache__thrift__async__TQTcpServer[] = {
// content:
6, // revision
0, // classname
0, 0, // classinfo
3, 14, // methods
0, 0, // properties
0, 0, // enums/sets
0, 0, // constructors
0, // flags
0, // signalCount
// slots: signature, parameters, type, tag, flags
36, 35, 35, 35, 0x08,
54, 35, 35, 35, 0x08,
68, 35, 35, 35, 0x08,
0 // eod
};
static const char qt_meta_stringdata_apache__thrift__async__TQTcpServer[] = {
"apache::thrift::async::TQTcpServer\0\0"
"processIncoming()\0beginDecode()\0"
"socketClosed()\0"
};
void apache::thrift::async::TQTcpServer::qt_static_metacall(QObject *_o, QMetaObject::Call _c, int _id, void **_a)
{
if (_c == QMetaObject::InvokeMetaMethod) {
Q_ASSERT(staticMetaObject.cast(_o));
TQTcpServer *_t = static_cast<TQTcpServer *>(_o);
switch (_id) {
case 0: _t->processIncoming(); break;
case 1: _t->beginDecode(); break;
case 2: _t->socketClosed(); break;
default: ;
}
}
Q_UNUSED(_a);
}
const QMetaObjectExtraData apache::thrift::async::TQTcpServer::staticMetaObjectExtraData = {
0, qt_static_metacall
};
const QMetaObject apache::thrift::async::TQTcpServer::staticMetaObject = {
{ &QObject::staticMetaObject, qt_meta_stringdata_apache__thrift__async__TQTcpServer,
qt_meta_data_apache__thrift__async__TQTcpServer, &staticMetaObjectExtraData }
};
#ifdef Q_NO_DATA_RELOCATION
const QMetaObject &apache::thrift::async::TQTcpServer::getStaticMetaObject() { return staticMetaObject; }
#endif //Q_NO_DATA_RELOCATION
const QMetaObject *apache::thrift::async::TQTcpServer::metaObject() const
{
return QObject::d_ptr->metaObject ? QObject::d_ptr->metaObject : &staticMetaObject;
}
void *apache::thrift::async::TQTcpServer::qt_metacast(const char *_clname)
{
if (!_clname) return 0;
if (!strcmp(_clname, qt_meta_stringdata_apache__thrift__async__TQTcpServer))
return static_cast<void*>(const_cast< TQTcpServer*>(this));
return QObject::qt_metacast(_clname);
}
int apache::thrift::async::TQTcpServer::qt_metacall(QMetaObject::Call _c, int _id, void **_a)
{
_id = QObject::qt_metacall(_c, _id, _a);
if (_id < 0)
return _id;
if (_c == QMetaObject::InvokeMetaMethod) {
if (_id < 3)
qt_static_metacall(this, _c, _id, _a);
_id -= 3;
}
return _id;
}
QT_END_MOC_NAMESPACE

View file

@ -1,49 +0,0 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#ifdef HAVE_SYS_TIME_H
#include <sys/time.h>
#endif
#ifdef HAVE_SYS_RESOURCE_H
#include <sys/resource.h>
#endif
#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif
namespace apache { namespace thrift { namespace server {
int increase_max_fds(int max_fds=(1<<24)) {
struct rlimit fdmaxrl;
for(fdmaxrl.rlim_cur = max_fds, fdmaxrl.rlim_max = max_fds;
max_fds && (setrlimit(RLIMIT_NOFILE, &fdmaxrl) < 0);
fdmaxrl.rlim_cur = max_fds, fdmaxrl.rlim_max = max_fds) {
max_fds /= 2;
}
return fdmaxrl.rlim_cur;
}
}}} // apache::thrift::server

View file

@ -1,153 +0,0 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
#include <thrift/server/TSimpleServer.h>
#include <thrift/transport/TTransportException.h>
#include <string>
#include <iostream>
namespace apache { namespace thrift { namespace server {
using namespace std;
using namespace apache::thrift;
using namespace apache::thrift::protocol;
using namespace apache::thrift::transport;
using boost::shared_ptr;
/**
* A simple single-threaded application server. Perfect for unit tests!
*
*/
void TSimpleServer::serve() {
shared_ptr<TTransport> client;
shared_ptr<TTransport> inputTransport;
shared_ptr<TTransport> outputTransport;
shared_ptr<TProtocol> inputProtocol;
shared_ptr<TProtocol> outputProtocol;
// Start the server listening
serverTransport_->listen();
// Run the preServe event
if (eventHandler_ != NULL) {
eventHandler_->preServe();
}
// Fetch client from server
while (!stop_) {
try {
client = serverTransport_->accept();
inputTransport = inputTransportFactory_->getTransport(client);
outputTransport = outputTransportFactory_->getTransport(client);
inputProtocol = inputProtocolFactory_->getProtocol(inputTransport);
outputProtocol = outputProtocolFactory_->getProtocol(outputTransport);
} catch (TTransportException& ttx) {
if (inputTransport != NULL) { inputTransport->close(); }
if (outputTransport != NULL) { outputTransport->close(); }
if (client != NULL) { client->close(); }
if (!stop_ || ttx.getType() != TTransportException::INTERRUPTED) {
string errStr = string("TServerTransport died on accept: ") + ttx.what();
GlobalOutput(errStr.c_str());
}
continue;
} catch (TException& tx) {
if (inputTransport != NULL) { inputTransport->close(); }
if (outputTransport != NULL) { outputTransport->close(); }
if (client != NULL) { client->close(); }
string errStr = string("Some kind of accept exception: ") + tx.what();
GlobalOutput(errStr.c_str());
continue;
} catch (string s) {
if (inputTransport != NULL) { inputTransport->close(); }
if (outputTransport != NULL) { outputTransport->close(); }
if (client != NULL) { client->close(); }
string errStr = string("Some kind of accept exception: ") + s;
GlobalOutput(errStr.c_str());
break;
}
// Get the processor
shared_ptr<TProcessor> processor = getProcessor(inputProtocol,
outputProtocol, client);
void* connectionContext = NULL;
if (eventHandler_ != NULL) {
connectionContext = eventHandler_->createContext(inputProtocol, outputProtocol);
}
try {
for (;;) {
if (eventHandler_ != NULL) {
eventHandler_->processContext(connectionContext, client);
}
if (!processor->process(inputProtocol, outputProtocol,
connectionContext) ||
// Peek ahead, is the remote side closed?
!inputProtocol->getTransport()->peek()) {
break;
}
}
} catch (const TTransportException& ttx) {
string errStr = string("TSimpleServer client died: ") + ttx.what();
GlobalOutput(errStr.c_str());
} catch (const std::exception& x) {
GlobalOutput.printf("TSimpleServer exception: %s: %s",
typeid(x).name(), x.what());
} catch (...) {
GlobalOutput("TSimpleServer uncaught exception.");
}
if (eventHandler_ != NULL) {
eventHandler_->deleteContext(connectionContext, inputProtocol, outputProtocol);
}
try {
inputTransport->close();
} catch (const TTransportException& ttx) {
string errStr = string("TSimpleServer input close failed: ")
+ ttx.what();
GlobalOutput(errStr.c_str());
}
try {
outputTransport->close();
} catch (const TTransportException& ttx) {
string errStr = string("TSimpleServer output close failed: ")
+ ttx.what();
GlobalOutput(errStr.c_str());
}
try {
client->close();
} catch (const TTransportException& ttx) {
string errStr = string("TSimpleServer client close failed: ")
+ ttx.what();
GlobalOutput(errStr.c_str());
}
}
if (stop_) {
try {
serverTransport_->close();
} catch (TTransportException &ttx) {
string errStr = string("TServerTransport failed on close: ") + ttx.what();
GlobalOutput(errStr.c_str());
}
stop_ = false;
}
}
}}} // apache::thrift::server

View file

@ -1,205 +0,0 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#include <thrift/server/TThreadPoolServer.h>
#include <thrift/transport/TTransportException.h>
#include <thrift/concurrency/Thread.h>
#include <thrift/concurrency/ThreadManager.h>
#include <string>
#include <iostream>
namespace apache { namespace thrift { namespace server {
using boost::shared_ptr;
using namespace std;
using namespace apache::thrift;
using namespace apache::thrift::concurrency;
using namespace apache::thrift::protocol;
using namespace apache::thrift::transport;
class TThreadPoolServer::Task : public Runnable {
public:
Task(TThreadPoolServer &server,
shared_ptr<TProcessor> processor,
shared_ptr<TProtocol> input,
shared_ptr<TProtocol> output,
shared_ptr<TTransport> transport) :
server_(server),
processor_(processor),
input_(input),
output_(output),
transport_(transport) {
}
~Task() {}
void run() {
boost::shared_ptr<TServerEventHandler> eventHandler =
server_.getEventHandler();
void* connectionContext = NULL;
if (eventHandler != NULL) {
connectionContext = eventHandler->createContext(input_, output_);
}
try {
for (;;) {
if (eventHandler != NULL) {
eventHandler->processContext(connectionContext, transport_);
}
if (!processor_->process(input_, output_, connectionContext) ||
!input_->getTransport()->peek()) {
break;
}
}
} catch (const TTransportException&) {
// This is reasonably expected, client didn't send a full request so just
// ignore him
// string errStr = string("TThreadPoolServer client died: ") + ttx.what();
// GlobalOutput(errStr.c_str());
} catch (const std::exception& x) {
GlobalOutput.printf("TThreadPoolServer exception %s: %s",
typeid(x).name(), x.what());
} catch (...) {
GlobalOutput("TThreadPoolServer, unexpected exception in "
"TThreadPoolServer::Task::run()");
}
if (eventHandler != NULL) {
eventHandler->deleteContext(connectionContext, input_, output_);
}
try {
input_->getTransport()->close();
} catch (TTransportException& ttx) {
string errStr = string("TThreadPoolServer input close failed: ") + ttx.what();
GlobalOutput(errStr.c_str());
}
try {
output_->getTransport()->close();
} catch (TTransportException& ttx) {
string errStr = string("TThreadPoolServer output close failed: ") + ttx.what();
GlobalOutput(errStr.c_str());
}
}
private:
TServer& server_;
shared_ptr<TProcessor> processor_;
shared_ptr<TProtocol> input_;
shared_ptr<TProtocol> output_;
shared_ptr<TTransport> transport_;
};
TThreadPoolServer::~TThreadPoolServer() {}
void TThreadPoolServer::serve() {
shared_ptr<TTransport> client;
shared_ptr<TTransport> inputTransport;
shared_ptr<TTransport> outputTransport;
shared_ptr<TProtocol> inputProtocol;
shared_ptr<TProtocol> outputProtocol;
// Start the server listening
serverTransport_->listen();
// Run the preServe event
if (eventHandler_ != NULL) {
eventHandler_->preServe();
}
while (!stop_) {
try {
client.reset();
inputTransport.reset();
outputTransport.reset();
inputProtocol.reset();
outputProtocol.reset();
// Fetch client from server
client = serverTransport_->accept();
// Make IO transports
inputTransport = inputTransportFactory_->getTransport(client);
outputTransport = outputTransportFactory_->getTransport(client);
inputProtocol = inputProtocolFactory_->getProtocol(inputTransport);
outputProtocol = outputProtocolFactory_->getProtocol(outputTransport);
shared_ptr<TProcessor> processor = getProcessor(inputProtocol,
outputProtocol, client);
// Add to threadmanager pool
shared_ptr<TThreadPoolServer::Task> task(new TThreadPoolServer::Task(
*this, processor, inputProtocol, outputProtocol, client));
threadManager_->add(task, timeout_);
} catch (TTransportException& ttx) {
if (inputTransport != NULL) { inputTransport->close(); }
if (outputTransport != NULL) { outputTransport->close(); }
if (client != NULL) { client->close(); }
if (!stop_ || ttx.getType() != TTransportException::INTERRUPTED) {
string errStr = string("TThreadPoolServer: TServerTransport died on accept: ") + ttx.what();
GlobalOutput(errStr.c_str());
}
continue;
} catch (TException& tx) {
if (inputTransport != NULL) { inputTransport->close(); }
if (outputTransport != NULL) { outputTransport->close(); }
if (client != NULL) { client->close(); }
string errStr = string("TThreadPoolServer: Caught TException: ") + tx.what();
GlobalOutput(errStr.c_str());
continue;
} catch (string s) {
if (inputTransport != NULL) { inputTransport->close(); }
if (outputTransport != NULL) { outputTransport->close(); }
if (client != NULL) { client->close(); }
string errStr = "TThreadPoolServer: Unknown exception: " + s;
GlobalOutput(errStr.c_str());
break;
}
}
// If stopped manually, join the existing threads
if (stop_) {
try {
serverTransport_->close();
threadManager_->join();
} catch (TException &tx) {
string errStr = string("TThreadPoolServer: Exception shutting down: ") + tx.what();
GlobalOutput(errStr.c_str());
}
stop_ = false;
}
}
int64_t TThreadPoolServer::getTimeout() const {
return timeout_;
}
void TThreadPoolServer::setTimeout(int64_t value) {
timeout_ = value;
}
}}} // apache::thrift::server

View file

@ -1,241 +0,0 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
#include <thrift/server/TThreadedServer.h>
#include <thrift/transport/TTransportException.h>
#include <thrift/concurrency/PlatformThreadFactory.h>
#include <string>
#include <iostream>
#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif
namespace apache { namespace thrift { namespace server {
using boost::shared_ptr;
using namespace std;
using namespace apache::thrift;
using namespace apache::thrift::protocol;
using namespace apache::thrift::transport;
using namespace apache::thrift::concurrency;
class TThreadedServer::Task: public Runnable {
public:
Task(TThreadedServer& server,
shared_ptr<TProcessor> processor,
shared_ptr<TProtocol> input,
shared_ptr<TProtocol> output,
shared_ptr<TTransport> transport) :
server_(server),
processor_(processor),
input_(input),
output_(output),
transport_(transport) {
}
~Task() {}
void run() {
boost::shared_ptr<TServerEventHandler> eventHandler =
server_.getEventHandler();
void* connectionContext = NULL;
if (eventHandler != NULL) {
connectionContext = eventHandler->createContext(input_, output_);
}
try {
for (;;) {
if (eventHandler != NULL) {
eventHandler->processContext(connectionContext, transport_);
}
if (!processor_->process(input_, output_, connectionContext) ||
!input_->getTransport()->peek()) {
break;
}
}
} catch (const TTransportException& ttx) {
if (ttx.getType() != TTransportException::END_OF_FILE) {
string errStr = string("TThreadedServer client died: ") + ttx.what();
GlobalOutput(errStr.c_str());
}
} catch (const std::exception &x) {
GlobalOutput.printf("TThreadedServer exception: %s: %s",
typeid(x).name(), x.what());
} catch (...) {
GlobalOutput("TThreadedServer uncaught exception.");
}
if (eventHandler != NULL) {
eventHandler->deleteContext(connectionContext, input_, output_);
}
try {
input_->getTransport()->close();
} catch (TTransportException& ttx) {
string errStr = string("TThreadedServer input close failed: ") + ttx.what();
GlobalOutput(errStr.c_str());
}
try {
output_->getTransport()->close();
} catch (TTransportException& ttx) {
string errStr = string("TThreadedServer output close failed: ") + ttx.what();
GlobalOutput(errStr.c_str());
}
// Remove this task from parent bookkeeping
{
Synchronized s(server_.tasksMonitor_);
server_.tasks_.erase(this);
if (server_.tasks_.empty()) {
server_.tasksMonitor_.notify();
}
}
}
private:
TThreadedServer& server_;
friend class TThreadedServer;
shared_ptr<TProcessor> processor_;
shared_ptr<TProtocol> input_;
shared_ptr<TProtocol> output_;
shared_ptr<TTransport> transport_;
};
void TThreadedServer::init() {
stop_ = false;
if (!threadFactory_) {
threadFactory_.reset(new PlatformThreadFactory);
}
}
TThreadedServer::~TThreadedServer() {}
void TThreadedServer::serve() {
shared_ptr<TTransport> client;
shared_ptr<TTransport> inputTransport;
shared_ptr<TTransport> outputTransport;
shared_ptr<TProtocol> inputProtocol;
shared_ptr<TProtocol> outputProtocol;
// Start the server listening
serverTransport_->listen();
// Run the preServe event
if (eventHandler_ != NULL) {
eventHandler_->preServe();
}
while (!stop_) {
try {
client.reset();
inputTransport.reset();
outputTransport.reset();
inputProtocol.reset();
outputProtocol.reset();
// Fetch client from server
client = serverTransport_->accept();
// Make IO transports
inputTransport = inputTransportFactory_->getTransport(client);
outputTransport = outputTransportFactory_->getTransport(client);
inputProtocol = inputProtocolFactory_->getProtocol(inputTransport);
outputProtocol = outputProtocolFactory_->getProtocol(outputTransport);
shared_ptr<TProcessor> processor = getProcessor(inputProtocol,
outputProtocol, client);
TThreadedServer::Task* task = new TThreadedServer::Task(*this,
processor,
inputProtocol,
outputProtocol,
client);
// Create a task
shared_ptr<Runnable> runnable =
shared_ptr<Runnable>(task);
// Create a thread for this task
shared_ptr<Thread> thread =
shared_ptr<Thread>(threadFactory_->newThread(runnable));
// Insert thread into the set of threads
{
Synchronized s(tasksMonitor_);
tasks_.insert(task);
}
// Start the thread!
thread->start();
} catch (TTransportException& ttx) {
if (inputTransport != NULL) { inputTransport->close(); }
if (outputTransport != NULL) { outputTransport->close(); }
if (client != NULL) { client->close(); }
if (!stop_ || ttx.getType() != TTransportException::INTERRUPTED) {
string errStr = string("TThreadedServer: TServerTransport died on accept: ") + ttx.what();
GlobalOutput(errStr.c_str());
}
continue;
} catch (TException& tx) {
if (inputTransport != NULL) { inputTransport->close(); }
if (outputTransport != NULL) { outputTransport->close(); }
if (client != NULL) { client->close(); }
string errStr = string("TThreadedServer: Caught TException: ") + tx.what();
GlobalOutput(errStr.c_str());
continue;
} catch (string s) {
if (inputTransport != NULL) { inputTransport->close(); }
if (outputTransport != NULL) { outputTransport->close(); }
if (client != NULL) { client->close(); }
string errStr = "TThreadedServer: Unknown exception: " + s;
GlobalOutput(errStr.c_str());
break;
}
}
// If stopped manually, make sure to close server transport
if (stop_) {
try {
serverTransport_->close();
} catch (TException &tx) {
string errStr = string("TThreadedServer: Exception shutting down: ") + tx.what();
GlobalOutput(errStr.c_str());
}
try {
Synchronized s(tasksMonitor_);
while (!tasks_.empty()) {
tasksMonitor_.wait();
}
} catch (TException &tx) {
string errStr = string("TThreadedServer: Exception joining workers: ") + tx.what();
GlobalOutput(errStr.c_str());
}
stop_ = false;
}
}
}}} // apache::thrift::server

View file

@ -0,0 +1,415 @@
/* config.h. Generated from config.hin by configure. */
/* config.hin. Generated from configure.ac by autoheader. */
/* Define if the AI_ADDRCONFIG symbol is unavailable */
/* #undef AI_ADDRCONFIG */
/* Possible value for SIGNED_RIGHT_SHIFT_IS */
#define ARITHMETIC_RIGHT_SHIFT 1
/* Define to one of `_getb67', `GETB67', `getb67' for Cray-2 and Cray-YMP
systems. This function is required for `alloca.c' support on those systems.
*/
/* #undef CRAY_STACKSEG_END */
/* Define to 1 if using `alloca.c'. */
/* #undef C_ALLOCA */
/* Define to 1 if you have the `alarm' function. */
#define HAVE_ALARM 1
/* Define to 1 if you have `alloca', as a function or macro. */
#define HAVE_ALLOCA 1
/* Define to 1 if you have <alloca.h> and it should be used (not on Ultrix).
*/
#define HAVE_ALLOCA_H 1
/* Define to 1 if you have the <arpa/inet.h> header file. */
#define HAVE_ARPA_INET_H 1
/* define if the Boost library is available */
/* #undef HAVE_BOOST */
/* Define to 1 if you have the `bzero' function. */
#define HAVE_BZERO 1
/* Define to 1 if you have the `clock_gettime' function. */
#define HAVE_CLOCK_GETTIME 1
/* Define to 1 if you have the declaration of `strerror_r', and to 0 if you
don't. */
#define HAVE_DECL_STRERROR_R 1
/* Define to 1 if you have the <dlfcn.h> header file. */
#define HAVE_DLFCN_H 1
/* Define to 1 if you don't have `vprintf' but do have `_doprnt.' */
/* #undef HAVE_DOPRNT */
/* Define to 1 if you have the <fcntl.h> header file. */
#define HAVE_FCNTL_H 1
/* Define to 1 if you have the `fork' function. */
#define HAVE_FORK 1
/* Define to 1 if you have the `ftruncate' function. */
#define HAVE_FTRUNCATE 1
/* Define to 1 if you have the `gethostbyname' function. */
#define HAVE_GETHOSTBYNAME 1
/* Define to 1 if you have the `gettimeofday' function. */
#define HAVE_GETTIMEOFDAY 1
/* Define to 1 if you have the <inttypes.h> header file. */
#define HAVE_INTTYPES_H 1
/* define if libevent is available */
/* #undef HAVE_LIBEVENT */
/* Define to 1 if you have the <libintl.h> header file. */
#define HAVE_LIBINTL_H 1
/* Define to 1 if you have the `pthread' library (-lpthread). */
#define HAVE_LIBPTHREAD 1
/* Define to 1 if you have the `rt' library (-lrt). */
#define HAVE_LIBRT 1
/* Define to 1 if you have the `socket' library (-lsocket). */
/* #undef HAVE_LIBSOCKET */
/* Define to 1 if you have the <limits.h> header file. */
#define HAVE_LIMITS_H 1
/* Define to 1 if your system has a GNU libc compatible `malloc' function, and
to 0 otherwise. */
#define HAVE_MALLOC 1
/* Define to 1 if you have the <malloc.h> header file. */
#define HAVE_MALLOC_H 1
/* Define to 1 if you have the `memmove' function. */
#define HAVE_MEMMOVE 1
/* Define to 1 if you have the <memory.h> header file. */
#define HAVE_MEMORY_H 1
/* Define to 1 if you have the `memset' function. */
#define HAVE_MEMSET 1
/* Define to 1 if you have the `mkdir' function. */
#define HAVE_MKDIR 1
/* Define to 1 if you have the <netdb.h> header file. */
#define HAVE_NETDB_H 1
/* Define to 1 if you have the <netinet/in.h> header file. */
#define HAVE_NETINET_IN_H 1
/* Define to 1 if you have the <openssl/rand.h> header file. */
#define HAVE_OPENSSL_RAND_H 1
/* Define to 1 if you have the <openssl/ssl.h> header file. */
#define HAVE_OPENSSL_SSL_H 1
/* Define to 1 if you have the <openssl/x509v3.h> header file. */
#define HAVE_OPENSSL_X509V3_H 1
/* Define to 1 if you have the <pthread.h> header file. */
#define HAVE_PTHREAD_H 1
/* Define to 1 if the system has the type `ptrdiff_t'. */
#define HAVE_PTRDIFF_T 1
/* Define to 1 if your system has a GNU libc compatible `realloc' function,
and to 0 otherwise. */
#define HAVE_REALLOC 1
/* Define to 1 if you have the `realpath' function. */
#define HAVE_REALPATH 1
/* Define to 1 if you have the `sched_get_priority_max' function. */
#define HAVE_SCHED_GET_PRIORITY_MAX 1
/* Define to 1 if you have the `sched_get_priority_min' function. */
#define HAVE_SCHED_GET_PRIORITY_MIN 1
/* Define to 1 if you have the <sched.h> header file. */
#define HAVE_SCHED_H 1
/* Define to 1 if you have the `select' function. */
#define HAVE_SELECT 1
/* Define to 1 if you have the `socket' function. */
#define HAVE_SOCKET 1
/* Define to 1 if you have the `sqrt' function. */
#define HAVE_SQRT 1
/* Define to 1 if `stat' has the bug that it succeeds when given the
zero-length file name argument. */
/* #undef HAVE_STAT_EMPTY_STRING_BUG */
/* Define to 1 if stdbool.h conforms to C99. */
#define HAVE_STDBOOL_H 1
/* Define to 1 if you have the <stddef.h> header file. */
#define HAVE_STDDEF_H 1
/* Define to 1 if you have the <stdint.h> header file. */
#define HAVE_STDINT_H 1
/* Define to 1 if you have the <stdlib.h> header file. */
#define HAVE_STDLIB_H 1
/* Define to 1 if you have the `strchr' function. */
#define HAVE_STRCHR 1
/* Define to 1 if you have the `strdup' function. */
#define HAVE_STRDUP 1
/* Define to 1 if you have the `strerror' function. */
#define HAVE_STRERROR 1
/* Define to 1 if you have the `strerror_r' function. */
#define HAVE_STRERROR_R 1
/* Define to 1 if you have the `strftime' function. */
#define HAVE_STRFTIME 1
/* Define to 1 if you have the <strings.h> header file. */
#define HAVE_STRINGS_H 1
/* Define to 1 if you have the <string.h> header file. */
#define HAVE_STRING_H 1
/* Define to 1 if you have the `strstr' function. */
#define HAVE_STRSTR 1
/* Define to 1 if you have the `strtol' function. */
#define HAVE_STRTOL 1
/* Define to 1 if you have the `strtoul' function. */
#define HAVE_STRTOUL 1
/* Define to 1 if you have the <sys/param.h> header file. */
#define HAVE_SYS_PARAM_H 1
/* Define to 1 if you have the <sys/poll.h> header file. */
#define HAVE_SYS_POLL_H 1
/* Define to 1 if you have the <sys/resource.h> header file. */
#define HAVE_SYS_RESOURCE_H 1
/* Define to 1 if you have the <sys/select.h> header file. */
#define HAVE_SYS_SELECT_H 1
/* Define to 1 if you have the <sys/socket.h> header file. */
#define HAVE_SYS_SOCKET_H 1
/* Define to 1 if you have the <sys/stat.h> header file. */
#define HAVE_SYS_STAT_H 1
/* Define to 1 if you have the <sys/time.h> header file. */
#define HAVE_SYS_TIME_H 1
/* Define to 1 if you have the <sys/types.h> header file. */
#define HAVE_SYS_TYPES_H 1
/* Define to 1 if you have the <sys/un.h> header file. */
#define HAVE_SYS_UN_H 1
/* Define to 1 if you have <sys/wait.h> that is POSIX.1 compatible. */
#define HAVE_SYS_WAIT_H 1
/* Define to 1 if you have the <unistd.h> header file. */
#define HAVE_UNISTD_H 1
/* Define to 1 if you have the `vfork' function. */
#define HAVE_VFORK 1
/* Define to 1 if you have the <vfork.h> header file. */
/* #undef HAVE_VFORK_H */
/* Define to 1 if you have the `vprintf' function. */
#define HAVE_VPRINTF 1
/* Define to 1 if `fork' works. */
#define HAVE_WORKING_FORK 1
/* Define to 1 if `vfork' works. */
#define HAVE_WORKING_VFORK 1
/* define if zlib is available */
#define HAVE_ZLIB /**/
/* Define to 1 if the system has the type `_Bool'. */
/* #undef HAVE__BOOL */
/* Possible value for SIGNED_RIGHT_SHIFT_IS */
#define LOGICAL_RIGHT_SHIFT 2
/* Define to 1 if `lstat' dereferences a symlink specified with a trailing
slash. */
#define LSTAT_FOLLOWS_SLASHED_SYMLINK 1
/* Define to the sub-directory in which libtool stores uninstalled libraries.
*/
#define LT_OBJDIR ".libs/"
/* Name of package */
#define PACKAGE "thrift"
/* Define to the address where bug reports for this package should be sent. */
#define PACKAGE_BUGREPORT ""
/* Define to the full name of this package. */
#define PACKAGE_NAME "thrift"
/* Define to the full name and version of this package. */
#define PACKAGE_STRING "thrift 0.9.0"
/* Define to the one symbol short name of this package. */
#define PACKAGE_TARNAME "thrift"
/* Define to the home page for this package. */
#define PACKAGE_URL ""
/* Define to the version of this package. */
#define PACKAGE_VERSION "0.9.0"
/* Define as the return type of signal handlers (`int' or `void'). */
#define RETSIGTYPE void
/* Define to the type of arg 1 for `select'. */
#define SELECT_TYPE_ARG1 int
/* Define to the type of args 2, 3 and 4 for `select'. */
#define SELECT_TYPE_ARG234 (fd_set *)
/* Define to the type of arg 5 for `select'. */
#define SELECT_TYPE_ARG5 (struct timeval *)
/* Indicates the effect of the right shift operator on negative signed
integers */
#define SIGNED_RIGHT_SHIFT_IS 1
/* If using the C implementation of alloca, define if you know the
direction of stack growth for your system; otherwise it will be
automatically deduced at runtime.
STACK_DIRECTION > 0 => grows toward higher addresses
STACK_DIRECTION < 0 => grows toward lower addresses
STACK_DIRECTION = 0 => direction of growth unknown */
/* #undef STACK_DIRECTION */
/* Define to 1 if you have the ANSI C header files. */
#define STDC_HEADERS 1
/* Define to 1 if strerror_r returns char *. */
#define STRERROR_R_CHAR_P 1
/* Define to 1 if you can safely include both <sys/time.h> and <time.h>. */
#define TIME_WITH_SYS_TIME 1
/* Define to 1 if your <sys/time.h> declares `struct tm'. */
/* #undef TM_IN_SYS_TIME */
/* Possible value for SIGNED_RIGHT_SHIFT_IS */
#define UNKNOWN_RIGHT_SHIFT 3
/* experimental --enable-boostthreads that replaces POSIX pthread by
boost::thread */
/* #undef USE_BOOST_THREAD */
/* Version number of package */
#define VERSION "0.9.0"
/* Define to 1 if `lex' declares `yytext' as a `char *' by default, not a
`char[]'. */
#define YYTEXT_POINTER 1
/* Define for Solaris 2.5.1 so the uint32_t typedef from <sys/synch.h>,
<pthread.h>, or <semaphore.h> is not used. If the typedef were allowed, the
#define below would cause a syntax error. */
/* #undef _UINT32_T */
/* Define for Solaris 2.5.1 so the uint64_t typedef from <sys/synch.h>,
<pthread.h>, or <semaphore.h> is not used. If the typedef were allowed, the
#define below would cause a syntax error. */
/* #undef _UINT64_T */
/* Define for Solaris 2.5.1 so the uint8_t typedef from <sys/synch.h>,
<pthread.h>, or <semaphore.h> is not used. If the typedef were allowed, the
#define below would cause a syntax error. */
/* #undef _UINT8_T */
/* Define to empty if `const' does not conform to ANSI C. */
/* #undef const */
/* Define to `__inline__' or `__inline' if that's what the C compiler
calls it, or to nothing if 'inline' is not supported under any name. */
#ifndef __cplusplus
/* #undef inline */
#endif
/* Define to the type of a signed integer type of width exactly 16 bits if
such a type exists and the standard includes do not define it. */
/* #undef int16_t */
/* Define to the type of a signed integer type of width exactly 32 bits if
such a type exists and the standard includes do not define it. */
/* #undef int32_t */
/* Define to the type of a signed integer type of width exactly 64 bits if
such a type exists and the standard includes do not define it. */
/* #undef int64_t */
/* Define to the type of a signed integer type of width exactly 8 bits if such
a type exists and the standard includes do not define it. */
/* #undef int8_t */
/* Define to rpl_malloc if the replacement function should be used. */
/* #undef malloc */
/* Define to `int' if <sys/types.h> does not define. */
/* #undef mode_t */
/* Define to `long int' if <sys/types.h> does not define. */
/* #undef off_t */
/* Define to `int' if <sys/types.h> does not define. */
/* #undef pid_t */
/* Define to rpl_realloc if the replacement function should be used. */
/* #undef realloc */
/* Define to `unsigned int' if <sys/types.h> does not define. */
/* #undef size_t */
/* Define to `int' if <sys/types.h> does not define. */
/* #undef ssize_t */
/* Define to the type of an unsigned integer type of width exactly 16 bits if
such a type exists and the standard includes do not define it. */
/* #undef uint16_t */
/* Define to the type of an unsigned integer type of width exactly 32 bits if
such a type exists and the standard includes do not define it. */
/* #undef uint32_t */
/* Define to the type of an unsigned integer type of width exactly 64 bits if
such a type exists and the standard includes do not define it. */
/* #undef uint64_t */
/* Define to the type of an unsigned integer type of width exactly 8 bits if
such a type exists and the standard includes do not define it. */
/* #undef uint8_t */
/* Define as `fork' if `vfork' does not work. */
/* #undef vfork */
/* Define to empty if the keyword `volatile' does not work. Warning: valid
code using `volatile' can become incorrect without. Disable with care. */
/* #undef volatile */

Some files were not shown because too many files have changed in this diff Show more