Results 1 to 1 of 1

Thread: Slice2CppTask

  1. #1
    sinofool is offline Registered User
    Name: Bochun Bai
    Organization: xiaonei.com
    Project: http://labs.xiaonei.com/
    Join Date
    Oct 2006
    Posts
    41

    Slice2CppTask

    I use ant build system for both Java and C++ compile in the project.

    IceJ includes Slice2JavaTask but no Slice2CppTask.

    I copied Slice2JavaTask.java to Slice2CppTask.java and changed some class name. But it does not handle the dependencies correctly.

    By overriding parseDependencies method, it works.

    Code:
        @Override
        protected java.util.List
        parseDependencies(String allDependencies)
        {
            java.util.List sResult = super.parseDependencies(allDependencies);
            java.util.Iterator p = sResult.iterator();
            while(p.hasNext())
            {
                SliceDependency dep = (SliceDependency)p.next();
                assert(dep._dependencies[0].endsWith(".cpp"));
    
                String[] newDependencies = new String[dep._dependencies.length - 1];
                for(int initNewDep=0;initNewDep < newDependencies.length;++initNewDep)
                {
                    newDependencies[initNewDep] = dep._dependencies[initNewDep+1];
                }
                dep._dependencies = newDependencies;
            }
            return sResult;
        }
    Attached Files Attached Files

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. shared my Slice2CppTask source code with u!
    By lanbo in forum Comments
    Replies: 1
    Last Post: 01-04-2005, 07:03 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •