Inheritance diagram for NString:
Public Methods | |
NString (const char *in=NULL) | |
NString (const NString &str) | |
~NString () | |
operator const char * () const | |
NString & | operator= (const char *str) |
NString & | operator= (const NString &str) |
oa::oaUInt4 | length () const |
|
This constructor creates a new NString from a raw character array pointer. It allocates a new buffer, sets the reference count to one, and stores that pointer in it's internal pointer.
|
|
This copy constructor copies the pointer to the buffer of str to the internal pointer of this NString, then increments the buffer's reference count.
|
|
This is the destructor for the NString. It decrements the reference count for the buffer, and if it reaches zero, it frees the buffer memory. |
|
This function returns the length of the character string controlled by this NString. |
|
This operator returns a pointer to the internal character array. This pointer is not guarenteed to be valid for the long term; it can be deleted if the NString is destroyed, or if a destructive operation is made to the NString (e.g. an assignment operation). |
|
This is the copy constructor for the NString. It will release its internal buffer and free the memory if the buffer reference goes to zero. It wil then increment the reference count of the buffer in "str", and set the internal buffer pointer to that buffer. Note that the string is not copied in this process. This makes the copy construction operation of the NString very efficient.
|
|
This operator is used to assign a new string value into the NString. It will release its internal buffer and free the memory if the buffer reference goes to zero. It will then allocate a new buffer, set the reference count to one, and copy the string in "str" into this new buffer.
|
Copyright © 2002 - 2010 Cadence Design Systems, Inc.
All Rights Reserved.