@@ -206,14 +206,10 @@ TypeDescriptor::TypeDescriptor
206206 const char * d )
207207 : _name( nm ), altNames( 0 ), _fundamentalType( ft ),
208208 _originatingSchema ( origSchema ), _referentType( 0 ), _description( d ),
209- _where_rules( 0 )
210-
211- {
209+ _where_rules( 0 ) {
212210}
213211
214- const char *
215- TypeDescriptor::Name ( const char * schnm ) const
216- /*
212+ /* *
217213 * Determines the current name of this. Normally, this is simply _name.
218214 * If "schnm" is set to a value, however, then this function becomes a
219215 * request for our name when referenced by schnm. (This will be diff from
@@ -223,7 +219,7 @@ TypeDescriptor::Name( const char * schnm ) const
223219 * and returns the new name if found. (See header comments to function
224220 * SchRename::rename().)
225221 */
226- {
222+ const char * TypeDescriptor::Name ( const char * schnm ) const {
227223 if ( schnm == NULL ) {
228224 return _name;
229225 }
@@ -235,13 +231,11 @@ TypeDescriptor::Name( const char * schnm ) const
235231 return _name;
236232}
237233
238- const char *
239- TypeDescriptor::BaseTypeName () const {
234+ const char * TypeDescriptor::BaseTypeName () const {
240235 return BaseTypeDescriptor () ? BaseTypeDescriptor () -> Name () : 0 ;
241236}
242237
243- const TypeDescriptor *
244- TypeDescriptor::BaseTypeIsA ( const TypeDescriptor * td ) const {
238+ const TypeDescriptor * TypeDescriptor::BaseTypeIsA ( const TypeDescriptor * td ) const {
245239 switch ( NonRefType () ) {
246240 case AGGREGATE_TYPE:
247241 return AggrElemTypeDescriptor () -> IsA ( td );
@@ -250,20 +244,17 @@ TypeDescriptor::BaseTypeIsA( const TypeDescriptor * td ) const {
250244 default :
251245 return IsA ( td );
252246 }
253-
254247}
255248
256- int
257- TypeDescriptor::CurrName ( const char * other, const char * schNm ) const
258- /*
249+ /* *
259250 * Check if our "current" name = other. CurrName may be different from
260251 * _name if schNm tells us the current schema is a different one from the
261252 * one in which we're defined. If so, we may have an alternate name for
262253 * that schema (it may be listed in our altNames list). This would be the
263254 * case if schNm USEs or REFERENCEs type and renames it in the process
264255 * (e.g., "USE (X as Y)".
265256 */
266- {
257+ int TypeDescriptor::CurrName ( const char * other, const char * schNm ) const {
267258 if ( !schNm || *schNm == ' \0 ' ) {
268259 // If there's no current schema, accept any possible name of this.
269260 // (I.e., accept its actual name or any substitute):
@@ -280,35 +271,29 @@ TypeDescriptor::CurrName( const char * other, const char * schNm ) const
280271 }
281272}
282273
283- int
284- TypeDescriptor::PossName ( const char * nm ) const
285- /*
274+ /* *
286275 * return TRUE if nm is either our name or one of the possible alternates.
287276 */
288- {
277+ int TypeDescriptor::PossName ( const char * nm ) const {
289278 return ( OurName ( nm ) || AltName ( nm ) );
290279}
291280
292- int
293- TypeDescriptor::OurName ( const char * nm ) const {
281+ int TypeDescriptor::OurName ( const char * nm ) const {
294282 return !StrCmpIns ( nm, _name );
295283}
296284
297- int
298- TypeDescriptor::AltName ( const char * nm ) const {
285+ int TypeDescriptor::AltName ( const char * nm ) const {
299286 if ( altNames ) {
300287 return ( altNames->choice ( nm ) );
301288 }
302289 return 0 ;
303290}
304291
305- void
306- TypeDescriptor::addAltName ( const char * schnm, const char * newnm )
307- /*
292+ /* *
308293 * Creates a SchRename consisting of schnm & newnm. Places it in alphabe-
309294 * tical order in this's altNames list.
310295 */
311- {
296+ void TypeDescriptor::addAltName ( const char * schnm, const char * newnm ) {
312297 SchRename * newpair = new SchRename ( schnm, newnm ),
313298 *node = ( SchRename * )altNames, *prev = NULL ;
314299
@@ -327,13 +312,11 @@ TypeDescriptor::addAltName( const char * schnm, const char * newnm )
327312 }
328313}
329314
330- int
331- SchRename::choice ( const char * nm ) const
332- /*
315+ /* *
333316 * See if nm = one of our choices (either ours or that of a SchRename
334317 * later in the list.
335318 */
336- {
319+ int SchRename::choice ( const char * nm ) const {
337320 if ( !StrCmpIns ( nm, newName ) ) {
338321 return 1 ;
339322 }
@@ -343,16 +326,14 @@ SchRename::choice( const char * nm ) const
343326 return 0 ;
344327}
345328
346- char *
347- SchRename::rename ( const char * schnm, char * newnm ) const
348- /*
329+ /* *
349330 * Check if this SchRename represents the rename of its owning TypeDesc for
350331 * schema schnm. (This will be the case if schnm = schName.) If so, the
351332 * new name is returned and copied into newnm. If not, ::rename is called
352333 * on next. Thus, this function will tell us if this or any later SchRe-
353334 * name in this list provide a new name for TypeDesc for schema schnm.
354335 */
355- {
336+ char * SchRename::rename ( const char * schnm, char * newnm ) const {
356337 if ( !StrCmpIns ( schnm, schName ) ) {
357338 strcpy ( newnm, newName );
358339 return newnm;
@@ -405,37 +386,9 @@ Logical AttrDescriptor::Deriving() const {
405386 return LFalse;
406387}
407388
408- /*
409- // outdated function
410- void
411- AttrDescriptor::Derived( SCLP23( LOGICAL ) x ) {
412- if( x.asInt() ) {
413- _attrType = AttrType_Deriving;
414- } else {
415- _attrType = AttrType_Explicit;
416- }
417- }
418-
419- // outdated function
420- void
421- AttrDescriptor::Derived( Logical x ) {
422- if( x == LTrue ) {
423- _attrType = AttrType_Deriving;
424- } else {
425- _attrType = AttrType_Explicit;
426- }
427- }
428-
429- // outdated function
430- void
431- AttrDescriptor::Derived( const char * x ) {
432- if( !strcmp( x, "LTrue" ) || !strcmp( x, "T" ) ) {
433- _attrType = AttrType_Deriving;
434- } else {
435- _attrType = AttrType_Explicit;
436- }
437- }
438- */
389+ // /////////////////////////////////////////////////////////////////////////////
390+ // Derived_attribute functions
391+ // /////////////////////////////////////////////////////////////////////////////
439392
440393Derived_attribute::Derived_attribute ( const char * name, const TypeDescriptor * domainType,
441394 Logical optional, Logical unique, AttrType_Enum at, const EntityDescriptor & owner )
0 commit comments