Open-Transactions  0.93.0-ge03d287
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
opentxs::OTStringXML Class Reference

#include <OTStringXML.hpp>

Inheritance diagram for opentxs::OTStringXML:
Collaboration diagram for opentxs::OTStringXML:

Classes

class  OTStringXMLPvt
 

Public Member Functions

EXPORT OTStringXML ()
 
EXPORT OTStringXML (const OTString &value)
 
EXPORT OTStringXML (const OTStringXML &value)
 
virtual EXPORT ~OTStringXML ()
 
EXPORT operator irr::io::IFileReadCallBack * ()
 
EXPORT OTStringXMLoperator= (const OTString &rhs)
 
EXPORT OTStringXMLoperator= (const OTStringXML &rhs)
 
int32_t read (void *buffer, uint32_t sizeToRead)
 
int32_t getSize ()
 
- Public Member Functions inherited from opentxs::OTString
EXPORT OTString ()
 
EXPORT OTString (const OTString &value)
 
EXPORT OTString (const OTASCIIArmor &value)
 
 OTString (const OTSignature &value)
 
EXPORT OTString (const OTContract &value)
 
EXPORT OTString (const OTIdentifier &value)
 
 OTString (OTPseudonym &value)
 
EXPORT OTString (const char *value)
 
 OTString (const char *value, size_t size)
 
EXPORT OTString (const std::string &value)
 
virtual EXPORT ~OTString ()
 
virtual EXPORT void Release ()
 
void Initialize ()
 
EXPORT OTStringoperator= (OTString rhs)
 
void swap (OTString &rhs)
 
bool operator> (const OTString &rhs) const
 
bool operator< (const OTString &rhs) const
 
bool operator<= (const OTString &rhs) const
 
bool operator>= (const OTString &rhs) const
 
EXPORT bool operator== (const OTString &rhs) const
 
EXPORT int64_t ToLong () const
 
EXPORT uint64_t ToUlong () const
 
EXPORT bool At (uint32_t index, char &c) const
 
EXPORT bool Exists () const
 
EXPORT bool DecodeIfArmored (bool escapedIsAllowed=true)
 
EXPORT uint32_t GetLength () const
 
EXPORT bool Compare (const char *compare) const
 
EXPORT bool Compare (const OTString &compare) const
 
EXPORT bool Contains (const char *compare) const
 
bool Contains (const OTString &compare) const
 
EXPORT const char * Get () const
 
EXPORT void Set (const char *data, uint32_t enforcedMaxLength=0)
 
EXPORT void Set (const OTString &data)
 
EXPORT bool MemSet (const char *mem, uint32_t size)
 
EXPORT void Concatenate (const char *arg,...)
 
void Concatenate (const OTString &data)
 
void Truncate (uint32_t index)
 
EXPORT void Format (const char *fmt,...)
 
void ConvertToLowerCase () const
 
void ConvertToUpperCase () const
 
EXPORT bool TokenizeIntoKeyValuePairs (Map &map) const
 
EXPORT void OTfgets (std::istream &ofs)
 
bool sgets (char *buffer, uint32_t size)
 
char sgetc ()
 
void sungetc ()
 
void reset ()
 
void WriteToFile (std::ostream &ofs) const
 
void Release_String ()
 
EXPORT void zeroMemory () const
 

Additional Inherited Members

- Public Types inherited from opentxs::OTString
typedef std::list< std::string > List
 
typedef std::map< std::string,
std::string > 
Map
 
- Static Public Member Functions inherited from opentxs::OTString
static bool vformat (const char *fmt, std::va_list *pvl, std::string &s)
 
static EXPORT std::string & trim (std::string &str)
 
static EXPORT std::string replace_chars (const std::string &str, const std::string &charsFrom, const char &charTo)
 
static EXPORT bool safe_strcpy (char *dest, const char *src, size_t destSize, bool zeroSource=false)
 
static size_t safe_strlen (const char *s, size_t max)
 
static EXPORT int64_t StringToLong (const std::string &number)
 
static EXPORT uint64_t StringToUlong (const std::string &number)
 
- Protected Attributes inherited from opentxs::OTString
uint32_t length_
 
uint32_t position_
 
char * data_
 

Detailed Description

Definition at line 149 of file OTStringXML.hpp.

Constructor & Destructor Documentation

opentxs::OTStringXML::OTStringXML ( )

Definition at line 164 of file OTStringXML.cpp.

165  : OTString()
166  , pvt_(new OTStringXMLPvt(this))
167 {
168 }
EXPORT OTString()
Definition: OTString.cpp:786
opentxs::OTStringXML::OTStringXML ( const OTString value)

Definition at line 170 of file OTStringXML.cpp.

171  : OTString(value)
172  , pvt_(new OTStringXMLPvt(this))
173 {
174 }
EXPORT OTString()
Definition: OTString.cpp:786
opentxs::OTStringXML::OTStringXML ( const OTStringXML value)

Definition at line 176 of file OTStringXML.cpp.

177  : OTString(value)
178  , pvt_(new OTStringXMLPvt(this))
179 {
180 }
EXPORT OTString()
Definition: OTString.cpp:786
opentxs::OTStringXML::~OTStringXML ( )
virtual

Definition at line 198 of file OTStringXML.cpp.

199 {
200  delete pvt_;
201 }

Member Function Documentation

int32_t opentxs::OTStringXML::getSize ( )

Definition at line 226 of file OTStringXML.cpp.

227 {
228  return GetLength();
229 }
EXPORT uint32_t GetLength() const
Definition: OTString.cpp:1040
opentxs::OTStringXML::operator irr::io::IFileReadCallBack * ( )

Definition at line 203 of file OTStringXML.cpp.

204 {
205  return pvt_;
206 }
OTStringXML & opentxs::OTStringXML::operator= ( const OTString rhs)

Definition at line 182 of file OTStringXML.cpp.

183 {
184  if ((&rhs) != (&(dynamic_cast<const OTString&>(*this)))) {
185  OTString::operator=(rhs);
186  }
187  return *this;
188 }
EXPORT OTString & operator=(OTString rhs)
Definition: OTString.cpp:1011
OTStringXML & opentxs::OTStringXML::operator= ( const OTStringXML rhs)

Definition at line 190 of file OTStringXML.cpp.

191 {
192  if ((&rhs) != this) {
193  OTString::operator=(dynamic_cast<const OTString&>(rhs));
194  }
195  return *this;
196 }
EXPORT OTString & operator=(OTString rhs)
Definition: OTString.cpp:1011
int32_t opentxs::OTStringXML::read ( void *  buffer,
uint32_t  sizeToRead 
)

Definition at line 208 of file OTStringXML.cpp.

209 {
210  if (buffer && sizeToRead && Exists()) {
211  char* pBuf = (char*)buffer;
212 
213  int32_t nBytesToCopy =
214  (sizeToRead > GetLength() ? GetLength() : sizeToRead);
215  int32_t i;
216  for (i = 0; i < nBytesToCopy; i++) {
217  pBuf[i] = sgetc();
218  }
219  return i;
220  }
221  else {
222  return 0;
223  }
224 }
EXPORT uint32_t GetLength() const
Definition: OTString.cpp:1040
EXPORT bool Exists() const
Definition: OTString.cpp:1035

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