~ubuntu-branches/ubuntu/quantal/hawtjni/quantal

« back to all changes in this revision

Viewing changes to hawtjni-runtime/src/main/java/org/fusesource/hawtjni/runtime/ArgFlag.java

  • Committer: Bazaar Package Importer
  • Author(s): Miguel Landaeta
  • Date: 2010-08-05 19:40:25 UTC
  • Revision ID: james.westby@ubuntu.com-20100805194025-3004hn889accwu2i
Tags: upstream-1.0~+git0c502e20c4
ImportĀ upstreamĀ versionĀ 1.0~+git0c502e20c4

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*******************************************************************************
 
2
 * Copyright (c) 2009 Progress Software, Inc.
 
3
 * Copyright (c) 2004, 2008 IBM Corporation and others.
 
4
 * 
 
5
 * All rights reserved. This program and the accompanying materials
 
6
 * are made available under the terms of the Eclipse Public License v1.0
 
7
 * which accompanies this distribution, and is available at
 
8
 * http://www.eclipse.org/legal/epl-v10.html
 
9
 *******************************************************************************/
 
10
package org.fusesource.hawtjni.runtime;
 
11
 
 
12
/**
 
13
 * 
 
14
 * @author <a href="http://hiramchirino.com">Hiram Chirino</a>
 
15
 */
 
16
public enum ArgFlag {
 
17
    
 
18
    /**
 
19
     * Indicate that a native method parameter is an out only variable. 
 
20
     * This only makes sense if the parameter is a structure or an array 
 
21
     * of primitives. It is an optimization to avoid copying the java 
 
22
     * memory to C memory on the way in. 
 
23
     */
 
24
    NO_IN,
 
25
    
 
26
    /**
 
27
     * Indicate that a native method parameter is an in only variable. 
 
28
     * This only makes sense if the parameter is a structure or an array 
 
29
     * of primitives. It is an optimization to avoid copying the C memory 
 
30
     * from java memory on the way out.
 
31
     */
 
32
    NO_OUT,
 
33
    
 
34
    /**
 
35
     * Indicate that GetPrimitiveArrayCritical() should be used instead 
 
36
     * of Get<PrimitiveType>ArrayElements() when transferring array of 
 
37
     * primitives from/to C. This is an optimization to avoid copying 
 
38
     * memory and must be used carefully. It is ok to be used in
 
39
     * MoveMemory() and memmove() natives. 
 
40
     */
 
41
    CRITICAL,
 
42
    
 
43
    /**
 
44
     * Indicate that the associated C local variable for a native method 
 
45
     * parameter should be initialized with zeros. 
 
46
     */
 
47
    INIT,
 
48
    
 
49
    /**
 
50
     * Indicate that the parameter is a pointer.
 
51
     */
 
52
    POINTER_ARG,
 
53
 
 
54
    /**
 
55
     * Indicate that a structure parameter should be passed by value 
 
56
     * instead of by reference. This dereferences the parameter by 
 
57
     * prepending *. The parameter must not be NULL.
 
58
     */
 
59
    BY_VALUE,
 
60
    
 
61
    /**
 
62
     * Indicate that GetStringChars()should be used instead of 
 
63
     * GetStringUTFChars() to get the characters of a java.lang.String 
 
64
     * passed as a parameter to native methods.
 
65
     */
 
66
    UNICODE,
 
67
    
 
68
    /**
 
69
     * Indicate that the parameter of a native method is the sentinel 
 
70
     * (last parameter of a variable argument C function). The generated 
 
71
     * code is always the literal NULL. Some compilers expect the sentinel 
 
72
     * to be the literal NULL and output a warning if otherwise.
 
73
     */
 
74
    SENTINEL,
 
75
        
 
76
    /**
 
77
     * Indicate that the native parameter is a C# managed object.
 
78
     */
 
79
    CS_OBJECT,
 
80
 
 
81
}
 
 
b'\\ No newline at end of file'