Examples of ActorCodeGenerator


Examples of ptolemy.codegen.kernel.ActorCodeGenerator

    /** Add include directories specified by the actors in this model.
     *  @exception IllegalActionException If thrown when getting an actor's
     *   include directories.
     */
    protected void _addActorIncludeDirectories() throws IllegalActionException {
        ActorCodeGenerator helper = _getHelper(getContainer());

        Set actorIncludeDirectories = helper.getIncludeDirectories();
        Iterator includeIterator = actorIncludeDirectories.iterator();
        while (includeIterator.hasNext()) {
            addInclude("-I\"" + ((String) includeIterator.next()) + "\"");
        }
    }
View Full Code Here

Examples of ptolemy.codegen.kernel.ActorCodeGenerator

    /** Add libraries specified by the actors in this model.
     *  @exception IllegalActionException If thrown when getting an actor's
     *   libraries.
     */
    protected void _addActorLibraries() throws IllegalActionException {
        ActorCodeGenerator helper = _getHelper(getContainer());

        Set actorLibraryDirectories = helper.getLibraryDirectories();
        Iterator libraryDirectoryIterator = actorLibraryDirectories.iterator();
        while (libraryDirectoryIterator.hasNext()) {
            addLibrary("-L\"" + ((String) libraryDirectoryIterator.next())
                    + "\"");
        }

        Set actorLibraries = helper.getLibraries();
        Iterator librariesIterator = actorLibraries.iterator();
        while (librariesIterator.hasNext()) {
            addLibrary("-l\"" + ((String) librariesIterator.next()) + "\"");
        }
    }
View Full Code Here

Examples of ptolemy.codegen.kernel.ActorCodeGenerator

     *   cannot be found.
     */
    protected String _generateIncludeFiles() throws IllegalActionException {
        StringBuffer code = new StringBuffer();

        ActorCodeGenerator compositeActorHelper = _getHelper(getContainer());
        Set includingFiles = compositeActorHelper.getHeaderFiles();

        includingFiles.add("<stdlib.h>"); // Sun requires stdlib.h for malloc

        if (isTopLevel()
                && ((BooleanToken) measureTime.getToken()).booleanValue()) {
View Full Code Here

Examples of ptolemy.codegen.kernel.ActorCodeGenerator

//            }
//        }
               
        // The code generated in generateModeTransitionCode() is executed
        // after one global iteration, e.g., in HDF model.
        ActorCodeGenerator modelHelper = (ActorCodeGenerator) _getHelper(_director
                .getContainer());
        modelHelper.generateModeTransitionCode(code);

        /*if (callPostfire) {
            code.append(_INDENT2 + "if (!postfire()) {" + _eol + _INDENT3
                    + "break;" + _eol + _INDENT2 + "}" + _eol);
        }
View Full Code Here

Examples of ptolemy.codegen.kernel.ActorCodeGenerator

    /** Add include directories specified by the actors in this model.
     *  @exception IllegalActionException If thrown when getting an actor's
     *   include directories.
     */
    protected void _addActorIncludeDirectories() throws IllegalActionException {
        ActorCodeGenerator helper = _getHelper(getContainer());

        Set actorIncludeDirectories = helper.getIncludeDirectories();
        Iterator includeIterator = actorIncludeDirectories.iterator();
        while (includeIterator.hasNext()) {
            addInclude("-I\"" + ((String) includeIterator.next()) + "\"");
        }
    }
View Full Code Here

Examples of ptolemy.codegen.kernel.ActorCodeGenerator

    /** Add libraries specified by the actors in this model.
     *  @exception IllegalActionException If thrown when getting an actor's
     *   libraries.
     */
    protected void _addActorLibraries() throws IllegalActionException {
        ActorCodeGenerator helper = _getHelper(getContainer());

        Set actorLibraryDirectories = helper.getLibraryDirectories();
        Iterator libraryDirectoryIterator = actorLibraryDirectories.iterator();
        while (libraryDirectoryIterator.hasNext()) {
            addLibrary("-L\"" + ((String) libraryDirectoryIterator.next())
                    + "\"");
        }

        Set actorLibraries = helper.getLibraries();
        Iterator librariesIterator = actorLibraries.iterator();
        while (librariesIterator.hasNext()) {
            addLibrary("-l\"" + ((String) librariesIterator.next()) + "\"");
        }
    }
View Full Code Here

Examples of ptolemy.codegen.kernel.ActorCodeGenerator

        code.append(generateFireCode());

        // The code generated in generateModeTransitionCode() is executed
        // after one global iteration, e.g., in HDF model.
        ActorCodeGenerator modelHelper = (ActorCodeGenerator) _getHelper(_director
                .getContainer());
        modelHelper.generateModeTransitionCode(code);

        /*if (callPostfire) {
            code.append(_INDENT2 + "if (!postfire()) {" + _eol + _INDENT3
                    + "break;" + _eol + _INDENT2 + "}" + _eol);
        }
View Full Code Here

Examples of ptolemy.codegen.kernel.ActorCodeGenerator

     *   cannot be found.
     */
    protected String _generateIncludeFiles() throws IllegalActionException {
        StringBuffer code = new StringBuffer();

        ActorCodeGenerator compositeActorHelper = _getHelper(getContainer());
        Set includingFiles = compositeActorHelper.getHeaderFiles();
        includingFiles.add("<systemc.h>");
       
        includingFiles.add("<stdlib.h>"); // Sun requires stdlib.h for malloc
       
        if (isTopLevel()
View Full Code Here

Examples of ptolemy.codegen.kernel.ActorCodeGenerator

                if (resetToken.booleanValue()) {
                    actors = destinationState.getRefinement();

                    if (actors != null) {
                        for (int i = 0; i < actors.length; ++i) {
                            ActorCodeGenerator helper = (ActorCodeGenerator) _getHelper((NamedObj) actors[i]);
                            codeBuffer.append(helper.generateInitializeCode());
                        }
                    }
                }

                // Generate code for updating configuration number of
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.