• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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  * The GL state is modeled as a hierarchical set of properties, all of which implement
21  * this interface.
22  */
23 public interface IGLProperty extends Cloneable {
24     /** Obtain the type of the property. */
getType()25     GLStateType getType();
26 
27     /** Is this a composite property?
28      * @return true if it is a list or structure of properties,
29      *         false if it is a leaf level atomic property
30      * */
isComposite()31     boolean isComposite();
32 
33     /**
34      * Is the currently set value the default?
35      * @return true if current value matches the default (initial) value
36      */
isDefault()37     boolean isDefault();
38 
39     /** Set the current value for this property. */
setValue(Object value)40     void setValue(Object value);
41 
42     /** Get the current value for this property. */
getValue()43     Object getValue();
44 
45     /** Get the string representation for this property. */
getStringValue()46     String getStringValue();
47 
48     /**
49      * Get the parent property that holds this property.
50      * @return null if this property is at the top level, parent otherwise
51      */
getParent()52     IGLProperty getParent();
53 
54     /** Set the parent property that holds this property. */
setParent(IGLProperty parent)55     void setParent(IGLProperty parent);
56 
57     /** Deep clone this property. */
clone()58     IGLProperty clone();
59 }
60