package org.eclipse.linuxtools.ctf.core.event.types;
-import org.eclipse.linuxtools.ctf.core.event.io.BitBuffer;
+import org.eclipse.linuxtools.internal.ctf.core.event.io.BitBuffer;
/**
- * <b><u>Definition</u></b>
+ * <b><u>Definition</u></b><br>
+ * A definition is like an object of a declaration class. It fills the declaration with values. <br>
+ * An example: <br>
+ * int i = 0; <br>
+ * <b>int</b> is the declaration.<br>
+ * <b>i</b> is the definition.<br>
+ * <b>0</b> is the value assigned to the definition, not the declaration.<br>
+ *
*/
public abstract class Definition {
// Attributes
// ------------------------------------------------------------------------
- /* The name of the field in its container */
+ /** The name of the field in its container */
protected final String fieldName;
- /* The complete path of this field */
+ /** The complete path of this field */
protected final String path;
- /*
+ /**
* The definition scope in which this definition is found.
*
* The complete path of a definition is thus the path of the definition
// Constructors
// ------------------------------------------------------------------------
+ /**
+ * Constructor
+ *
+ * @param definitionScope
+ * the definition is in a scope, (normally a struct) what is it?
+ * @param fieldName
+ * the name of the definition. (it is a field in the parent
+ * scope)
+ */
public Definition(IDefinitionScope definitionScope, String fieldName) {
this.definitionScope = definitionScope;
this.fieldName = fieldName;
// Operations
// ------------------------------------------------------------------------
+ /**
+ *
+ * @return gets the declaration of a datatype
+ *
+ */
+ public abstract IDeclaration getDeclaration();
+
+ /**
+ * Read the definition from a bitbuffer
+ *
+ * @param input
+ * the bitbuffer containing the data to read.
+ */
public abstract void read(BitBuffer input);
@Override