// Copyright (c) 2016 Uber Technologies, Inc.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.

package zapcore

import 

// MapObjectEncoder is an ObjectEncoder backed by a simple
// map[string]interface{}. It's not fast enough for production use, but it's
// helpful in tests.
type MapObjectEncoder struct {
	// Fields contains the entire encoded log context.
	Fields map[string]interface{}
	// cur is a pointer to the namespace we're currently writing to.
	cur map[string]interface{}
}

// NewMapObjectEncoder creates a new map-backed ObjectEncoder.
func () *MapObjectEncoder {
	 := make(map[string]interface{})
	return &MapObjectEncoder{
		Fields: ,
		cur:    ,
	}
}

// AddArray implements ObjectEncoder.
func ( *MapObjectEncoder) ( string,  ArrayMarshaler) error {
	 := &sliceArrayEncoder{elems: make([]interface{}, 0)}
	 := .MarshalLogArray()
	.cur[] = .elems
	return 
}

// AddObject implements ObjectEncoder.
func ( *MapObjectEncoder) ( string,  ObjectMarshaler) error {
	 := NewMapObjectEncoder()
	.cur[] = .Fields
	return .MarshalLogObject()
}

// AddBinary implements ObjectEncoder.
func ( *MapObjectEncoder) ( string,  []byte) { .cur[] =  }

// AddByteString implements ObjectEncoder.
func ( *MapObjectEncoder) ( string,  []byte) { .cur[] = string() }

// AddBool implements ObjectEncoder.
func ( *MapObjectEncoder) ( string,  bool) { .cur[] =  }

// AddDuration implements ObjectEncoder.
func ( MapObjectEncoder) ( string,  time.Duration) { .cur[] =  }

// AddComplex128 implements ObjectEncoder.
func ( *MapObjectEncoder) ( string,  complex128) { .cur[] =  }

// AddComplex64 implements ObjectEncoder.
func ( *MapObjectEncoder) ( string,  complex64) { .cur[] =  }

// AddFloat64 implements ObjectEncoder.
func ( *MapObjectEncoder) ( string,  float64) { .cur[] =  }

// AddFloat32 implements ObjectEncoder.
func ( *MapObjectEncoder) ( string,  float32) { .cur[] =  }

// AddInt implements ObjectEncoder.
func ( *MapObjectEncoder) ( string,  int) { .cur[] =  }

// AddInt64 implements ObjectEncoder.
func ( *MapObjectEncoder) ( string,  int64) { .cur[] =  }

// AddInt32 implements ObjectEncoder.
func ( *MapObjectEncoder) ( string,  int32) { .cur[] =  }

// AddInt16 implements ObjectEncoder.
func ( *MapObjectEncoder) ( string,  int16) { .cur[] =  }

// AddInt8 implements ObjectEncoder.
func ( *MapObjectEncoder) ( string,  int8) { .cur[] =  }

// AddString implements ObjectEncoder.
func ( *MapObjectEncoder) ( string,  string) { .cur[] =  }

// AddTime implements ObjectEncoder.
func ( MapObjectEncoder) ( string,  time.Time) { .cur[] =  }

// AddUint implements ObjectEncoder.
func ( *MapObjectEncoder) ( string,  uint) { .cur[] =  }

// AddUint64 implements ObjectEncoder.
func ( *MapObjectEncoder) ( string,  uint64) { .cur[] =  }

// AddUint32 implements ObjectEncoder.
func ( *MapObjectEncoder) ( string,  uint32) { .cur[] =  }

// AddUint16 implements ObjectEncoder.
func ( *MapObjectEncoder) ( string,  uint16) { .cur[] =  }

// AddUint8 implements ObjectEncoder.
func ( *MapObjectEncoder) ( string,  uint8) { .cur[] =  }

// AddUintptr implements ObjectEncoder.
func ( *MapObjectEncoder) ( string,  uintptr) { .cur[] =  }

// AddReflected implements ObjectEncoder.
func ( *MapObjectEncoder) ( string,  interface{}) error {
	.cur[] = 
	return nil
}

// OpenNamespace implements ObjectEncoder.
func ( *MapObjectEncoder) ( string) {
	 := make(map[string]interface{})
	.cur[] = 
	.cur = 
}

// sliceArrayEncoder is an ArrayEncoder backed by a simple []interface{}. Like
// the MapObjectEncoder, it's not designed for production use.
type sliceArrayEncoder struct {
	elems []interface{}
}

func ( *sliceArrayEncoder) ( ArrayMarshaler) error {
	 := &sliceArrayEncoder{}
	 := .MarshalLogArray()
	.elems = append(.elems, .elems)
	return 
}

func ( *sliceArrayEncoder) ( ObjectMarshaler) error {
	 := NewMapObjectEncoder()
	 := .MarshalLogObject()
	.elems = append(.elems, .Fields)
	return 
}

func ( *sliceArrayEncoder) ( interface{}) error {
	.elems = append(.elems, )
	return nil
}

func ( *sliceArrayEncoder) ( bool)              { .elems = append(.elems, ) }
func ( *sliceArrayEncoder) ( []byte)      { .elems = append(.elems, string()) }
func ( *sliceArrayEncoder) ( complex128)  { .elems = append(.elems, ) }
func ( *sliceArrayEncoder) ( complex64)    { .elems = append(.elems, ) }
func ( *sliceArrayEncoder) ( time.Duration) { .elems = append(.elems, ) }
func ( *sliceArrayEncoder) ( float64)        { .elems = append(.elems, ) }
func ( *sliceArrayEncoder) ( float32)        { .elems = append(.elems, ) }
func ( *sliceArrayEncoder) ( int)                { .elems = append(.elems, ) }
func ( *sliceArrayEncoder) ( int64)            { .elems = append(.elems, ) }
func ( *sliceArrayEncoder) ( int32)            { .elems = append(.elems, ) }
func ( *sliceArrayEncoder) ( int16)            { .elems = append(.elems, ) }
func ( *sliceArrayEncoder) ( int8)              { .elems = append(.elems, ) }
func ( *sliceArrayEncoder) ( string)          { .elems = append(.elems, ) }
func ( *sliceArrayEncoder) ( time.Time)         { .elems = append(.elems, ) }
func ( *sliceArrayEncoder) ( uint)              { .elems = append(.elems, ) }
func ( *sliceArrayEncoder) ( uint64)          { .elems = append(.elems, ) }
func ( *sliceArrayEncoder) ( uint32)          { .elems = append(.elems, ) }
func ( *sliceArrayEncoder) ( uint16)          { .elems = append(.elems, ) }
func ( *sliceArrayEncoder) ( uint8)            { .elems = append(.elems, ) }
func ( *sliceArrayEncoder) ( uintptr)        { .elems = append(.elems, ) }