1 // RequestBufferReplacer.h 2 3 #ifndef NET_FS_REQUEST_BUFFER_REPLACER_H 4 #define NET_FS_REQUEST_BUFFER_REPLACER_H 5 6 #include "Request.h" 7 8 class RequestBufferReplacer : private RequestMemberVisitor { 9 public: 10 RequestBufferReplacer(); 11 ~RequestBufferReplacer(); 12 13 status_t ReplaceBuffer(Request* request); 14 15 private: 16 virtual void Visit(RequestMember* member, bool& data); 17 virtual void Visit(RequestMember* member, int8& data); 18 virtual void Visit(RequestMember* member, uint8& data); 19 virtual void Visit(RequestMember* member, int16& data); 20 virtual void Visit(RequestMember* member, uint16& data); 21 virtual void Visit(RequestMember* member, int32& data); 22 virtual void Visit(RequestMember* member, uint32& data); 23 virtual void Visit(RequestMember* member, int64& data); 24 virtual void Visit(RequestMember* member, uint64& data); 25 virtual void Visit(RequestMember* member, Data& data); 26 virtual void Visit(RequestMember* member, StringData& data); 27 virtual void Visit(RequestMember* member, 28 RequestMember& subMember); 29 virtual void Visit(RequestMember* member, 30 FlattenableRequestMember& subMember); 31 32 private: 33 char* fBuffer; 34 int32 fBufferSize; 35 }; 36 37 #endif // NET_FS_REQUEST_BUFFER_REPLACER_H 38