1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-06-30 21:55:31 +02:00

Interfaces for basic types

This commit is contained in:
Andrew Niefer 2004-12-10 17:03:16 +00:00
parent 97c7e2b893
commit 3b8838d4bc
4 changed files with 104 additions and 0 deletions

View file

@ -19,4 +19,24 @@ package org.eclipse.cdt.core.dom.ast;
*/
public interface IBasicType extends IType {
/**
* 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.
*
* @return
*/
public int getType();
public static final int t_unspecified = IASTSimpleDeclSpecifier.t_unspecified;
public static final int t_void = IASTSimpleDeclSpecifier.t_void;
public static final int t_char = IASTSimpleDeclSpecifier.t_char;
public static final int t_int = IASTSimpleDeclSpecifier.t_int;
public static final int t_float = IASTSimpleDeclSpecifier.t_float;
public static final int t_double = IASTSimpleDeclSpecifier.t_double;
public boolean isSigned();
public boolean isUnsigned();
public boolean isShort();
public boolean isLong();
}

View file

@ -0,0 +1,28 @@
/*******************************************************************************
* Copyright (c) 2004 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Common Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/cpl-v10.html
*
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
/*
* Created on Dec 10, 2004
*/
package org.eclipse.cdt.core.dom.ast.c;
import org.eclipse.cdt.core.dom.ast.IBasicType;
/**
* @author aniefer
*/
public interface ICBasicType extends IBasicType {
// Extra types in C
public static final int t_Bool = ICASTSimpleDeclSpecifier.t_Bool;
public static final int t_Complex = ICASTSimpleDeclSpecifier.t_Complex;
public static final int t_Imaginary = ICASTSimpleDeclSpecifier.t_Imaginary;
public boolean isLongLong();
}

View file

@ -0,0 +1,25 @@
/*******************************************************************************
* Copyright (c) 2004 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Common Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/cpl-v10.html
*
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
/*
* Created on Dec 10, 2004
*/
package org.eclipse.cdt.core.dom.ast.cpp;
import org.eclipse.cdt.core.dom.ast.IBasicType;
/**
* @author aniefer
*/
public interface ICPPBasicType extends IBasicType {
//Extra types
public static final int t_bool = ICPPASTSimpleDeclSpecifier.t_bool;
public static final int t_wchar_t = ICPPASTSimpleDeclSpecifier.t_wchar_t;
}

View file

@ -0,0 +1,31 @@
/*******************************************************************************
* Copyright (c) 2004 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Common Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/cpl-v10.html
*
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
/*
* Created on Dec 10, 2004
*/
package org.eclipse.cdt.core.dom.ast.gnu.cpp;
import org.eclipse.cdt.core.dom.ast.IType;
import org.eclipse.cdt.core.dom.ast.cpp.ICPPBasicType;
/**
* @author aniefer
*/
public interface IGPPBasicType extends ICPPBasicType {
public static final int t_Complex = IGPPASTSimpleDeclSpecifier.t_Complex;
public static final int t_Imaginary = IGPPASTSimpleDeclSpecifier.t_Imaginary;
public static final int t_typeof = IGPPASTSimpleDeclSpecifier.t_typeof;
public boolean isLongLong();
public IType getTypeofType();
}