/* ************************************************************************
#
#  DivConq
#
#  http://divconq.com/
#
#  Copyright:
#    Copyright 2012 eTimeline, LLC. All rights reserved.
#
#  License:
#    See the license.txt file in the project's top-level directory for details.
#
#  Authors:
#    * Andy White
#
************************************************************************ */
package divconq.struct.builder;

import divconq.lang.Memory;
import divconq.struct.CompositeStruct;

public interface ICompositeBuilder {
	void record(Object... props) throws BuilderStateException;
	void startRecord() throws BuilderStateException;
	void endRecord() throws BuilderStateException;
	void list(Object... props) throws BuilderStateException;
	void startList() throws BuilderStateException;
	void endList() throws BuilderStateException;
	void field() throws BuilderStateException;
	void field(String name) throws BuilderStateException;
	void field(String name, Object value) throws BuilderStateException;
	boolean needFieldName();
	void scalar(Object value) throws BuilderStateException;
	void rawJson(Object value) throws BuilderStateException;
	void scalar() throws BuilderStateException;
	void value(Object value) throws BuilderStateException;
	BuilderState getState();
	Memory toMemory() throws BuilderStateException;
	CompositeStruct toLocal();
}
