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.25 date: 2019/06/28 07:19:52
user: cg
file: SunRPC_XDRType.st directory: goodies/communication
module: stx stc-classLibrary: communication
Author:
Claus Gittinger

Description:


an XDRType represents a type of some XDR-datum.


Related information:

    XDRType
    XDRDatum
    XDRParser
    IDLType
    IDLDatum
    IDLParser
    CType

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)

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


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 raises an error - it must be redefined in concrete classes **


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.2.0.0; WebServer 1.670 at bd0aa1f87cdd.unknown:8081; Fri, 29 Mar 2024 09:05:29 GMT