Sample Namespace Implementation: oaWinNS to oaNative
The following example shows the flow when converting a scalar name string
from the Windows name space (oaWinNS) to a
name string in the oaNative
namespace. This flow illustrates the implementation of the
getInternalMember function for
oaWinNS.
- Because the oaWinNS namespace uses keywords, first determine if the name
string is a keyword in oaWinNS.
- If the name string is a keyword in oaWinNS and it is escaped, the name is
valid and processing of this name string is complete.
- If the name string is a keyword in oaWinNS and it is not escaped,
oaWinNS throws an exception.
- If a name string is not a keyword, check each character in the name to
determine if it is a valid character in the oaNative namespace. Character
validation follows the flow shown in the figure below. Because bus characters
are not allowed in the Windows namespace, no bus character checking is
necessary. Case sensitivity is considered when validating the keywords as well
as when validating each character.
Return to Deriving Namespaces
Copyright © 2001-2010 Cadence Design Systems, Inc.
All rights reserved.