Facet class to specify parsing of a C[++] variable name.  
 More...
#include <JCppFacet.hh>
 | 
| static std::locale::id  | id | 
|   | 
 | 
| virtual istreambuf_iterator  | do_get (const istreambuf_iterator __begin, const istreambuf_iterator __end, const std::ios_base &format, std::ios_base::iostate &result, std::string &buffer) const | 
|   | Get string.  More...
  | 
|   | 
| virtual ostreambuf_iterator  | do_put (ostreambuf_iterator out, const std::ios_base &format, const char c, const std::string &buffer) const | 
|   | Put string.  More...
  | 
|   | 
| virtual istreambuf_iterator  | do_ignore (const istreambuf_iterator __begin, const istreambuf_iterator __end) const | 
|   | Ignore white space and end of line characters.  More...
  | 
|   | 
| virtual istreambuf_iterator  | do_ignore_single_line_comment (const istreambuf_iterator __begin, const istreambuf_iterator __end) const | 
|   | Ignore characters until end of line.  More...
  | 
|   | 
| virtual istreambuf_iterator  | do_ignore_multi_line_comment (const istreambuf_iterator __begin, const istreambuf_iterator __end) const | 
|   | Ignore characters until next end of comment.  More...
  | 
|   | 
| virtual istreambuf_iterator  | do_getline (const istreambuf_iterator __begin, const istreambuf_iterator __end, std::ios_base::iostate &result, std::string &buffer) const | 
|   | Read string.  More...
  | 
|   | 
Facet class to specify parsing of a C[++] variable name. 
Definition at line 27 of file JCppFacet.hh.
 
◆ istreambuf_iterator
◆ ostreambuf_iterator
◆ JCppFacet() [1/2]
  
  
      
        
          | JLANG::JCppFacet::JCppFacet  | 
          ( | 
           | ) | 
           | 
         
       
   | 
  
inline   | 
  
 
 
◆ JCppFacet() [2/2]
  
  
      
        
          | JLANG::JCppFacet::JCppFacet  | 
          ( | 
          const JCppFacet &  | 
           | ) | 
           | 
         
       
   | 
  
private   | 
  
 
 
◆ clone()
  
  
      
        
          | virtual JCppFacet* JLANG::JCppFacet::clone  | 
          ( | 
           | ) | 
           const | 
         
       
   | 
  
inlinevirtual   | 
  
 
 
◆ is_eol()
  
  
      
        
          | static bool JLANG::JCppFacet::is_eol  | 
          ( | 
          const char  | 
          c | ) | 
           | 
         
       
   | 
  
inlinestatic   | 
  
 
 
◆ is_begin_single_line_comment()
  
  
      
        
          | static bool JLANG::JCppFacet::is_begin_single_line_comment  | 
          ( | 
          const char  | 
          c1,  | 
         
        
           | 
           | 
          const char  | 
          c2  | 
         
        
           | 
          ) | 
           |  | 
         
       
   | 
  
inlinestatic   | 
  
 
Definition at line 51 of file JCppFacet.hh.
   51 { 
return c1 == 
'/' && c2 == 
'/'; }
 
 
 
 
◆ is_begin_multi_line_comment()
  
  
      
        
          | static bool JLANG::JCppFacet::is_begin_multi_line_comment  | 
          ( | 
          const char  | 
          c1,  | 
         
        
           | 
           | 
          const char  | 
          c2  | 
         
        
           | 
          ) | 
           |  | 
         
       
   | 
  
inlinestatic   | 
  
 
Definition at line 52 of file JCppFacet.hh.
   52 { 
return c1 == 
'/' && c2 == 
'*'; }
 
 
 
 
◆ is_end_single_line_comment()
  
  
      
        
          | static bool JLANG::JCppFacet::is_end_single_line_comment  | 
          ( | 
          const char  | 
          c1 | ) | 
           | 
         
       
   | 
  
inlinestatic   | 
  
 
 
◆ is_end_multi_line_comment()
  
  
      
        
          | static bool JLANG::JCppFacet::is_end_multi_line_comment  | 
          ( | 
          const char  | 
          c1,  | 
         
        
           | 
           | 
          const char  | 
          c2  | 
         
        
           | 
          ) | 
           |  | 
         
       
   | 
  
inlinestatic   | 
  
 
Definition at line 55 of file JCppFacet.hh.
   55 { 
return c1 == 
'*' && c2 == 
'/'; }
 
 
 
 
◆ get()
Get string. 
- Parameters
 - 
  
    | __begin | begin position of input stream  | 
    | __end | end position of input stream  | 
    | format | format  | 
    | result | status after input operation  | 
    | buffer | output string  | 
  
   
- Returns
 - position of input stream 
 
Definition at line 68 of file JCppFacet.hh.
 
 
◆ put()
Put string. 
- Parameters
 - 
  
    | out | begin position of output stream  | 
    | format | format  | 
    | c | fill character  | 
    | buffer | input string  | 
  
   
- Returns
 - position of output stream buffer 
 
Definition at line 87 of file JCppFacet.hh.
   92       return do_put(out, format, c, buffer);
 
 
 
 
◆ do_get()
Get string. 
- Parameters
 - 
  
    | __begin | begin position of input stream  | 
    | __end | end position of input stream  | 
    | format | format  | 
    | result | status after input operation  | 
    | buffer | output string  | 
  
   
- Returns
 - position of input stream 
 
Reimplemented from JLANG::JStringFacet.
Definition at line 107 of file JCppFacet.hh.
  115       result = (ios_base::iostate) 0;  
 
  117       streamsize 
