org.rococoa.cocoa.carboncore
Class MachineLocation

java.lang.Object
  extended by com.sun.jna.Structure
      extended by com.ochafik.lang.jnaerator.runtime.Structure
          extended by org.rococoa.cocoa.carboncore.MachineLocation
Direct Known Subclasses:
MachineLocation.ByReference, MachineLocation.ByValue

public class MachineLocation
extends com.ochafik.lang.jnaerator.runtime.Structure

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.
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, CALCULATE_SIZE
 
Constructor Summary
MachineLocation()
           
MachineLocation(int latitude, int longitude, MachineLocation.u_union u)
           
 
Method Summary
 MachineLocation.ByReference byReference()
           
 MachineLocation.ByValue byValue()
           
 MachineLocation clone()
           
 
Methods inherited from class com.ochafik.lang.jnaerator.runtime.Structure
setupClone
 
Methods inherited from class com.sun.jna.Structure
allocateMemory, allocateMemory, cacheTypeInfo, clear, ensureAllocated, equals, getAutoRead, getAutoWrite, getFieldOrder, getNativeAlignment, getPointer, getStructAlignment, hashCode, newInstance, read, readField, setAlignType, setAutoRead, setAutoSynch, setAutoWrite, setFieldOrder, setTypeMapper, size, sortFields, toArray, toArray, toString, useMemory, useMemory, write, writeField, writeField
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

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)
Method Detail

byReference

public MachineLocation.ByReference byReference()

byValue

public MachineLocation.ByValue byValue()

clone

public MachineLocation clone()
Overrides:
clone in class Object