Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

JString Class Reference

A minimalistic string class we use instead of similar classes from the STL or the GNU libraries for better portability and greatly reduced code size. (only implements the functionality we actually need, doesn't balloon the entire VMD binary as some past string class implementations did). Implements regular expression matching methods used by VMD. More...

#include <JString.h>

List of all members.

Public Methods

 JString ()
 JString (const char *str)
 JString (const JString &s)
 ~JString ()
int operator== (const char *s)
int operator!= (const char *s)
int operator< (const char *s)
int operator> (const char *s)
int operator<= (const char *s)
int operator>= (const char *s)
JString & operator= (const char *)
JString & operator= (const JString &)
JString & operator= (const char)
JString & operator+= (const char *)
JString & operator+= (const JString &)
JString & operator+= (const char)
JString operator+ (const JString &) const
int length () const
 operator const char * () const
void upcase ()
void to_camel ()
int gsub (const char *pat, const char *repl)
void chop (int n)

Friends

int compare (const JString &s1, const JString &s2)
JString operator+ (const char *, const JString &)


Detailed Description

A minimalistic string class we use instead of similar classes from the STL or the GNU libraries for better portability and greatly reduced code size. (only implements the functionality we actually need, doesn't balloon the entire VMD binary as some past string class implementations did). Implements regular expression matching methods used by VMD.

Definition at line 35 of file JString.h.


Constructor & Destructor Documentation

JString::JString   [inline]
 

Definition at line 42 of file JString.h.

JString::JString const char *    str [inline]
 

Definition at line 45 of file JString.h.

JString::JString const JString &    s [inline]
 

Definition at line 53 of file JString.h.

References rep.

JString::~JString   [inline]
 

Definition at line 58 of file JString.h.


Member Function Documentation

void JString::chop int    n
 

Definition at line 158 of file JString.C.

References length, and n.

int JString::gsub const char *    pat,
const char *    repl
 

Definition at line 134 of file JString.C.

References length, and NULL.

Referenced by GeometryMol::atom_formatted_name, and FileRenderList::render.

int JString::length   const [inline]
 

Definition at line 81 of file JString.h.

Referenced by chop, gsub, operator+, operator+, operator+=, operator=, and VMDApp::vmd_choose_file.

JString::operator const char *   const [inline]
 

Definition at line 83 of file JString.h.

int JString::operator!= const char *    s [inline]
 

Definition at line 61 of file JString.h.

JString JString::operator+ const JString &    const
 

Definition at line 101 of file JString.C.

References do_free, length, and rep.

JString & JString::operator+= const    char
 

Definition at line 81 of file JString.C.

References length.

JString & JString::operator+= const JString &   
 

Definition at line 31 of file JString.C.

References length, and rep.

JString & JString::operator+= const char *   
 

Definition at line 70 of file JString.C.

References length, and NULL.

int JString::operator< const char *    s [inline]
 

Definition at line 62 of file JString.h.

int JString::operator<= const char *    s [inline]
 

Definition at line 64 of file JString.h.

JString & JString::operator= const    char
 

Definition at line 61 of file JString.C.

JString & JString::operator= const JString &   
 

Definition at line 42 of file JString.C.

References length, and rep.

JString & JString::operator= const char *   
 

Definition at line 52 of file JString.C.

References NULL.

int JString::operator== const char *    s [inline]
 

Definition at line 60 of file JString.h.

int JString::operator> const char *    s [inline]
 

Definition at line 63 of file JString.h.

int JString::operator>= const char *    s [inline]
 

Definition at line 65 of file JString.h.

void JString::to_camel  
 

Definition at line 118 of file JString.C.

Referenced by GeometryMol::atom_formatted_name.

void JString::upcase  
 

Definition at line 110 of file JString.C.


Friends And Related Function Documentation

int compare const JString &    s1,
const JString &    s2
[friend]
 

Definition at line 74 of file JString.h.

JString operator+ const char *   ,
const JString &   
[friend]
 

Definition at line 92 of file JString.C.


The documentation for this class was generated from the following files:
Generated on Thu Apr 25 02:45:10 2024 for VMD (current) by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002