n = format.width();   
 
  120         n = numeric_limits<streamsize>::max();
 
  125       if (i == __end || (i = 
do_ignore(i, __end)) == __end) {
 
  127         result |= ios_base::failbit;    
 
  128         result |= ios_base::eofbit;
 
  134         for (++i; i != __end; c = *i, ++i) {
 
  142           else if (c == 
'_' || isalpha(c))                  
 
  150           result |= ios_base::failbit;  
 
  151           result |= ios_base::eofbit;
 
  158           for (--
n; i != __end && 
n != 0 && (*i == 
'_' ||
 
  161             buffer.push_back(*i);
 
  165             result |= ios_base::eofbit;
 
 
 
 
◆ do_put()
Put string. 
- Parameters
 - 
  
    | out | begin position of output stream  | 
    | format | format  | 
    | c | fill character  | 
    | buffer | input string  | 
  
   
- Returns
 - current position of output stream 
 
Reimplemented from JLANG::JStringFacet.
Definition at line 183 of file JCppFacet.hh.
  190       if (format.flags() & ios_base::right) {
 
  191         for (streamsize i = buffer.size(); i < format.width(); ++i, ++out) {
 
  196       for (string::const_iterator i = buffer.begin(); i != buffer.end(); ++i, ++out) {
 
  200       if (format.flags() & ios_base::left) {
 
  201         for (streamsize i = buffer.size(); i < format.width(); ++i, ++out) {
 
 
 
 
◆ do_ignore()
Ignore white space and end of line characters. 
- Parameters
 - 
  
    | __begin | begin position of input stream  | 
    | __end | end position of input stream  | 
  
   
- Returns
 - position of input stream 
 
Reimplemented from JLANG::JStringFacet.
Definition at line 217 of file JCppFacet.hh.
  222       while (i != __end && (isspace(*i) || 
is_eol(*i))) {
 
 
 
 
◆ do_ignore_single_line_comment()
Ignore characters until end of line. 
- Parameters
 - 
  
    | __begin | begin position of input stream  | 
    | __end | end position of input stream  | 
  
   
- Returns
 - position of input stream 
 
Definition at line 237 of file JCppFacet.hh.
 
 
◆ do_ignore_multi_line_comment()
Ignore characters until next end of comment. 
- Parameters
 - 
  
    | __begin | begin position of input stream  | 
    | __end | end position of input stream  | 
  
   
- Returns
 - position of input stream 
 
Definition at line 259 of file JCppFacet.hh.
 
 
◆ operator=()
  
  
      
        
          | void JLANG::JCppFacet::operator=  | 
          ( | 
          const JCppFacet &  | 
           | ) | 
           | 
         
       
   | 
  
private   | 
  
 
 
◆ ignore()
  
  
      
        
          | std::istream& JLANG::JStringFacet::ignore  | 
          ( | 
          std::istream &  | 
          in | ) | 
           const | 
         
       
   | 
  
inlineinherited   | 
  
 
Ignore characters until next end of line. 
- Parameters
 - 
  
  
 
- Returns
 - input stream 
 
Definition at line 104 of file JStringFacet.hh.
  107         in.setstate(std::ios_base::eofbit);
 
 
 
 
◆ getline()
  
  
      
        
          | std::istream& JLANG::JStringFacet::getline  | 
          ( | 
          std::istream &  | 
          in,  | 
         
        
           | 
           | 
          std::string &  | 
          buffer  | 
         
        
           | 
          ) | 
           |  const | 
         
       
   | 
  
inlineinherited   | 
  
 
Read characters until next end of line. 
- Parameters
 - 
  
    | in | input stream  | 
    | buffer | output string  | 
  
   
- Returns
 - input stream 
 
Definition at line 121 of file JStringFacet.hh.
  126       ios_base::iostate state = in.rdstate();
 
  129         in.setstate(std::ios_base::eofbit);
 
  132       if (state != ios_base::goodbit && state != ios_base::eofbit) {
 
 
 
 
◆ getIndex()
  
  
      
        
          | static int JLANG::JStringFacet::getIndex  | 
          ( | 
           | ) | 
           | 
         
       
   | 
  
inlinestaticinherited   | 
  
 
Get index for stream associated facet data. 
- Returns
 - index 
 
Definition at line 145 of file JStringFacet.hh.
  147       static int i = std::ios_base::xalloc();
 
 
 
 
◆ do_getline()
  
  | 
      
   | 
  
inlineprotectedvirtualinherited   | 
  
 
Read string. 
- Parameters
 - 
  
    | __begin | begin position of input stream  | 
    | __end | end position of input stream  | 
    | result | status after input operation  | 
    | buffer | output string  | 
  
   
- Returns
 - position of input stream 
 
Reimplemented in JLANG::JEquationFacet.
Definition at line 275 of file JStringFacet.hh.
  286         result |= ios_base::failbit;    
 
  287         result |= ios_base::eofbit;
 
  293         for ( ; i != __end && *i != 
'\n'; ++i) {
 
  294           buffer.push_back(*i);
 
 
 
 
◆ id
  
  
      
        
          | std::locale::id JLANG::JStringFacet::id | 
         
       
   | 
  
staticinherited   | 
  
 
 
The documentation for this class was generated from the following file:
 
virtual istreambuf_iterator do_get(const istreambuf_iterator __begin, const istreambuf_iterator __end, const std::ios_base &format, std::ios_base::iostate &result, std::string &buffer) const
Get string.