blob: ff7fa565475c045573bbb3f073dbfeb53d3e74b6 [file] [log] [blame]
Christopher Piro094823a2007-07-18 00:26:12 +00001%%% Copyright (c) 2007- Facebook
2%%% Distributed under the Thrift Software License
3%%%
4%%% See accompanying file LICENSE or visit the Thrift site at:
5%%% http://developers.facebook.com/thrift/
6
7-module(tBinaryProtocolFactory).
8
9-include("oop.hrl").
10
11-include("thrift.hrl").
12-include("protocol/tBinaryProtocol.hrl").
13-include("protocol/tBinaryProtocolFactory.hrl").
14
15-behavior(oop).
16
17-export([attr/4, super/0, inspect/1]).
18
19-export([new/0, getProtocol/2]).
20
21%%%
22%%% define attributes
23%%% 'super' is required unless ?MODULE is a base class
24%%%
25
26?DEFINE_ATTR(super).
27
28%%%
29%%% behavior callbacks
30%%%
31
32%%% super() -> SuperModule = atom()
33%%% | none
34
35super() ->
36 tProtocolFactory.
37
38%%% inspect(This) -> string()
39
40inspect(_This) ->
41 "".
42
43%%%
44%%% class methods
45%%%
46
47new() ->
48 Super = (super()):new(),
49 #?MODULE{super=Super}.
50
51%%%
52%%% instance methods
53%%%
54
55getProtocol(_This, Trans) ->
56 oop:start_new(tBinaryProtocol, [Trans]).
57