Package org.jatha.dynatype

Examples of org.jatha.dynatype.LispHashTable


  }

  // XXX sync unklar ? SessionObject-map koennte parallel veraendert werden?
  private void createCommonSymbols( AdvancedJatha lisp, PlugInContext context )
  {
    LispHashTable      lispHash;
    java.util.List      coll, coll2, collGroups, collGroups2, collGroups3, collGroups4;
    int            i, j;
    double          d1;
    String          val;
    Preferences        prefs;
    SessionObject      so;
 
    // --------------- create lisp symbols ---------------
    // GROUPS : list (list elements : hashtable)
    collGroups  = doc.getGroups().getAll();
    collGroups2  = new ArrayList( collGroups.size() );
    collGroups3  = new ArrayList( collGroups.size() );
    collGroups4  = new ArrayList( collGroups.size() );
    for( i = 0; i < collGroups.size(); i++ ) {
      so      = (SessionObject) collGroups.get( i );
      lispHash  = jatha.makeHashTable();
      sessionObjectToLispHash( so, lispHash );
      collGroups2.add( lispHash );
      collGroups3.add( new ArrayList() );
      collGroups4.add( new ArrayList() );
    }

    // RECEIVERS : list (list elements : hashtable)
    coll    = context.getReceivers();
    coll2    = new ArrayList( coll.size() );
    for( i = 0; i < coll.size(); i++ ) {
      so      = (SessionObject) coll.get( i );
      lispHash  = jatha.makeHashTable();
      sessionObjectToLispHash( so, lispHash );
      coll2.add( lispHash );
      for( j = 0; j < collGroups.size(); j++ ) {
        if( ((SessionGroup) collGroups.get( j )).getReceivers().contains( so )) {
          ((java.util.List) collGroups3.get( j )).add( lispHash );
        }
      }
    }
    cilloHash.setf_gethash( jatha.makeString( KEY_RECEIVERS ), jatha.makeList( coll2 ));

    // TRANSMITTERS : list (list elements : hashtable)
    coll    = context.getTransmitters();
    coll2    = new ArrayList( coll.size() );
    for( i = 0; i < coll.size(); i++ ) {
      so      = (SessionObject) coll.get( i );
      lispHash  = jatha.makeHashTable();
      sessionObjectToLispHash( so, lispHash );
      coll2.add( lispHash );
      for( j = 0; j < collGroups.size(); j++ ) {
        if( ((SessionGroup) collGroups.get( j )).getTransmitters().contains( so )) {
          ((java.util.List) collGroups4.get( j )).add( lispHash );
        }
      }
    }
    cilloHash.setf_gethash( jatha.makeString( KEY_TRANSMITTERS ), jatha.makeList( coll2 ));

    // complete GROUPS list
    for( i = 0; i < collGroups.size(); i++ ) {
      lispHash  = (LispHashTable) collGroups2.get( i );
      lispHash.setf_gethash( jatha.makeString( KEY_RECEIVERS ), jatha.makeList( (java.util.List) collGroups3.get( i )));
      lispHash.setf_gethash( jatha.makeString( KEY_TRANSMITTERS ), jatha.makeList( (java.util.List) collGroups4.get( i )));
    }
    cilloHash.setf_gethash( jatha.makeString( KEY_GROUPS ), jatha.makeList( collGroups2 ));

    // TIMELINE : hashtable
    lispHash  = jatha.makeHashTable();
    d1      = (double) context.getTimeSpan().getStart() / context.getSourceRate();
    lispHash.setf_gethash( jatha.makeString( "START" ), jatha.makeReal( d1 ));
    d1      = (double) context.getTimeSpan().getStop() / context.getSourceRate();
    lispHash.setf_gethash( jatha.makeString( "STOP" ), jatha.makeReal( d1 ));
    cilloHash.setf_gethash( jatha.makeString( KEY_TIMELINE ), lispHash );

    // PREFERENCES : hashtable
    prefs    = AbstractApplication.getApplication().getUserPrefs().node( PrefsUtil.NODE_PLUGINS );
    prefsHash.setf_gethash( jatha.makeString( "DISKBUFSIZE" ), jatha.makeInteger( DISKBUFSIZE ));
View Full Code Here

TOP

Related Classes of org.jatha.dynatype.LispHashTable

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.