org.eclipse.cdt.internal.core.cdtvariables
Class StorableCdtVariables

java.lang.Object
  extended by org.eclipse.cdt.internal.core.cdtvariables.StorableCdtVariables

public class StorableCdtVariables
extends java.lang.Object

This class represents the set of Build Macros that could be loaded and stored in XML

Since:
3.0

Field Summary
static java.lang.String MACROS_ELEMENT_NAME
           
 
Constructor Summary
StorableCdtVariables(boolean readOnly)
           
StorableCdtVariables(ICdtVariable[] vars, boolean readOnly)
           
StorableCdtVariables(org.eclipse.cdt.core.settings.model.ICStorageElement element, boolean readOnly)
           
StorableCdtVariables(StorableCdtVariables base, boolean readOnly)
           
 
Method Summary
 ICdtVariable checkMacro(java.lang.String name, int type, java.lang.String value)
           
 ICdtVariable checkMacro(java.lang.String name, int type, java.lang.String[] value)
           
 boolean contains(ICdtVariable var)
           
 ICdtVariable createMacro(ICdtVariable copy)
           
 ICdtVariable createMacro(java.lang.String name, int type, java.lang.String value)
           
 ICdtVariable createMacro(java.lang.String name, int type, java.lang.String[] value)
           
 void createMacros(ICdtVariable[] macros)
           
 boolean deleteAll()
           
 ICdtVariable deleteMacro(java.lang.String name)
           
 ICdtVariable getMacro(java.lang.String name)
           
 ICdtVariable[] getMacros()
           
 boolean isChanged()
          Returns the "change" state for this set of macros.
 boolean isDirty()
          Returns the "dirty" state for this set of macros.
 boolean isEmpty()
           
 void serialize(org.eclipse.cdt.core.settings.model.ICStorageElement element)
           
 void setChanged(boolean changed)
          sets the "change" state for this set of macros.
 void setDirty(boolean dirty)
          sets the "dirty" state for this set of macros.
 void setMacros(ICdtVariable[] macros)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

MACROS_ELEMENT_NAME

public static final java.lang.String MACROS_ELEMENT_NAME
See Also:
Constant Field Values
Constructor Detail

StorableCdtVariables

public StorableCdtVariables(boolean readOnly)

StorableCdtVariables

public StorableCdtVariables(StorableCdtVariables base,
                            boolean readOnly)

StorableCdtVariables

public StorableCdtVariables(ICdtVariable[] vars,
                            boolean readOnly)

StorableCdtVariables

public StorableCdtVariables(org.eclipse.cdt.core.settings.model.ICStorageElement element,
                            boolean readOnly)
Method Detail

serialize

public void serialize(org.eclipse.cdt.core.settings.model.ICStorageElement element)

createMacro

public ICdtVariable createMacro(java.lang.String name,
                                int type,
                                java.lang.String value)

checkMacro

public ICdtVariable checkMacro(java.lang.String name,
                               int type,
                               java.lang.String value)

checkMacro

public ICdtVariable checkMacro(java.lang.String name,
                               int type,
                               java.lang.String[] value)

setMacros

public void setMacros(ICdtVariable[] macros)

createMacros

public void createMacros(ICdtVariable[] macros)

isEmpty

public boolean isEmpty()

createMacro

public ICdtVariable createMacro(ICdtVariable copy)

createMacro

public ICdtVariable createMacro(java.lang.String name,
                                int type,
                                java.lang.String[] value)

isDirty

public boolean isDirty()
Returns the "dirty" state for this set of macros. If the dirty state is true, that means that the macros is out of synch with the repository and the macros need to be serialized.

The dirty state is automatically set to false when the macros are serialized by calling the serialize() method

Returns:
boolean

setDirty

public void setDirty(boolean dirty)
sets the "dirty" state for this set of macros.

Parameters:
dirty - represents the new state
See Also:
isDirty()

isChanged

public boolean isChanged()
Returns the "change" state for this set of macros. The "change" state represents whether the macros were changed or not. This state is not reset when the serialize() method is called Users can use this state to monitor whether the macros were changed or not. The "change" state can be reset only by calling the setChanged(false) method

Returns:
boolean

setChanged

public void setChanged(boolean changed)
sets the "change" state for this set of macros.

Parameters:
changed - represents the new "change" state
See Also:
isChanged()

getMacro

public ICdtVariable getMacro(java.lang.String name)

getMacros

public ICdtVariable[] getMacros()

deleteMacro

public ICdtVariable deleteMacro(java.lang.String name)

deleteAll

public boolean deleteAll()

contains

public boolean contains(ICdtVariable var)