EMMA Coverage Report (generated Mon Mar 20 21:34:30 PST 2006)
[all classes][com.moesol.bindings.platform_sdk.windows_api]

COVERAGE SUMMARY FOR SOURCE FILE [SIZE.java]

nameclass, %method, %block, %line, %
SIZE.java50%  (1/2)53%  (8/15)28%  (36/128)38%  (13/34)

COVERAGE BREAKDOWN BY CLASS AND METHOD

nameclass, %method, %block, %line, %
     
class SIZE$Array0%   (0/1)0%   (0/6)0%   (0/51)0%   (0/11)
SIZE$Array (ByteBuffer): void 0%   (0/1)0%   (0/4)0%   (0/2)
get (int): SIZE 0%   (0/1)0%   (0/8)0%   (0/1)
getDynamicSize (): int 0%   (0/1)0%   (0/4)0%   (0/1)
length (): int 0%   (0/1)0%   (0/6)0%   (0/1)
put (int, SIZE): void 0%   (0/1)0%   (0/8)0%   (0/2)
toString (): String 0%   (0/1)0%   (0/21)0%   (0/4)
     
class SIZE100% (1/1)89%  (8/9)47%  (36/77)57%  (13/23)
toString (): String 0%   (0/1)0%   (0/41)0%   (0/10)
SIZE (): void 100% (1/1)100% (5/5)100% (2/2)
SIZE (ByteBuffer): void 100% (1/1)100% (9/9)100% (3/3)
getDynamicSize (): int 100% (1/1)100% (2/2)100% (1/1)
get_cx (): int 100% (1/1)100% (4/4)100% (1/1)
get_cy (): int 100% (1/1)100% (4/4)100% (1/1)
set_cx (int): void 100% (1/1)100% (5/5)100% (2/2)
set_cy (int): void 100% (1/1)100% (5/5)100% (2/2)
sizeof (): int 100% (1/1)100% (2/2)100% (1/1)

1/*
2 * $Id: SIZE.java,v 1.2 2006/03/01 20:54:18 hastings Exp $
3 *
4 * (c) Copyright, Moebius Solutions, Inc., 2004
5 *
6 *                       All Rights Reserved
7 *
8 * This material may be reproduced by or for the U. S. Government
9 * pursuant to the copyright license under the clause at
10 * DFARS 252.227-7014 (OCT 2001).
11 */
12 
13package com.moesol.bindings.platform_sdk.windows_api;
14 
15/**
16 * SIZE structure
17 */
18public class SIZE extends com.moesol.bindings.NativeStructure {
19    /**
20     * Create a new instance.
21     */
22    public SIZE() {
23        super(new byte[sizeof()]);
24    }
25    /**
26     * Create a new instance on a byte buffer.
27     */
28    public SIZE(java.nio.ByteBuffer bb) {
29        super(bb);
30        // set limit based on the dynamic size in byte in bb.
31        bb.limit(getDynamicSize());
32    }
33    public static int sizeof() {
34        return 8;
35    }
36 
37    /**
38     * Represent a native array of these structures
39     */
40    public static class Array extends com.moesol.bindings.NativeArrayOfStructs {
41        public Array(java.nio.ByteBuffer bb) {
42            super(bb);
43        }
44        public SIZE get(int index) {
45            return new SIZE(getElementSlice(index, SIZE.sizeof()));
46        }
47        public void put(int index, SIZE value) {
48            get(index).putStruct(0, SIZE.sizeof(), value);
49        }
50        public int length() {
51            return _getByteBuffer().limit() / SIZE.sizeof();
52        }
53        public int getDynamicSize() {
54            return _getByteBuffer().limit();
55        }
56        public String toString() {
57            StringBuffer sb = new StringBuffer();
58            for (int i = 0; i < length(); i++) {
59                sb.append(get(i));
60            }
61            return sb.toString();
62        }
63    }
64 
65 
66 
67    public static final int OFFSET_cx = 0;
68    /**
69     * 
70     * @param v new cx value
71     */
72    public void set_cx(int v) {
73        putInt(0, v);
74    }
75    /**
76     * 
77     * @return cx value
78     */
79    public int get_cx() {
80        return getInt(0);
81    }
82 
83    public static final int OFFSET_cy = 4;
84    /**
85     * 
86     * @param v new cy value
87     */
88    public void set_cy(int v) {
89        putInt(4, v);
90    }
91    /**
92     * 
93     * @return cy value
94     */
95    public int get_cy() {
96        return getInt(4);
97    }
98 
99    /**
100     * Get dynamic size in bytes.
101     * If this structure contains a variable size array,
102     * return the number of bytes needed to hold the fixed
103     * part and the variable sized array based on the [length_is()]
104     * attribute. Note that the sizeof method on returns the
105     * size of the fixed part plus the size of one array entry.
106     *
107     * @return dynamic size in bytes.
108     */
109    public int getDynamicSize() {
110        return sizeof();
111    }
112 
113    public String toString() {
114        StringBuffer sb = new StringBuffer();
115        sb.append("\nSIZE(");
116        sb.append("cx(");
117        sb.append(get_cx());
118        sb.append(")");
119 
120        sb.append("cy(");
121        sb.append(get_cy());
122        sb.append(")");
123 
124        sb.append(')');
125        return sb.toString();
126    }
127}

[all classes][com.moesol.bindings.platform_sdk.windows_api]
EMMA 2.0.5312 (C) Vladimir Roubtsov