Browse Source
			
			
			JaniExportSettings
			
				
		JaniExportSettings
	
		
	
			
				Former-commit-id:maind375a92788[formerly9bd2c0efa8] Former-commit-id:f4e93f61dd
				 2 changed files with 80 additions and 0 deletions
			
			
		@ -0,0 +1,42 @@ | 
				
			|||
#include "JaniExportSettings.h"
 | 
				
			|||
 | 
				
			|||
#include "src/settings/SettingsManager.h"
 | 
				
			|||
#include "src/settings/SettingMemento.h"
 | 
				
			|||
#include "src/settings/Option.h"
 | 
				
			|||
#include "src/settings/OptionBuilder.h"
 | 
				
			|||
#include "src/settings/ArgumentBuilder.h"
 | 
				
			|||
#include "src/settings/Argument.h"
 | 
				
			|||
 | 
				
			|||
#include "src/exceptions/InvalidSettingsException.h"
 | 
				
			|||
 | 
				
			|||
namespace storm { | 
				
			|||
    namespace settings { | 
				
			|||
        namespace modules { | 
				
			|||
            const std::string JaniExportSettings::moduleName = "exportJani"; | 
				
			|||
             | 
				
			|||
            const std::string JaniExportSettings::janiFileOptionName = "jani-output"; | 
				
			|||
            const std::string JaniExportSettings::janiFileOptionShortName = "output"; | 
				
			|||
 | 
				
			|||
             | 
				
			|||
            JaniExportSettings::JaniExportSettings() : ModuleSettings(moduleName) { | 
				
			|||
                this->addOption(storm::settings::OptionBuilder(moduleName, janiFileOptionName, false, "Destination for the jani model.").setShortName(janiFileOptionShortName).addArgument(storm::settings::ArgumentBuilder::createStringArgument("filename", "path to file").build()).build()); | 
				
			|||
            } | 
				
			|||
             | 
				
			|||
            bool JaniExportSettings::isJaniFileSet() const { | 
				
			|||
                return this->getOption(janiFileOptionName).getHasOptionBeenSet(); | 
				
			|||
            } | 
				
			|||
             | 
				
			|||
            std::string JaniExportSettings::getJaniFilename() const { | 
				
			|||
                return this->getOption(janiFileOptionName).getArgumentByName("filename").getValueAsString(); | 
				
			|||
            } | 
				
			|||
             | 
				
			|||
            void JaniExportSettings::finalize() { | 
				
			|||
                 | 
				
			|||
            } | 
				
			|||
             | 
				
			|||
            bool JaniExportSettings::check() const { | 
				
			|||
                return true; | 
				
			|||
            } | 
				
			|||
        } | 
				
			|||
    } | 
				
			|||
} | 
				
			|||
@ -0,0 +1,38 @@ | 
				
			|||
#pragma once | 
				
			|||
 | 
				
			|||
#include "storm-config.h" | 
				
			|||
#include "src/settings/modules/ModuleSettings.h" | 
				
			|||
 | 
				
			|||
 | 
				
			|||
namespace storm { | 
				
			|||
    namespace settings { | 
				
			|||
        namespace modules { | 
				
			|||
            class JaniExportSettings : public ModuleSettings { | 
				
			|||
            public: | 
				
			|||
                /*! | 
				
			|||
                 * Creates a new JaniExport setting | 
				
			|||
                 */ | 
				
			|||
                JaniExportSettings(); | 
				
			|||
                 | 
				
			|||
                /** | 
				
			|||
                 * Retrievew whether the pgcl file option was set | 
				
			|||
                 */ | 
				
			|||
                bool isJaniFileSet() const; | 
				
			|||
                 | 
				
			|||
                /** | 
				
			|||
                 * Retrieves the pgcl file name | 
				
			|||
                 */ | 
				
			|||
                std::string getJaniFilename() const; | 
				
			|||
                 | 
				
			|||
                bool check() const override; | 
				
			|||
                void finalize() override; | 
				
			|||
                 | 
				
			|||
                static const std::string moduleName; | 
				
			|||
                 | 
				
			|||
            private: | 
				
			|||
                static const std::string janiFileOptionName; | 
				
			|||
                static const std::string janiFileOptionShortName; | 
				
			|||
            }; | 
				
			|||
        } | 
				
			|||
    } | 
				
			|||
} | 
				
			|||
						Write
						Preview
					
					
					Loading…
					
					Cancel
						Save
					
		Reference in new issue