Ignore:
Timestamp:
May 17, 2015, 1:19:35 PM (9 years ago)
Author:
Peter A. Buhr <pabuhr@…>
Branches:
ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, ctor, deferred_resn, demangler, enum, forall-pointer-decay, gc_noraii, jacob/cs343-translation, jenkins-sandbox, master, memory, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, pthread-emulation, qualifiedEnum, resolv-new, string, with_gc
Children:
0dd3a2f
Parents:
b87a5ed
Message:

licencing: second groups of files

File:
1 edited

Legend:

Unmodified
Added
Removed
  • translator/InitTweak/Association.h

    rb87a5ed ra32b204  
    7070
    7171  virtual long int add_single( long int idx, Expression *newExpr) {
    72     if( expr == 0 ) //|| *expr == *newExpr )
     72    if ( expr == 0 ) //|| *expr == *newExpr )
    7373      expr = newExpr;
    7474    return 0;
     
    7676
    7777  virtual long int add_single( std::string str, Expression *newExpr) {
    78     if( expr == 0 ) //|| *expr == *newExpr )
     78    if ( expr == 0 ) //|| *expr == *newExpr )
    7979      expr = newExpr;
    8080    return 0;
     
    114114    long int ret;
    115115
    116     if( idx >= (long int)ordering.size() ) throw AssocException("extra (spurious) members");
     116    if ( idx >= (long int)ordering.size() ) throw AssocException("extra (spurious) members");
    117117
    118118    if ( ordering[ idx ] == "")
     
    127127
    128128  virtual long int add_single( std::string idx, Expression *expr) {
    129     if( idx == "" )
     129    if ( idx == "" )
    130130      std::cerr << "Checkpoint 1" << std::endl;
    131131    else {
     
    143143    if ( table.find( str ) != table.end() ) return;
    144144    ordering.push_back( str );
    145     if( str != "" ) {
     145    if ( str != "" ) {
    146146      std::pair<long int, Association *> p( ordering.size() - 1, 0 );
    147147      table.insert( std::pair< std::string, std::pair<long int, Association *> >(str, p) );
     
    151151
    152152  virtual void set_member( std::string str, Association *assoc ) {
    153     if( str == "" )
     153    if ( str == "" )
    154154      anonym.push_back( assoc );
    155155    else  if ( table.find( str ) == table.end() )
     
    162162
    163163  virtual Association *operator[]( int idx ) {
    164     if( ordering[idx] == "" ) {
     164    if ( ordering[idx] == "" ) {
    165165      std::cerr << "Error, anonymous members not implemented yet" << std::endl;
    166166      throw 0;
     
    187187  virtual void display( std::ostream &os ) {
    188188    os << "Point association: " << std::endl;
    189     for( map_type::iterator i = table.begin(); i != table.end(); i++ ) {
     189    for ( map_type::iterator i = table.begin(); i != table.end(); i++ ) {
    190190      os << "Member [" << i->first << ", index = " << i->second.first << "]";
    191191      if ( i->second.second != 0 )
     
    244244  diet::diet_tree<int> tree;
    245245  /*
    246   for( diet_tree<int>::iterator i = tree.begin(); i != tree.end(); i++ )
     246  for ( diet_tree<int>::iterator i = tree.begin(); i != tree.end(); i++ )
    247247    std::cout << "--(" << (*i).first << ", " << (*i).second << ")--" << std::endl;
    248248  diet_tree<int> tree;
Note: See TracChangeset for help on using the changeset viewer.