home *** CD-ROM | disk | FTP | other *** search
/ ftptest.leeds.ac.uk / 2015.02.ftptest.leeds.ac.uk.tar / ftptest.leeds.ac.uk / bionet / CAE-GROUP / SCL-WIN3x / SCL.EXE / EXPDICTI.CPP < prev    next >
Text File  |  1994-08-06  |  2KB  |  76 lines

  1.  
  2. /*
  3. * NIST STEP Core Class Library
  4. * clstepcore/ExpDict.inline.cc
  5. * February, 1994
  6. * K. C. Morris
  7. * David Sauder
  8.  
  9. * Development of this software was funded by the United States Government,
  10. * and is not subject to copyright.
  11. */
  12.  
  13. /* $Id: ExpDict.inline.cc,v 2.0.1.1 1994/04/05 16:39:14 sauderd Exp $  */ 
  14.  
  15. #include <ExpDict.h>
  16.  
  17. ///////////////////////////////////////////////////////////////////////////////
  18. // TypeDescriptor functions
  19. ///////////////////////////////////////////////////////////////////////////////
  20.  
  21.  
  22. TypeDescriptor::TypeDescriptor( ) 
  23. : _name (0), _fundamentalType(UNKNOWN_TYPE), _referentType (0), _description (0)
  24. {
  25. }
  26.  
  27. TypeDescriptor::TypeDescriptor
  28. (const char * nm, BASE_TYPE ft, const char * d )
  29. :  _name (nm), _fundamentalType (ft), _referentType (0), _description (d)  
  30. {
  31. }
  32.  
  33. const char * 
  34. TypeDescriptor::BaseTypeName ()  const
  35. {
  36.   return BaseTypeDescriptor () ?  BaseTypeDescriptor () -> Name () : 0;
  37. }
  38.  
  39. const TypeDescriptor * 
  40. TypeDescriptor::BaseTypeIsA (const TypeDescriptor * td) const
  41. {
  42.   switch (NonRefType ()) {
  43.   case AGGREGATE_TYPE:
  44.     return AggrElemTypeDescriptor () -> IsA (td);
  45.   case ENTITY_TYPE:
  46.   case SELECT_TYPE: 
  47.   default:
  48.     return IsA (td);
  49.   }
  50.  
  51. }
  52.  
  53. ///////////////////////////////////////////////////////////////////////////////
  54. // AttrDescriptor functions
  55. ///////////////////////////////////////////////////////////////////////////////
  56.  
  57. AttrDescriptor::AttrDescriptor(
  58.                const char * name,        // i.e. char *
  59.                const TypeDescriptor *domainType, 
  60.                LOGICAL optional,    // i.e. F U or T
  61.                LOGICAL unique,    // i.e. F U or T
  62.                LOGICAL derived,    // i.e. F U or T
  63.                const EntityDescriptor & owner )
  64. : _name (name), _domainType (domainType), _optional(optional), _unique(unique), _derived (derived), 
  65.  
  66. #ifdef __O3DB__
  67. _owner (&owner)
  68. #else
  69. _owner ((EntityDescriptor&)owner)
  70. #endif
  71.  
  72. {
  73. }
  74.  
  75. AttrDescriptor::~AttrDescriptor () { }
  76.