| 1915 | //----------------------------------------------------------------------------- |
| 1916 | |
| 1917 | void SimObject::setClassNamespace( const char *classNamespace ) |
| 1918 | { |
| 1919 | StringTableEntry oldClassNamespace = mClassName; |
| 1920 | StringTableEntry newClassNamespace = StringTable->insert( classNamespace ); |
| 1921 | |
| 1922 | if( oldClassNamespace == newClassNamespace ) |
| 1923 | return; |
| 1924 | |
| 1925 | if( isProperlyAdded() ) |
| 1926 | unlinkNamespaces(); |
| 1927 | |
| 1928 | mClassName = newClassNamespace; |
| 1929 | |
| 1930 | if( isProperlyAdded() ) |
| 1931 | { |
| 1932 | linkNamespaces(); |
| 1933 | |
| 1934 | // Restore old namespace setup if linkage failed. |
| 1935 | |
| 1936 | if( mClassName != newClassNamespace ) |
| 1937 | { |
| 1938 | mClassName = oldClassNamespace; |
| 1939 | linkNamespaces(); |
| 1940 | } |
| 1941 | } |
| 1942 | } |
| 1943 | |
| 1944 | //----------------------------------------------------------------------------- |
| 1945 |
no test coverage detected