Esempio n. 1
0
        /*
         * Convert this tuple to the equivalent Erlang external representation.
         *
         * @param buf an output stream to which the encoded tuple should be
         * written.
         **/
        public override void  encode(OtpOutputStream buf)
        {
            int arity = (int)(elems.Length);

            buf.write_tuple_head(arity);

            for (int i = 0; i < arity; i++)
            {
                buf.write_any(elems[i]);
            }
        }
Esempio n. 2
0
        /*
         * Convert this list to the equivalent Erlang external
         * representation. Note that this method never encodes lists as
         * strings, even when it is possible to do so.
         *
         * @param buf An output stream to which the encoded list should be
         * written.
         *
         **/
        public override void  encode(OtpOutputStream buf)
        {
            int _arity = arity();

            if (_arity > 0)
            {
                buf.write_list_head(_arity);

                for (int i = 0; i < _arity; i++)
                {
                    buf.write_any(elems[i]);
                }
            }

            buf.write_nil();
        }
Esempio n. 3
0
		/*
		* Convert this list to the equivalent Erlang external
		* representation. Note that this method never encodes lists as
		* strings, even when it is possible to do so.
		*
		* @param buf An output stream to which the encoded list should be
		* written.
		*
		**/
		public override void  encode(OtpOutputStream buf)
		{
			int _arity = arity();
			
			if (_arity > 0)
			{
				buf.write_list_head(_arity);
				
				 for (int i = 0; i < _arity; i++)
				{
					buf.write_any(elems[i]);
				}
			}
			
			buf.write_nil();
		}
Esempio n. 4
0
        /*
        * Convert this tuple to the equivalent Erlang external representation.
        *
        * @param buf an output stream to which the encoded tuple should be
        * written.
        **/
        public override void encode(OtpOutputStream buf)
        {
            int arity = (int) (elems.Length);

            buf.write_tuple_head(arity);

             for (int i = 0; i < arity; i++)
            {
                buf.write_any(elems[i]);
            }
        }