-
Notifications
You must be signed in to change notification settings - Fork 131
Expand file tree
/
Copy pathschRename.cc
More file actions
34 lines (31 loc) · 975 Bytes
/
schRename.cc
File metadata and controls
34 lines (31 loc) · 975 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#include "clstepcore/schRename.h"
/**
* See if nm = one of our choices (either ours or that of a SchRename
* later in the list.
*/
bool SchRename::choice( const char * nm ) const {
if( !StrCmpIns( nm, newName ) ) {
return true;
}
if( next ) {
return ( next->choice( nm ) );
}
return false;
}
/**
* Check if this SchRename represents the rename of its owning TypeDesc for
* schema schnm. (This will be the case if schnm = schName.) If so, the
* new name is returned and copied into newnm. If not, ::rename is called
* on next. Thus, this function will tell us if this or any later SchRe-
* name in this list provide a new name for TypeDesc for schema schnm.
*/
char * SchRename::rename( const char * schnm, char * newnm ) const {
if( !StrCmpIns( schnm, schName ) ) {
strcpy( newnm, newName );
return newnm;
}
if( next ) {
return ( next->rename( schnm, newnm ) );
}
return NULL;
}