GlueGen v2.6.0-rc-20250712
GlueGen, Native Binding Generator for Java™ (public API).
FloatType.java
Go to the documentation of this file.
1/*
2 * Copyright (c) 2003 Sun Microsystems, Inc. All Rights Reserved.
3 * Copyright (c) 2010 JogAmp Community. All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are
7 * met:
8 *
9 * - Redistribution of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer.
11 *
12 * - Redistribution in binary form must reproduce the above copyright
13 * notice, this list of conditions and the following disclaimer in the
14 * documentation and/or other materials provided with the distribution.
15 *
16 * Neither the name of Sun Microsystems, Inc. or the names of
17 * contributors may be used to endorse or promote products derived from
18 * this software without specific prior written permission.
19 *
20 * This software is provided "AS IS," without a warranty of any kind. ALL
21 * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
22 * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
23 * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
24 * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
25 * ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
26 * DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
27 * ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
28 * DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE
29 * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
30 * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
31 * SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
32 *
33 * You acknowledge that this software is not designed or intended for use
34 * in the design, construction, operation or maintenance of any nuclear
35 * facility.
36 *
37 * Sun gratefully acknowledges that this software was originally authored
38 * and developed by Kenneth Bradley Russell and Christopher John Kline.
39 */
40
41package com.jogamp.gluegen.cgram.types;
42
43import com.jogamp.gluegen.ASTLocusTag;
44
45/** Represents a single-word floating-point type (C type "float".) */
46
47public class FloatType extends PrimitiveType implements Cloneable {
48 public FloatType(final String name, final SizeThunk size, final int cvAttributes, final ASTLocusTag astLocus) {
49 super(name, size, cvAttributes, astLocus);
50 }
51
52 private FloatType(final FloatType o, final int cvAttributes, final ASTLocusTag astLocus) {
53 super(o, cvAttributes, astLocus);
54 }
55
56 @Override
57 Type newVariantImpl(final boolean newCVVariant, final int cvAttributes, final ASTLocusTag astLocus) {
58 return new FloatType(this, cvAttributes, astLocus);
59 }
60
61 @Override
62 public FloatType asFloat() { return this; }
63
64 @Override
65 protected int hashCodeImpl() {
66 return 0;
67 }
68
69 @Override
70 protected boolean equalsImpl(final Type t) {
71 return true;
72 }
73
74 @Override
75 protected int hashCodeSemanticsImpl() {
76 return 0;
77 }
78
79 @Override
80 protected boolean equalSemanticsImpl(final Type t) {
81 return true;
82 }
83}
Represents a single-word floating-point type (C type "float".)
Definition: FloatType.java:47
FloatType(final String name, final SizeThunk size, final int cvAttributes, final ASTLocusTag astLocus)
Definition: FloatType.java:48
boolean equalSemanticsImpl(final Type t)
Definition: FloatType.java:80
FloatType asFloat()
Casts this to a FloatType or returns null if not a FloatType.
Definition: FloatType.java:62
Provides a level of indirection between the definition of a type's size and the absolute value of thi...
Definition: SizeThunk.java:51
final Type newCVVariant(final int cvAttributes)
Return a variant of this type matching the given const/volatile attributes.
Definition: Type.java:98