org.rococoa.cocoa.carboncore
Class MachineLocation

java.lang.Object
  extended by com.sun.jna.Structure
      extended by com.ochafik.lang.jnaerator.runtime.Structure<MachineLocation,MachineLocation.ByValue,MachineLocation.ByReference>
          extended by org.rococoa.cocoa.carboncore.MachineLocation
All Implemented Interfaces:
StructureType, StructureTypeDependent, Comparable<Structure<MachineLocation,MachineLocation.ByValue,MachineLocation.ByReference>>
Direct Known Subclasses:
MachineLocation.ByReference, MachineLocation.ByValue

public class MachineLocation
extends Structure<MachineLocation,MachineLocation.ByValue,MachineLocation.ByReference>

In order for MachineLocation to be endian-safe, a new member
has been added to the 'u' union in the structure. You are
encouraged to use the new member instead of the old one.
If your code looked like this:
MachineLocation.u.dlsDelta = isDLS? 0x80: 0x00;
you should change it to this:
MachineLocation.u.dls.Delta = isDLS? 0x80: 0x00;
to be endian safe. The gmtDelta remains the same; the low 24-bits
are used. Remember that order of assignment DOES matter:
This will overwrite results:
MachineLocation.u.dls.Delta = 0xAA; // u = 0xAAGGGGGG; G=Garbage
MachineLocation.u.gmtDelta = 0xBBBBBB; // u = 0x00BBBBBB;
when in fact reversing the assignment would have preserved the values:
MachineLocation.u.gmtDelta = 0xBBBBBB; // u = 0x00BBBBBB;
MachineLocation.u.dls.Delta = 0xAA; // u = 0xAABBBBBB;
NOTE: The information regarding dlsDelta in Inside Mac is INCORRECT.
It's always 0x80 for daylight-saving time or 0x00 for standard time.
native declaration : /System/Library/Frameworks/CoreServices.framework/Versions/Current/Frameworks/CarbonCore.framework/Headers/OSUtils.h:103
This file was autogenerated by JNAerator,
a tool written by Olivier Chafik that uses a few opensource projects..
For help, please visit NativeLibs4Java, Rococoa, or JNA.


Nested Class Summary
static class MachineLocation.ByReference
           
static class MachineLocation.ByValue
           
static class MachineLocation.u_union
           
 
Field Summary
 int latitude
           
 int longitude
           
 MachineLocation.u_union u
           
 
Fields inherited from class com.sun.jna.Structure
ALIGN_DEFAULT, ALIGN_GNUC, ALIGN_MSVC, ALIGN_NONE
 
Constructor Summary
MachineLocation()
           
MachineLocation(int latitude, int longitude, MachineLocation.u_union u)
           
 
Method Summary
static MachineLocation[] newArray(int arrayLength)
           
 
Methods inherited from class com.ochafik.lang.jnaerator.runtime.Structure
byReference, byValue, castToArray, castToArray, castToArray, castToReferenceArray, castToReferenceArray, castToValueArray, castToValueArray, clone, compareTo, newArray, read, setDependency, toArray, toArray, toArray, toReferenceArray, toReferenceArray, toValueArray, toValueArray, use, use, use, use, write
 
Methods inherited from class com.sun.jna.Structure
autoRead, autoRead, autoWrite, autoWrite, clear, equals, getAutoRead, getAutoWrite, getPointer, hashCode, newInstance, readField, setAutoRead, setAutoSynch, setAutoWrite, size, toString, writeField, writeField
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.ochafik.lang.jnaerator.runtime.StructureType
getPointer, size
 

Field Detail

latitude

public int latitude

longitude

public int longitude

u

public MachineLocation.u_union u
Constructor Detail

MachineLocation

public MachineLocation()

MachineLocation

public MachineLocation(int latitude,
                       int longitude,
                       MachineLocation.u_union u)
Parameters:
latitude - C type : Fract
longitude - C type : Fract
u - C type : u_union
Method Detail

newArray

public static MachineLocation[] newArray(int arrayLength)


Copyright © 2009. All Rights Reserved.