package BoxTools; /** A LayoutIndex object is used to index a box in BoxLayout. It can be * null constructed first, and set later. Two LayoutIndex objects are equal iff * their indexes are equal and the two BoxLayout objects on which they are defined * have the same m_root field. * Currently, LayoutIndex is an ordinary class and it is local. When value class * implemented, it should be changed to a value class. *

Usage: a LayoutIndex object must be declared local. * @see DataIndex, LayoutIterator * @see Chombo Specification * @version 1.0 * @author Tong Wen, LBNL * @since 1.0 */ public class LayoutIndex{ protected int m_index; protected BoxLayout local m_root; public inline LayoutIndex(){ m_index=0; m_root=null; } inline LayoutIndex(int a_index, BoxLayout local a_layout){ m_index=a_index; m_root=a_layout; } /* public inline local void setTo(LayoutIndex local a_LI){ m_index=a_LI.m_index; m_root=a_LI.m_root; } */ public inline local BoxLayout local root(){return m_root;} public inline local int index(){return m_index;} public final inline local boolean isEqual(LayoutIndex local a_LI){ return ((m_index==a_LI.m_index )&& (m_root==a_LI.m_root)); } /* No longer supported since 2.573. public final inline local boolean op==(LayoutIndex local a_LI){ return ((m_index==a_LI.m_index )&& (m_root==a_LI.m_root)); } */ public final inline local boolean isIdxEqual(LayoutIndex local a_LI){ return (m_index==a_LI.m_index ); } public final inline local boolean isNull(){ return (m_root==null); } }