Alexander Afanasyev | 1122501 | 2013-11-21 23:11:10 -0800 | [diff] [blame^] | 1 | WireFormat Class |
| 2 | ================ |
| 3 | |
| 4 | :[C++]: |
| 5 | Namespace: `ndn` |
| 6 | |
| 7 | WireFormat Constructor |
| 8 | ---------------------- |
| 9 | |
| 10 | Create a base class WireFormat where the methods throw an "unimplemented" error. You should use a derived class like BinaryXmlWireFormat. |
| 11 | |
| 12 | :Realizations: |
| 13 | |
| 14 | - BinaryXmlWireFormat |
| 15 | |
| 16 | :[C++]: |
| 17 | |
| 18 | .. code-block:: c++ |
| 19 | |
| 20 | WireFormat(); |
| 21 | |
| 22 | :[JavaScript]: |
| 23 | |
| 24 | .. code-block:: javascript |
| 25 | |
| 26 | var WireFormat = function WireFormat() |
| 27 | |
| 28 | WireFormat.setDefaultWireFormat Method |
| 29 | -------------------------------------- |
| 30 | |
| 31 | Set the static default WireFormat used by default encoding and decoding methods. |
| 32 | |
| 33 | :[C++]: |
| 34 | |
| 35 | .. code-block:: c++ |
| 36 | |
| 37 | static void setDefaultWireFormat( |
| 38 | |
| 39 | WireFormat* wireFormat |
| 40 | |
| 41 | ) |
| 42 | |
| 43 | :[JavaScript]: |
| 44 | |
| 45 | .. code-block:: javascript |
| 46 | |
| 47 | WireFormat.setDefaultWireFormat = function( |
| 48 | |
| 49 | wireFormat // WireFormat |
| 50 | |
| 51 | ) |
| 52 | |
| 53 | :Parameters: |
| 54 | |
| 55 | - `wireFormat` |
| 56 | An object of a subclass of WireFormat. |
| 57 | |
| 58 | WireFormat.getDefaultWireFormat Method |
| 59 | -------------------------------------- |
| 60 | |
| 61 | Return the default WireFormat used by default encoding and decoding methods. The initial value is a BinaryXmlWireFormat object. If can be changed with setDefaultWireFormat. |
| 62 | |
| 63 | :[C++]: |
| 64 | |
| 65 | .. code-block:: c++ |
| 66 | |
| 67 | static WireFormat* getDefaultWireFormat(); |
| 68 | |
| 69 | :[JavaScript]: |
| 70 | |
| 71 | .. code-block:: javascript |
| 72 | |
| 73 | WireFormat.getDefaultWireFormat = function() |
| 74 | |
| 75 | :Returns: |
| 76 | |
| 77 | The default (subclass of) WireFormat object. |