|
From: <mor...@us...> - 2008-12-15 09:39:53
|
Revision: 3313
http://ecell.svn.sourceforge.net/ecell/?rev=3313&view=rev
Author: moriyoshi
Date: 2008-12-15 09:39:47 +0000 (Mon, 15 Dec 2008)
Log Message:
-----------
* Merge from branch.
Modified Paths:
--------------
ecell3/branches/ecell-3.1/dmtool/configure.in
ecell3/branches/ecell-3.1/dmtool/dmcompile.in
ecell3/branches/ecell-3.1/doc/Makefile.am
ecell3/branches/ecell-3.1/doc/samples/sessionmanager/ems.globus.py
ecell3/branches/ecell-3.1/doc/samples/sessionmanager/ems.py
ecell3/branches/ecell-3.1/doc/samples/sessionmanager/runsession.py
ecell3/branches/ecell-3.1/ecell/bin/ecell3-dmc.in
ecell3/branches/ecell-3.1/ecell/libecs/PropertyInterface.hpp
ecell3/branches/ecell-3.1/ecell/libecs/PropertySlot.hpp
ecell3/branches/ecell-3.1/ecell/libecs/PropertySlotProxy.hpp
Modified: ecell3/branches/ecell-3.1/dmtool/configure.in
===================================================================
--- ecell3/branches/ecell-3.1/dmtool/configure.in 2008-12-15 09:22:47 UTC (rev 3312)
+++ ecell3/branches/ecell-3.1/dmtool/configure.in 2008-12-15 09:39:47 UTC (rev 3313)
@@ -77,6 +77,7 @@
dnl
dnl Create the top-level Makefile.
dnl
-AC_OUTPUT(Makefile dmcompile,chmod +x dmcompile)
+AC_CONFIG_FILES(dmcompile, [chmod +x dmcompile])
+AC_CONFIG_FILES(Makefile)
+AC_OUTPUT
-
Modified: ecell3/branches/ecell-3.1/dmtool/dmcompile.in
===================================================================
--- ecell3/branches/ecell-3.1/dmtool/dmcompile.in 2008-12-15 09:22:47 UTC (rev 3312)
+++ ecell3/branches/ecell-3.1/dmtool/dmcompile.in 2008-12-15 09:39:47 UTC (rev 3313)
@@ -1,12 +1,15 @@
#!/usr/bin/env python
-# usage: dcompile cfile [[cflags]... ]
+# usage: dmcompile cfile [[cflags]... ]
import sys
import os
import glob
-import string
import getopt
+from distutils.sysconfig import get_config_var
+from distutils.ccompiler import new_compiler
+from distutils.errors import CompileError, LinkError
+from distutils.util import split_quoted
# prefix='@prefix@'
# exec_prefix='@exec_prefix@'
@@ -15,99 +18,140 @@
ORIG_CPPFLAGS = '@CPPFLAGS@'
ORIG_LDFLAGS = '@LDFLAGS@'
SHLEXT = os.popen('echo @LTDL_SHLIB_EXT@').readline().rstrip()
-CXX = '@CXX@'
CXXSUFFIX = '.cpp'
CXXFLAGS = os.environ.get('CXXFLAGS','')
+CPPFLAGS = os.environ.get('CPPFLAGS','')
LDFLAGS = os.environ.get('LDFLAGS','')
-VERBOSE = False
+progname = os.path.basename( sys.argv[0] )
+
def help():
- ext = os.path.basename( sys.argv[0] )
- aProgramName, ext = os.path.splitext( ext )
+ global progname
print '''
-%s -- Compile dynamic modules for E-Cell Simulation Environment Version 3
+%(progname)s -- Compile dynamic modules for E-Cell Simulation Environment Version 3
Usage:
- %s [-v|--verbose] <source.cpp> [compile options]
- %s [-h|--help]
- '''% ( aProgramName, aProgramName, aProgramName )
+ %(progname)s [-v|--verbose] [-o file|--output=file] <compiler / linker options> source.cpp
+ %(progname)s [-h|--help]
+Acceptable compiler / linker options:
+ -g
+ -W[warning options]
+ -f[compiler-specific-option]
+ -m[architecture-specific-option]
+ -O[optimizatin-option]
+ -Dname=value
+ -Iincludedir
+ -Llibdir
+ -llib
+ ''' % dict( progname = progname )
+
def msg( outstr ):
- print "E-Cell3 dmcompile: " + outstr
+ global progname
+ print "%s: %s" % ( progname, outstr )
-def execute( cmdstr ):
- if VERBOSE:
- print cmdstr
- return os.system( cmdstr )
+def main():
+ global ORIG_CXXFLAGS, ORIG_CPPFLAGS, ORIG_LDFLAGS, SHLEXT, \
+ CXXSUFFIX, CXXFLAGS, CPPFLAGS, LDFLAGS
+ opts , args = getopt.gnu_getopt( sys.argv[1:], "hvI:L:l:o:D:f:m:O:W:g", ["help", "verbose", "output=" ])
+
+ include_dirs = []
+ library_dirs = []
+ libs = []
+ macros = []
+ out = None
+ verbose = False
-def compile( CXX, CXXCOMPILEFLAGS, SRC ):
- return execute( CXX + ' ' + CXXCOMPILEFLAGS + ' -fPIC -c ' + SRC )
-
-def link( CXX, CPPFLAGS, OBJ, SOBJ, LDFLAGS ):
- cflags = CPPFLAGS
- if sys.platform == 'darwin':
- cflags = cflags + ' -dynamiclib -install_name ' + SOBJ
- else:
- cflags = cflags + ' -shared -Wl,-soname=\"' + SOBJ + '\" '
-
- return execute( CXX + ' ' + cflags + ' ' + OBJ + ' -o ' + SOBJ + ' ' + LDFLAGS)
-
-def cleanup( OBJ ):
- if os.path.isfile( OBJ ):
- os.remove( OBJ )
-
-def main():
- opts , args = getopt.getopt( sys.argv[1:], "hv", ["help", "verbose"])
- global VERBOSE
-
for anOption, anArg in opts:
-
- # print help message
- if anOption in ( "-h", '--help' ):
+ # print help message
+ if anOption in ( '-h', '--help' ):
help()
- sys.exit(0)
-
- # be verbose
- if anOption in ( "-v", '--verbose'):
- VERBOSE = True
+ return 0
+ elif anOption in ( '-v', '--verbose'):
+ verbose = True
+ elif anOption in ( '-f', '-m', '-g', '-O', '-W' ):
+ CXXFLAGS += ' ' + anOption + anArg
+ elif anOption == '-I':
+ include_dirs.append( anArg )
+ elif anOption == '-D':
+ macros.append( anArg.split('=') )
+ elif anOption == '-L':
+ library_dirs.append( anArg )
+ elif anOption == '-l':
+ libs.append( anArg )
+ elif anOption in ( '-o', '--output' ):
+ out = anArg
+
# check if source file is given
if len( args ) < 1:
- help()
- msg( "Error: source file was not given." )
- sys.exit(1)
+ help()
+ msg( "no source file was given." )
+ return 255
- # check if source file is valid
- if len( glob.glob ( args[0].replace( '\"', '' ) ) ) < 1:
- msg( "Error: source file "+ args[0] + " was not found." )
- sys.exit(1)
-
- SRC = args[0]
- ext = os.path.basename(SRC)
- CLASSNAME, ext = os.path.splitext( ext.replace( '\"', '' ) )
- OBJ = CLASSNAME + '.o'
- SOBJ = CLASSNAME + SHLEXT
- if len(args) > 0:
- ARGS = ' \"' + string.join( args[1:], '\" \"' ) + '\"'
+ if out == None:
+ if len( args ) == 1:
+ out, dummy = os.path.splitext( args[ 0 ] )
+ out += SHLEXT
+ else:
+ msg( "specify the output filename." )
+ return 255
else:
- ARGS = ' '
+ path_without_ext, ext = os.path.splitext( out )
+ if ext == '':
+ out = path_without_ext + SHLEXT
- # compiler: use env + autoconf + plus anything that was given on the cmd line (?) -- FIXME
- CXXCOMPILEFLAGS = CXXFLAGS + ' ' + ORIG_CXXFLAGS + ' ' + ORIG_CPPFLAGS + ' ' + ARGS
-
+ # compiler: use env + autoconf + plus anything that was given on the cmd line (?) -- FIXME
+ cxxflags = split_quoted( ORIG_CXXFLAGS ) + \
+ split_quoted( CXXFLAGS )
+ cppflags = split_quoted( ORIG_CPPFLAGS ) + \
+ split_quoted( CPPFLAGS )
# linker: use env + autoconf (?) -- FIXME
- LINKFLAGS = LDFLAGS + ' ' + ORIG_LDFLAGS
-
- if compile( CXX, CXXCOMPILEFLAGS, "\"" + SRC + "\"" ) or not os.path.isfile( OBJ ):
- msg( "Error: The compiler failed to create " + OBJ )
- sys.exit(1)
-
- if link( CXX, CXXCOMPILEFLAGS, '\"' + OBJ + '\"' , '\"' + SOBJ + '\"', LINKFLAGS ) or not os.path.isfile( SOBJ ):
- msg( "Error: The compiler failed to create " + SOBJ )
- sys.exit(1)
-
- cleanup( OBJ )
+ ldflags = split_quoted( ORIG_LDFLAGS ) + \
+ split_quoted( LDFLAGS )
+ compiler = new_compiler( verbose = verbose )
+ if verbose:
+ old_spawn = compiler.spawn
+ def new_spawn( self, cmd ):
+ print ' '.join( cmd )
+ old_spawn( cmd )
+ compiler.__class__.spawn = new_spawn
+ map( compiler.add_include_dir, include_dirs )
+ map( compiler.add_library_dir, library_dirs )
+ map( compiler.add_library, libs )
+ map( lambda args: compiler.define_macro( *args ), macros )
+
+ objects = None
+ try:
+ objects = compiler.compile( args, extra_preargs = cxxflags + cppflags )
+ except CompileError, e:
+ msg( "failed to compile the specified source files: " + repr( e ) )
+ return 1
+
+ if sys.platform == 'darwin':
+ compiler.linker_so = [ arg for arg in compiler.linker_so if arg != '-shard' ]
+
+ dlflags = []
+ dlflags.extend(
+ split_quoted(
+ get_config_var( 'LDSHARED' ).replace(
+ get_config_var( 'LINKCC' ), '' ).replace(
+ get_config_var( 'LDFLAGS' ), '' ) ) )
+
+ try:
+ try:
+ compiler.link( output_filename = out,
+ target_desc = compiler.SHARED_OBJECT,
+ objects = objects,
+ extra_preargs = ldflags + dlflags,
+ target_lang = 'c++' )
+ except LinkError, e:
+ msg( "failed to link the object files: " + repr( e ) )
+ return 1
+ finally:
+ map( os.unlink, objects )
+
if __name__ == '__main__':
- main()
+ sys.exit( main() )
Modified: ecell3/branches/ecell-3.1/doc/Makefile.am
===================================================================
--- ecell3/branches/ecell-3.1/doc/Makefile.am 2008-12-15 09:22:47 UTC (rev 3312)
+++ ecell3/branches/ecell-3.1/doc/Makefile.am 2008-12-15 09:39:47 UTC (rev 3313)
@@ -8,7 +8,7 @@
_htmldir = $(htmldir)/api
_html_DATA = api/*
-api/*: ecell3.doxy
+api/index.html: ecell3.doxy
doxygen ecell3.doxy
clean-local:
Modified: ecell3/branches/ecell-3.1/doc/samples/sessionmanager/ems.globus.py
===================================================================
--- ecell3/branches/ecell-3.1/doc/samples/sessionmanager/ems.globus.py 2008-12-15 09:22:47 UTC (rev 3312)
+++ ecell3/branches/ecell-3.1/doc/samples/sessionmanager/ems.globus.py 2008-12-15 09:39:47 UTC (rev 3313)
@@ -5,7 +5,7 @@
import os
-setEnvironment('Globus2')
+setEnvironment('Globus4')
setTmpDirRemovable(False) # not delete tmp directory
@@ -15,15 +15,9 @@
# set up SystemProxy's properties
aSystemProxy = getSystemProxy()
+aSystemProxy.setLocalHostName( 'myhost.example.com' )
+aSystemProxy.setFactoryEndpoint( 'https://endpoint.example.com:8443/wsrf/services/ManagedJobFactoryService' )
-aSystemProxy.setPassword('your_passwd') # password for globus gate-keeper
-aSystemProxy.gridProxyInit() # initialize gate-keeper
-
-# create a list of hosts on which jobs are conducted.
-aHostList = ['host1.domain',
- 'host2.domain']
-aSystemProxy.setHosts(aHostList) # set the host list
-
# -------------------------------
MODEL_FILE = 'model.eml'
Modified: ecell3/branches/ecell-3.1/doc/samples/sessionmanager/ems.py
===================================================================
--- ecell3/branches/ecell-3.1/doc/samples/sessionmanager/ems.py 2008-12-15 09:22:47 UTC (rev 3312)
+++ ecell3/branches/ecell-3.1/doc/samples/sessionmanager/ems.py 2008-12-15 09:39:47 UTC (rev 3313)
@@ -26,7 +26,5 @@
for aJobID in aJobIDList:
- print " --- job id = %s ---" %aJobID
+ print " --- job id = %s ---" % aJobID
print getStdout( aJobID ) # Print the output of each job.
-
-
Modified: ecell3/branches/ecell-3.1/doc/samples/sessionmanager/runsession.py
===================================================================
--- ecell3/branches/ecell-3.1/doc/samples/sessionmanager/runsession.py 2008-12-15 09:22:47 UTC (rev 3312)
+++ ecell3/branches/ecell-3.1/doc/samples/sessionmanager/runsession.py 2008-12-15 09:39:47 UTC (rev 3313)
@@ -7,5 +7,4 @@
run( 200 ) # Run the simulation for 200 seconds.
-message( S[ 'Value' ] ) # Print the value of 'Variable:/:S'.
-
+print S[ 'Value' ] # Print the value of 'Variable:/:S'.
Modified: ecell3/branches/ecell-3.1/ecell/bin/ecell3-dmc.in
===================================================================
--- ecell3/branches/ecell-3.1/ecell/bin/ecell3-dmc.in 2008-12-15 09:22:47 UTC (rev 3312)
+++ ecell3/branches/ecell-3.1/ecell/bin/ecell3-dmc.in 2008-12-15 09:39:47 UTC (rev 3313)
@@ -1,4 +1,4 @@
-#!/usr/bin/env @prefix@/bin/ecell3-python
+#!/usr/bin/env python
#
# ecell3-dmc - a program to compile and/or docify dynamic module in
# E-Cell Simulation Environment Version 3
@@ -11,25 +11,27 @@
import sys
import os
-import glob
import getopt
-import string
+import operator
+from glob import glob
+from distutils.util import split_quoted
+
+DMCOMPILE = 'dmcompile'
+CLASS_NAME_MACRO_NAME = '_ECELL3_DM_CLASSNAME'
+progname = os.path.basename( sys.argv[ 0 ] )
+
def usage():
- ext = os.path.basename( sys.argv[0] )
- aProgramName, ext = os.path.splitext( ext )
print '''
%s -- Compile dynamic modules for E-Cell Simulation Environment Version 3.
Usage:
%s [options] [sourcefile(s)]
%s [-h] or [--help]
- '''% ( aProgramName, aProgramName, aProgramName )
+ ''' % dict( progname = progname )
def help():
usage()
- ext = os.path.basename( sys.argv[0] )
- aProgramName, ext = os.path.splitext( ext )
print '''
%s options:
--no-stdinclude Don't set standard include file path.
@@ -47,29 +49,28 @@
Written by:
Tomoya Kitayama <to...@e-...>
Satya Arjunan <sa...@tt...>
- '''% ( aProgramName )
+ ''' % dict( progname = progname )
def msg( outstr ):
- print "E-Cell3 ecell3-dmc: " + outstr
+ global progname
+ print "%s: %s" % ( progname, outstr )
def main():
# -------------------------------------
# initialize file names
# -------------------------------------
- prefix = os.environ['ECELL3_PREFIX']
- ecell3dir = os.environ['ECELL_DIRNAME']
- BOOST_LIBRARIES = os.environ['BOOST_LIBRARIES']
+ prefix = r'''@PREFIX@'''
+ ecell3dir = r'''@ECELL_DIRNAME@'''
+ BOOST_LIBRARIES = r'''-lboost_python'''
exec_prefix = prefix
BINDIR = exec_prefix + os.sep + 'bin'
- STDLIBDIR = '-L\"' + exec_prefix + os.sep + 'lib\"'
+ STDLIBDIRS = [ '-L' + exec_prefix + os.sep + 'lib' ]
ECELL_INCLUDE = prefix + os.sep + 'include' + os.sep + ecell3dir
LIBECS_INCLUDE = ECELL_INCLUDE + os.sep + 'libecs'
- STDINCLUDE = [ '\"-I' + prefix + os.sep + 'include\"',
- '\"-I' + ECELL_INCLUDE + '\"',
- '\"-I' + LIBECS_INCLUDE + '\"',
- os.environ['PYTHON_INCLUDES'] ]
- DMCOMPILE = os.path.abspath( BINDIR + os.sep + 'dmcompile' )
+ STDINCLUDE = [ '-I' + prefix + os.sep + 'include',
+ '-I' + ECELL_INCLUDE,
+ '-I' + LIBECS_INCLUDE ]
SRC = None
@@ -88,11 +89,11 @@
NO_STDINCLUDE = False
NO_STDLIBDIR = False
NO_DEFINE_CXXFLAGS = False
- LDFLAGS = ''
+ LDFLAGS = []
CXXFLAGS = []
CXXCOMPILEFLAGS = []
- PYTHON = None
cmdList = []
+ dmcompile = DMCOMPILE
# -------------------------------------
# check argument
@@ -102,7 +103,7 @@
# print help message
if anOption in ( "-h", '--help' ):
help()
- sys.exit( -1 )
+ return 255
# be verbose
if anOption in ( "-v", '--verbose'):
@@ -118,85 +119,72 @@
# set ldflags
if anOption == "--ldflags":
- LDFLAGS = LDFLAGS + ' ' + anArg
+ LDFLAGS.extend( split_quoted( anArg ) )
# set no-define-cxxflags
if anOption == "--no-define-cxxflags":
NO_DEFINE_CXXFLAGS = True
- CXXFLAGS = anArg.split()
+ CXXFLAGS.extend( split_quoted( anArg ) )
# set cxxflags
if anOption == "--cxxflags":
- CXXCOMPILEFLAGS.extend( CXXFLAGS )
- CXXCOMPILEFLAGS.extend( anArg.split() )
+ CXXFLAGS.extend( split_quoted( anArg ) )
# set cxxflags
if anOption == "--dmcompile":
- DMCOMPILE = os.path.abspath( anArg + os.sep + 'dmcompile' )
+ if os.path.isdir( anArg ):
+ dmcompile = os.path.join( anArg, DMCOMPILE )
+ else:
+ dmcompile = anArg
# check if source file is given
if len( args ) < 1:
help()
- msg( "Error: source file was not given." )
- sys.exit( 1 )
+ msg( "no source file is given." )
+ return 1
- if os.name == 'nt':
- PYTHON_WIN_VERSION = ( '%d%d' )%( sys.version_info[:2] )
- ADDFLAGS = ' -Wl,--enable-runtime-pseudo-reloc -Wl,-s -lpython' + \
- PYTHON_WIN_VERSION
- elif sys.platform == 'darwin':
- ADDFLAGS = ' -Wl,-undefined,dynamic_lookup'
- else:
- ADDFLAGS = ''
- cmdList.append( sys.executable )
+ cmdList.append( dmcompile )
- cmdList.append( DMCOMPILE )
-
if VERBOSE:
cmdList.append( '-v' )
# on MS-Windows, command line doesn't expand *.cpp automatically
- FILELIST = []
- for arg in args:
- FILELIST.extend( glob.glob( arg ) )
+ srcs = reduce( operator.add, map( glob, args ) )
# check if source file is valid
- if len( FILELIST ) < 1:
- msg( "Error: source file "+ args[0] + " was not found." )
- sys.exit( 1 )
+ if len( srcs ) < 1:
+ msg( "source file "+ args[0] + " was not found." )
+ return 1
if NO_STDINCLUDE:
STDINCLUDE = []
if not NO_STDLIBDIR:
- LDFLAGS = LDFLAGS + ' ' + STDLIBDIR
-
- LDFLAGS = LDFLAGS + ADDFLAGS + ' -lecs -lgsl ' + BOOST_LIBRARIES
- os.environ['LDFLAGS'] = LDFLAGS
+ LDFLAGS.extend( STDLIBDIRS )
+
+ LDFLAGS.append( '-lecs' )
+ LDFLAGS.append( '-lgsl' )
+ LDFLAGS.extend( split_quoted( BOOST_LIBRARIES ) )
- if NO_DEFINE_CXXFLAGS:
- os.environ['CXXFLAGS'] = CXXFLAGS.join()
+ cmdList.extend( STDINCLUDE )
+ cmdList.extend( CXXFLAGS )
+ cmdList.extend( LDFLAGS )
- for SRC in FILELIST:
- ext = os.path.basename(SRC)
- CLASSNAME, ext = os.path.splitext(ext)
- CLASSNAMEDEFINE = '-D_ECELL3_DM_CLASSNAME=' + CLASSNAME
- argList = []
- argList.append( cmdList[0] )
- argList.extend( cmdList[1:] )
- argList.extend( [ SRC, CLASSNAMEDEFINE ] )
- argList.extend( STDINCLUDE )
- argList.extend( CXXCOMPILEFLAGS )
+ for src in srcs:
+ ext = os.path.basename( src )
+ classname, ext = os.path.splitext( ext )
+ argList = cmdList + [ '-D%s=%s' % ( CLASS_NAME_MACRO_NAME, classname ), src ]
if VERBOSE:
- print string.join( argList[0:] )
+ print ' '.join( argList[0:] )
# Need to us os.spawnv because of problems in MS-Windows with os.sytem
# when the dmcompile path contains whitespaces even if we force quotes
- ret = os.spawnv( os.P_WAIT, cmdList[0], argList )
- if not ret == 0:
- sys.exit( 1 )
+ ret = os.spawnvp( os.P_WAIT, cmdList[0], argList )
+ if ret != 0:
+ msg( '%s returned error status: %d' % ( cmdList[0], ret ) )
+ return 1
+ return 0
if __name__ == '__main__':
- main()
- sys.exit( 0 )
+ sys.exit( main() )
Modified: ecell3/branches/ecell-3.1/ecell/libecs/PropertyInterface.hpp
===================================================================
--- ecell3/branches/ecell-3.1/ecell/libecs/PropertyInterface.hpp 2008-12-15 09:22:47 UTC (rev 3312)
+++ ecell3/branches/ecell-3.1/ecell/libecs/PropertyInterface.hpp 2008-12-15 09:39:47 UTC (rev 3313)
@@ -88,11 +88,10 @@
public:
- typedef PropertySlot<T> PropertySlot_;
- DECLARE_TYPE( PropertySlot_, PropertySlot );
+ DECLARE_TYPE( PropertySlot<T>, PropertySlotType );
- DECLARE_ASSOCVECTOR_TEMPLATE( String, PropertySlotPtr,
- std::less<const String>, PropertySlotMap );
+ DECLARE_ASSOCVECTOR_TEMPLATE( String, PropertySlotTypePtr,
+ std::less<const String>, PropertySlotTypeMap );
DECLARE_ASSOCVECTOR_TEMPLATE( String, Polymorph,
std::less<const String>, PolymorphAssocVector);
@@ -184,9 +183,9 @@
@return a borrowed pointer to the PropertySlot with that name.
*/
- static PropertySlotPtr getPropertySlot( StringCref aPropertyName )
+ static PropertySlotTypePtr getPropertySlot( StringCref aPropertyName )
{
- PropertySlotMapConstIterator i( findPropertySlot( aPropertyName ) );
+ PropertySlotTypeMapConstIterator i( findPropertySlot( aPropertyName ) );
if( i == thePropertySlotMap.end() )
{
@@ -202,7 +201,7 @@
{
try
{
- PropertySlotPtr aPropertySlot( getPropertySlot( aPropertyName ) );
+ PropertySlotTypePtr aPropertySlot( getPropertySlot( aPropertyName ) );
return new ConcretePropertySlotProxy<T>( anObject, *aPropertySlot );
}
catch( NoSlotCref )
@@ -227,7 +226,7 @@
static void setProperty( T& anObject, StringCref aPropertyName,
PolymorphCref aValue )
{
- PropertySlotMapConstIterator
+ PropertySlotTypeMapConstIterator
aPropertySlotMapIterator( findPropertySlot( aPropertyName ) );
if( aPropertySlotMapIterator != thePropertySlotMap.end() )
@@ -255,7 +254,7 @@
static const Polymorph getProperty( const T& anObject,
StringCref aPropertyName )
{
- PropertySlotMapConstIterator
+ PropertySlotTypeMapConstIterator
aPropertySlotMapIterator( findPropertySlot( aPropertyName ) );
if( aPropertySlotMapIterator != thePropertySlotMap.end() )
@@ -272,12 +271,12 @@
static void loadProperty( T& anObject, StringCref aPropertyName,
PolymorphCref aValue )
{
- PropertySlotMapConstIterator
+ PropertySlotTypeMapConstIterator
aPropertySlotMapIterator( findPropertySlot( aPropertyName ) );
if( aPropertySlotMapIterator != thePropertySlotMap.end() )
{
- PropertySlotPtr aPropertySlotPtr( aPropertySlotMapIterator->second );
+ PropertySlotTypePtr aPropertySlotPtr( aPropertySlotMapIterator->second );
if( aPropertySlotPtr->isLoadable() )
{
@@ -298,12 +297,12 @@
static const Polymorph
saveProperty( const T& anObject, StringCref aPropertyName )
{
- PropertySlotMapConstIterator
+ PropertySlotTypeMapConstIterator
aPropertySlotMapIterator( findPropertySlot( aPropertyName ) );
if( aPropertySlotMapIterator != thePropertySlotMap.end() )
{
- PropertySlotPtr aPropertySlotPtr( aPropertySlotMapIterator->second );
+ PropertySlotTypePtr aPropertySlotPtr( aPropertySlotMapIterator->second );
if( aPropertySlotPtr->isSavable() )
{
return aPropertySlotPtr->savePolymorph( anObject );
@@ -325,7 +324,7 @@
PolymorphVector aVector1, aVector2;
// aVector.reserve( thePropertySlotMap.size() );
- for( PropertySlotMapConstIterator i( thePropertySlotMap.begin() );
+ for( PropertySlotTypeMapConstIterator i( thePropertySlotMap.begin() );
i != thePropertySlotMap.end() ; ++i )
{
aVector1.push_back( i->first );
@@ -347,7 +346,7 @@
static void
- registerPropertySlot( StringCref aName, PropertySlotPtr aPropertySlotPtr )
+ registerPropertySlot( StringCref aName, PropertySlotTypePtr aPropertySlotPtr )
{
if( findPropertySlot( aName ) != thePropertySlotMap.end() )
{
@@ -364,7 +363,7 @@
static const Polymorph
getPropertyAttributes( const T& anObject, StringCref aPropertyName )
{
- PropertySlotMapConstIterator i( findPropertySlot( aPropertyName ) );
+ PropertySlotTypeMapConstIterator i( findPropertySlot( aPropertyName ) );
if( i != thePropertySlotMap.end() )
{
@@ -413,7 +412,7 @@
}
*/
- static PropertySlotMapCref getPropertySlotMap()
+ static PropertySlotTypeMapCref getPropertySlotMap()
{
return thePropertySlotMap;
}
@@ -465,7 +464,7 @@
private:
- static PropertySlotMapConstIterator
+ static PropertySlotTypeMapConstIterator
findPropertySlot( StringCref aPropertyName )
{
return thePropertySlotMap.find( aPropertyName );
@@ -473,7 +472,7 @@
private:
- static PropertySlotMap thePropertySlotMap;
+ static PropertySlotTypeMap thePropertySlotMap;
static PolymorphAssocVector theInfoMap;
};
@@ -482,7 +481,7 @@
// This is necessary for the static data member of
// the PropertyInterface template class to be instantiated
// when the class is specialized (in LIBECS_DM_INIT_STATIC()).
- template< class T > typename libecs::PropertyInterface< T>::PropertySlotMap
+ template< class T > typename libecs::PropertyInterface< T>::PropertySlotTypeMap
libecs::PropertyInterface< T>::thePropertySlotMap;
template< class T > typename libecs::PropertyInterface< T>::PolymorphAssocVector
libecs::PropertyInterface< T>::theInfoMap;
Modified: ecell3/branches/ecell-3.1/ecell/libecs/PropertySlot.hpp
===================================================================
--- ecell3/branches/ecell-3.1/ecell/libecs/PropertySlot.hpp 2008-12-15 09:22:47 UTC (rev 3312)
+++ ecell3/branches/ecell-3.1/ecell/libecs/PropertySlot.hpp 2008-12-15 09:39:47 UTC (rev 3313)
@@ -289,8 +289,7 @@
};
template
- <
- class T,
+ < class T,
typename SlotType_
>
class LoadSaveConcretePropertySlot
@@ -302,20 +301,20 @@
DECLARE_TYPE( SlotType_, SlotType );
- typedef ConcretePropertySlot<T,SlotType> ConcretePropertySlot;
+ typedef ConcretePropertySlot<T,SlotType> ConcretePropertySlotType;
- typedef typename ConcretePropertySlot::SetType SetType;
- typedef typename ConcretePropertySlot::GetType GetType;
+ typedef typename ConcretePropertySlotType::SetType SetType;
+ typedef typename ConcretePropertySlotType::GetType GetType;
- typedef typename ConcretePropertySlot::SetMethodPtr SetMethodPtr;
- typedef typename ConcretePropertySlot::GetMethodPtr GetMethodPtr;
+ typedef typename ConcretePropertySlotType::SetMethodPtr SetMethodPtr;
+ typedef typename ConcretePropertySlotType::GetMethodPtr GetMethodPtr;
DM_IF LoadSaveConcretePropertySlot( const SetMethodPtr aSetMethodPtr,
const GetMethodPtr aGetMethodPtr,
const SetMethodPtr aLoadMethodPtr,
const GetMethodPtr aSaveMethodPtr )
:
- ConcretePropertySlot( aSetMethodPtr, aGetMethodPtr ),
+ ConcretePropertySlotType( aSetMethodPtr, aGetMethodPtr ),
theLoadMethodPtr( SetMethod( aLoadMethodPtr ) ),
theSaveMethodPtr( GetMethod( aSaveMethodPtr ) )
{
Modified: ecell3/branches/ecell-3.1/ecell/libecs/PropertySlotProxy.hpp
===================================================================
--- ecell3/branches/ecell-3.1/ecell/libecs/PropertySlotProxy.hpp 2008-12-15 09:22:47 UTC (rev 3312)
+++ ecell3/branches/ecell-3.1/ecell/libecs/PropertySlotProxy.hpp 2008-12-15 09:39:47 UTC (rev 3313)
@@ -162,11 +162,10 @@
public:
- typedef PropertySlot<T> PropertySlot_;
- DECLARE_TYPE( PropertySlot_, PropertySlot );
+ DECLARE_TYPE( PropertySlot<T>, PropertySlotType );
DM_IF ConcretePropertySlotProxy( T& anObject,
- PropertySlotRef aPropertySlot )
+ PropertySlotTypeRef aPropertySlot )
:
theObject( anObject ),
thePropertySlot( aPropertySlot )
@@ -223,7 +222,7 @@
DM_IF ConcretePropertySlotProxy();
T& theObject;
- PropertySlotRef thePropertySlot;
+ PropertySlotTypeRef thePropertySlot;
};
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|