Thrift compiler support for inline PHP client code
Summary: Option to generate inline PHP code, as well as support for the async modifier keyword and the abstraction of function calls into a send and recv component
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664740 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/compiler/src/parse/t_function.h b/compiler/src/parse/t_function.h
index b248db7..9e6c56a 100644
--- a/compiler/src/parse/t_function.h
+++ b/compiler/src/parse/t_function.h
@@ -7,26 +7,33 @@
/**
* Representation of a function. Key parst are return type, function name,
- * optional modifiers, and an argument list. Each function also has a
- * hash signature that is used in the network protocol.
+ * optional modifiers, and an argument list.
*
* @author Mark Slee <mcslee@facebook.com>
*/
class t_function {
public:
- t_function(t_type* returntype, std::string name, t_struct* arglist) :
- returntype_(returntype), name_(name), arglist_(arglist) {}
+ t_function(t_type* returntype,
+ std::string name,
+ t_struct* arglist,
+ bool async=false) :
+ returntype_(returntype),
+ name_(name),
+ arglist_(arglist),
+ async_(async) {}
~t_function() {}
t_type* get_returntype() const { return returntype_; }
const std::string& get_name() const { return name_; }
t_struct* get_arglist() const { return arglist_; }
+ bool is_async() const { return async_; }
private:
t_type* returntype_;
std::string name_;
t_struct* arglist_;
+ bool async_;
};
#endif