The DejaVU Framework -- hush 3.0
[.] Papers Tutorials Examples Manuals Interfaces Sources Packages Resources ?

include: attribute.h hush-3.1/grammar/grammar


[.] - [up] [top] - index make include slides talks
  ifndef ATTRIBUTE_H
  define ATTRIBUTE_H
  
  

attribute


  class attribute {
  char _key[128];
  char _value[128];
  char _buf[256];
  public:
  attribute(char* x) {
          //cerr << "ATTR: " << x << endl;
          _key[0]='\0';
          _value[0]='\0';
          strcpy(_buf,x);
          //while( *_buf == ' ') _buf++;
          char* p = _buf;
          while ( *p != '=' ) p++;
  	*p = '\0';
          if ( *(p+1) == '"' ) p++;
          strcpy(_key,_buf);
          strcpy(_value,p+1);
          int n = strlen( _value ) - 1;
          if (_value[n]=='"') _value[n]='\0';
          //cerr << "KEY: " << _key << " VALUE: " << _value << endl;;
          }
  
  char* key() { return _key; }
  char* value() { return _value; }
  
  int matches(char* s) {
          return !strcmp(key(),s);
          }
  
  };

slide: attribute

  
  endif
  

[.] Papers Tutorials Examples Manuals Interfaces Sources Packages Resources ?
Hush Online Technology
hush@cs.vu.nl
11/03/98