eXept Software AG Logo

Smalltalk/X Webserver

Documentation of class 'SunRPC::XDRType':

Home

Documentation
www.exept.de
Everywhere
for:
[back]

Class: XDRType (in SunRPC)


Inheritance:

   Object
   |
   +--SunRPC::XDRType
      |
      +--SunRPC::XDRType::ArrayType
      |
      +--SunRPC::XDRType::CompoundType
      |
      +--SunRPC::XDRType::OpaqueType
      |
      +--SunRPC::XDRType::OptionalType
      |
      +--SunRPC::XDRType::ScalarType
      |
      +--SunRPC::XDRType::StringType
      |
      +--SunRPC::XDRType::TypedefType
      |
      +--SunRPC::XDRType::UnknownType
      |
      +--SunRPC::XDRType::VoidType

Package:
stx:goodies/communication
Category:
Net-Communication-SunRPC-XDR_IDL
Version:
rev: 1.29 date: 2024/03/26 13:08:02
user: cg
file: SunRPC_XDRType.st directory: goodies/communication
module: stx stc-classLibrary: communication

Description:


an XDRType represents a type of some XDR-datum.

copyright

COPYRIGHT (c) 2002 by eXept Software AG All Rights Reserved This software is furnished under a license and may be used only in accordance with the terms of that license and with the inclusion of the above copyright notice. This software may not be provided or otherwise made available to, or used by, any other person. No title to or ownership of the software is hereby transferred.

Class protocol:

Signal constants
o  accessErrorSignal

o  badEnumValueErrorSignal

o  badMemberAccessErrorSignal

o  elementOutOfBoundsSignal
(comment from inherited method)
return the signal used for element error reporting
(this signal is used for example when a value not in 0..255 is to
be put into a bytearray).
This now returns ElementBoundsError (class based exception)
and this method is only provided for portability
(old Smalltalk versions used a signal instance here).
You can savely use ElementBoundsError directly.

o  indexBoundsErrorSignal

class access
o  arrayType

o  booleanType

o  charType

o  doubleType

o  enumItem

o  enumType

o  field

o  floatType

o  hyperType

o  intType

o  longType

o  opaqueType

o  optionalType

o  shortType

o  stringType

o  structType

o  typedefType

o  unionField

o  unionType

o  unknownType

o  unsignedCharType

o  unsignedHyperType

o  unsignedIntType

o  unsignedLongType

o  unsignedShortType

o  voidType

class initialization
o  initialize
self initialize

defaults
o  returnBadEnumsAsNumeric: aBoolean
should be left false during development & debugging;
can be set to true for end-user-apps.
(however, the app should be prepared to get numeric enum-field values)

o  structAlignment

o  unionAlignment

queries
o  isAbstract
Return if this class is an abstract class.
True is returned here for myself only; false for subclasses.
Abstract subclasses must redefine this again.


Instance protocol:

accessing
o  name: something
set the value of the instance variable 'name' (automatically generated)

accessing-C
o  fieldNamed: fieldName ifAbsent: exceptionValue
raise an error for field accesses.
This is only redefined in StructType.

o  fields
return my fields - this returns an empty collection here;
redefined in union and struct types

o  name

o  type

inspecting
o  inspectorClass
return the class of an appropriate inspector.
ST/X has a specialized IDLDatumInspectorView for that

printing
o  displayString
return a nice printed representation

o  idlString: datum indent: indent
helper for displayString.

o  idlString: datum indent: indent fieldName: fieldName
helper for displayString.

o  idlString: datum offset: o indent: indent
helper for displayString.

o  idlString: datum offset: o indent: indent fieldName: fieldName
helper for displayString.

o  methodAgumentNameForTemplate: template
return a string usable as argument name giving a type hint;
for example, string types should generate <templ>String

Usage example(s):

     SunRPC::XDRType::LongType basicNew
        methodAgumentNameForTemplate:'arg1'

o  smalltalkDefaultValueString
return a string usable as default value for this type.
for example, integer types should return '0' here

queries
o  defaultValue

o  enumValues
raise an error here;
redefined in enum types

o  hasEnumValues
true if my type is a kind of enum type

o  isIndexed
return true if this Type has fields accessible via an index (i.e. is an array)

o  isInteger
return true if this Type represents an integer
(i.e. signed, unsigned integer, short or long)

o  isOptional
return true if this Type represents an optional type

o  isXDRArray
return true if this Type represents an Array

o  isXDRBoolean
return true if this Type represents an Boolean

o  isXDRChar
return true if this Type represents a char type
(i.e. signed, unsigned integer)

o  isXDRCompound
return true if this Type represents either a struct or a union

o  isXDRDouble
return true if this Type represents a double

o  isXDREnum
return true if this Type represents an enum

o  isXDRFloat
return true if this Type represents a float

o  isXDRHyper
return true if this Type represents a hyper size number
(i.e. an int64 or unsigned64 )

o  isXDRInteger
return true if this Type represents an integer type
(i.e. signed, unsigned integer)

o  isXDRLong
return true if this Type represents a long type
(i.e. signed, unsigned integer)

o  isXDRNumber
return true if this Type represents a number
(i.e. signed, unsigned integer, float or double)

o  isXDROpaque
return true if this Type represents an opaque

o  isXDRScalar
return true if this Type represents a scalar (non composite type).
I.e. its one of char, int, float or short

o  isXDRShort
return true if this Type represents a short type
(i.e. signed, unsigned integer)

o  isXDRString
return true if this Type represents an array of chars (or unsigned chars)

o  isXDRStruct
return true if this Type represents a struct

o  isXDRTypeDef
return true if this Type is a typedef

o  isXDRUnion
return true if this Type represents a union

o  isXDRUnsigned
return true if this Type represents an unsigned integer scalar type.

o  isXDRVoid
return true if this Type represents a void type

o  numericEnumValues
raise an error here;
redefined in enum types

o  sameTypeAs: aType
return true if this Type is compatible with aType

o  symbolicEnumValues
raise an error here;
redefined in enum types

o  xdrType
return my actual type; that's myself here,
but redefined in typedef, to return the real type
(which will avoid indirections in later accesses)

queries-C
o  alignment
return the Types (wire) alignment in bytes

o  memberNames

o  sizeof
return the Types (wire) size in bytes

** This method must be redefined in concrete classes (subclassResponsibility) **


Private classes:

    ArrayType
    BooleanType
    CharType
    CompoundType
    DoubleType
    EnumItem
    EnumType
    Field
    FloatType
    HyperType
    IntType
    IntegerType
    LongType
    OpaqueType
    OptionalType
    ScalarType
    ShortType
    StringType
    StructType
    TypedefType
    UnionField
    UnionType
    UnknownType
    UnsignedCharType
    UnsignedHyperType
    UnsignedIntType
    UnsignedLongType
    UnsignedShortType
    VoidType


ST/X 7.7.0.0; WebServer 1.702 at 20f6060372b9.unknown:8081; Mon, 18 Nov 2024 04:25:07 GMT