# Cinder

# cinder::cocoa::SafeNsString Class Reference

Represents an exception-safe Cocoa NSString which behaves like a shared_ptr but can implicitly cast itself to NSString*. More...

`#include <CinderCocoa.h>`

List of all members.

## Public Member Functions
| SafeNsString ()
| SafeNsString (const NSString *str)
| Creates a SafeNsString using an existing NSString. This constructor automatically increments the retain count.
| SafeNsString (const std::string &str)
| Creates a SafeNsString by converting a std::string.
| operator NSString *const ()
| operator std::string () const

## Detailed Description

Represents an exception-safe Cocoa NSString which behaves like a shared_ptr but can implicitly cast itself to NSString*.

## Constructor & Destructor Documentation

cinder::cocoa::SafeNsString::SafeNsString | ( |  | ) |

cinder::cocoa::SafeNsString::SafeNsString | ( | const NSString * | str | ) |

Creates a SafeNsString using an existing NSString. This constructor automatically increments the retain count.

cinder::cocoa::SafeNsString::SafeNsString | ( | const std::string & | str | ) |

Creates a SafeNsString by converting a std::string.

## Member Function Documentation

cinder::cocoa::SafeNsString::operator NSString *const | ( |  | ) |

cinder::cocoa::SafeNsString::operator std::string | ( |  | ) | const

The documentation for this class was generated from the following files:

- include/cinder/cocoa/CinderCocoa.h
- src/cinder/cocoa/CinderCocoa.mm