1 /* 2 * Copyright (C) 2011 The Android Open Source Project 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 17 package com.android.ide.eclipse.gltrace.state; 18 19 20 /** 21 * The GL state is modeled as a hierarchical set of properties, all of which implement 22 * this interface. 23 */ 24 public interface IGLProperty extends Cloneable { 25 /** Obtain the type of the property. */ getType()26 GLStateType getType(); 27 28 /** Is this a composite property? 29 * @return true if it is a list or structure of properties, 30 * false if it is a leaf level atomic property 31 * */ isComposite()32 boolean isComposite(); 33 34 /** 35 * Is the currently set value the default? 36 * @return true if current value matches the default (initial) value 37 */ isDefault()38 boolean isDefault(); 39 40 /** Set the current value for this property. */ setValue(Object value)41 void setValue(Object value); 42 43 /** Get the current value for this property. */ getValue()44 Object getValue(); 45 46 /** Get the string representation for this property. */ getStringValue()47 String getStringValue(); 48 49 /** 50 * Get the parent property that holds this property. 51 * @return null if this property is at the top level, parent otherwise 52 */ getParent()53 IGLProperty getParent(); 54 55 /** Set the parent property that holds this property. */ setParent(IGLProperty parent)56 void setParent(IGLProperty parent); 57 58 /** Deep clone this property. */ clone()59 IGLProperty clone(); 60 61 /** Pretty print current property value to the given writer. */ prettyPrint(StatePrettyPrinter pp)62 void prettyPrint(StatePrettyPrinter pp); 63 } 64