From: Dominik R. <ra...@vr...> - 2011-10-29 18:16:02
|
Hi all I merged back the CLUSTERMODE_TEST branch today, which added a bunch of changes to the CoreLibs. Apart from some changes to the Clustermode, there are a lot of other modifications, too, an extensive list can be found here: https://wiki.sistec.dlr.de/VistaCoreLibsVersionLog (important changes are bolded) If you want to switch to the newest trunk, there are some API changes you'll need to incorporate. The ConversionScript (in svn under projects/Vista/trunk/contrib/ConversionScripts/VistaToTrunk.py) should apply many of the required API-changes (and differences in the ini files). However, some can't or shouldn't be performed automatically: ClusterMode: All variants (Standalone, Master, Slave) are inherited from VistaClusterMode, giving a generic interface to get info about the cluster, e.g. number of nodes etc. There is now also API to check GetIsLeader() and GetIsFollower(), which replaces the former if( IsMaster() || IsServer() || IsStandalone() ) Furthermore, they now work as factory for the DataTunnel and NetworkSync (the latter now having extended functionality). For this, a new ini entry (in the system section of clusterini) was added: FREEPORTS specifies a list of free ports on the node, which can be used to construct new connections to other nodes, e.g. for DataTunnels or custom use. syntax is a comma-separated list of either individual ports, or port ranges (e.g. 4242, 4244-4248, 10011-10025, 10028) VistaPropertyList: The API changed from the Former fixed-type getter/setter to more vrsatile templated getter/setter, and also check if getting was successfull. Since it checks for both existance of the property and success of conversion to the desired value. Thus, it is possible to replace "Type GetThePropertyType( name )" by "Type GetValue<Type>( name )", however, this will by default print a warning. Alternatively, you can use GetValueType( name, VistaConversion::ON_ERROR_DO_NOTHING ) or GetValueOrDefault<Type>( name ) to receive the default-initialized value. The Setter-API is less problematic (setting values always succeed), but still you should check if it fits, since ypu can now, for example, set floats directly instead of using the bool setter (same is true for getters, of course). Furthermore, VistaVectorMathTypes and stl-containers are now natively supported, so you wont need to create temporary list<string>-values Additionally, when getting a sub-propertylist, you can now use GetSubList[Copy|Ref||ConstRef]. However, these do not - as was the case before - an empty proplist anymore if the subproplist doesn't exist, since the ref-versions pointed to a static proplist (which could potentially be modified). Thus, make sure to use HasSubList beforehand. If you still want to perform automatic replacements, the rules are in the ConversionScript, but commented out - add them when you want. VistaReflectionable: Before, TVistaPropertySet required an explicit stringconversion function pointer, and TVistaProperGet didn't. Now, both by default use VistaConversion, and if you still need to provide a custom conversion, use TVistaPropertyConvertAnd[Get|Set]. Since the pointer is now no longer in the API, it has to be removed from the ctor. This is hard to do reliably with automatic replacement, but if you want to try, here is a MSVC-regex that may work in most cases (use at your own risk): REPLACE ,[ \t]*\n*[ \t]*&VistaAspectsConversionStuff\:\:Convert(String)*To(String|Bool|Double|Int|String|Float|Float|2Float|3Float)(1|2|3|List)*[ ]*\), WITH ), Also, setting/getting VistaVector3D and such can now be achieved without own conversion functions - you might want to replace these. In VistaKernel, the DisplayOverlays are no longer first created and then added to a Viewport, instead, the Viewport (or DisplayManager and optional Viewport name) is passed to the ctor, which automatically handles registration. Furthermore, the interface was extended to allow enabling/disabling, and to forward viewport size changes to the Overlay. Furthermore, both the VistaProfiler and the VistaAspectConversionUtils now have new versions (VistaIniFileParser and VistaConversion) to replace them. While the old ones are still available, give the new ones a try, please. These are the most visible changes to you, but there's a lot more (including many style stuff like removal of compiler warnings and enhanced Vista initialization output), if you want, check the version log. And if you have feedback/suggestions, you're always welcome :) Greets Dominik -- Dipl.-Inform. Dominik Rausch Virtual Reality Group, RWTH Aachen University Lehrstuhl für Informatik 12 (Hochleistungsrechnen) Rechen- und Kommunikationszentrum Seffenter Weg 23, 52074 Aachen Tel. +49 241 80 29732 ra...@vr... www.vr.rwth-aachen.de |