Eclipse CDT
Pre-release 3.0

org.eclipse.cdt.core.dom.ast
Interface IASTSimpleDeclSpecifier

All Superinterfaces:
IASTDeclSpecifier, IASTNode
All Known Subinterfaces:
ICASTSimpleDeclSpecifier, ICPPASTSimpleDeclSpecifier, IGCCASTSimpleDeclSpecifier, IGPPASTSimpleDeclSpecifier

public interface IASTSimpleDeclSpecifier
extends IASTDeclSpecifier

This represents a decl specifier for a built-in type.


Field Summary
static int t_char
          t_char implies char type e.g. char y;
static int t_double
          t_double implies double floating point type. e.g. double d;
static int t_float
          t_float implies floating point type. e.g. float yy;
static int t_int
          t_int implies int type e.g. int x;
static int t_last
          t_last specified for subinterface definition.
static int t_unspecified
          t_unspecified implies an unspecified type. .e.g x = 5; // declaration w/t_unspecified type logically defaults to integer.
static int t_void
          t_void implies void type e.g. void x();
 
Fields inherited from interface org.eclipse.cdt.core.dom.ast.IASTDeclSpecifier
sc_auto, sc_extern, sc_last, sc_register, sc_static, sc_typedef, sc_unspecified
 
Fields inherited from interface org.eclipse.cdt.core.dom.ast.IASTNode
EMPTY_NODE_ARRAY
 
Method Summary
 int getType()
          This returns the built-in type for the declaration.
 boolean isLong()
          Is the type modified by the long keyword?
 boolean isShort()
          Is the type modified by the short keyword?
 boolean isSigned()
          Is the type modified by the signed keyword?
 boolean isUnsigned()
          Is the type modified by the unsigned keyword?
 void setLong(boolean value)
          Change as to if the type is modified by the keyword long.
 void setShort(boolean value)
          Change as to if the type is modified by the keyword short.
 void setSigned(boolean value)
          Change as to if the type is modified by the keyword signed.
 void setType(int type)
          Set this decl specifier type to type.
 void setUnsigned(boolean value)
          Change as to if the type is modified by the keyword unsigned.
 
Methods inherited from interface org.eclipse.cdt.core.dom.ast.IASTDeclSpecifier
getRawSignature, getStorageClass, isConst, isInline, isVolatile, setConst, setInline, setStorageClass, setVolatile
 
Methods inherited from interface org.eclipse.cdt.core.dom.ast.IASTNode
accept, getContainingFilename, getFileLocation, getNodeLocations, getParent, getPropertyInParent, getTranslationUnit, setParent, setPropertyInParent
 

Field Detail

t_unspecified

static final int t_unspecified
t_unspecified implies an unspecified type. .e.g x = 5; // declaration w/t_unspecified type logically defaults to integer.

See Also:
Constant Field Values

t_void

static final int t_void
t_void implies void type e.g. void x();

See Also:
Constant Field Values

t_char

static final int t_char
t_char implies char type e.g. char y;

See Also:
Constant Field Values

t_int

static final int t_int
t_int implies int type e.g. int x;

See Also:
Constant Field Values

t_float

static final int t_float
t_float implies floating point type. e.g. float yy;

See Also:
Constant Field Values

t_double

static final int t_double
t_double implies double floating point type. e.g. double d;

See Also:
Constant Field Values

t_last

static final int t_last
t_last specified for subinterface definition.

See Also:
Constant Field Values
Method Detail

getType

int getType()
This returns the built-in type for the declaration. The type is then refined by qualifiers for signed/unsigned and short/long. The type could also be unspecified which usually means int.

Returns:

setType

void setType(int type)
Set this decl specifier type to type.

Parameters:
type - (int)

isSigned

boolean isSigned()
Is the type modified by the signed keyword?

Returns:
boolean

isUnsigned

boolean isUnsigned()
Is the type modified by the unsigned keyword?

Returns:
boolean

isShort

boolean isShort()
Is the type modified by the short keyword?

Returns:
boolean

isLong

boolean isLong()
Is the type modified by the long keyword?

Returns:
boolean

setSigned

void setSigned(boolean value)
Change as to if the type is modified by the keyword signed.

Parameters:
value - boolean

setUnsigned

void setUnsigned(boolean value)
Change as to if the type is modified by the keyword unsigned.

Parameters:
value - boolean

setLong

void setLong(boolean value)
Change as to if the type is modified by the keyword long.

Parameters:
value - boolean

setShort

void setShort(boolean value)
Change as to if the type is modified by the keyword short.

Parameters:
value - boolean

Eclipse CDT
Pre-release 3.0

Copyright (c) IBM Corp. and others 2004. All Rights Reserved.