home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / fnb101.zip / Lib / site-packages / Fnorb / orb / Limits.py < prev    next >
Text File  |  1999-06-28  |  2KB  |  57 lines

  1. #!/usr/bin/env python
  2. #############################################################################
  3. # Copyright (C) DSTC Pty Ltd (ACN 052 372 577) 1997, 1998, 1999
  4. # All Rights Reserved.
  5. #
  6. # The software contained on this media is the property of the DSTC Pty
  7. # Ltd.  Use of this software is strictly in accordance with the
  8. # license agreement in the accompanying LICENSE.HTML file.  If your
  9. # distribution of this software does not contain a LICENSE.HTML file
  10. # then you have no rights to use this software in any manner and
  11. # should contact DSTC at the address below to determine an appropriate
  12. # licensing arrangement.
  13. #      DSTC Pty Ltd
  14. #      Level 7, GP South
  15. #      Staff House Road
  16. #      University of Queensland
  17. #      St Lucia, 4072
  18. #      Australia
  19. #      Tel: +61 7 3365 4310
  20. #      Fax: +61 7 3365 4311
  21. #      Email: enquiries@dstc.edu.au
  22. # This software is being provided "AS IS" without warranty of any
  23. # kind.  In no event shall DSTC Pty Ltd be liable for damage of any
  24. # kind arising out of or in connection with the use or performance of
  25. # this software.
  26. #
  27. # Project:      Fnorb
  28. # File:         $Source: /units/arch/src/Fnorb/orb/RCS/Limits.py,v $
  29. # Version:      @(#)$RCSfile: Limits.py,v $ $Revision: 1.1 $
  30. #
  31. #############################################################################
  32. """ Limits for CORBA types. """
  33.  
  34.  
  35. # short/unsigned short - 16 bits
  36. MIN_SHORT     = -pow(2L, 15)
  37. MAX_SHORT     = +pow(2L, 15) - 1
  38. MIN_USHORT    = 0
  39. MAX_USHORT    = +pow(2L, 16) - 1
  40.  
  41. # long/unsigned long - 32 bits
  42. MIN_LONG      = -pow(2L, 31)
  43. MAX_LONG      = +pow(2L, 31) - 1
  44. MIN_ULONG     = 0
  45. MAX_ULONG     = +pow(2L, 32) - 1
  46.  
  47. # long long/unsigned long long - 64 bits
  48. MIN_LONGLONG  = -pow(2L, 63)
  49. MAX_LONGLONG  = +pow(2L, 63) - 1
  50. MIN_ULONGLONG = 0
  51. MAX_ULONGLONG = +pow(2L, 64) - 1
  52.  
  53.  
  54. #############################################################################
  55.