VoluMillGUI/SessionParams.h

Go to the documentation of this file.
00001 //-------------------------------------------------------------------
00004 //  Copyright (c) 2007 Celeritive Technologies, Inc.
00005 //
00006 //  Licensed under the Apache License, Version 2.0 (the "License");
00007 //  you may not use this file except in compliance with the License.
00008 //  You may obtain a copy of the License at
00009 //
00010 //     http://www.apache.org/licenses/LICENSE-2.0
00011 //
00012 //  Unless required by applicable law or agreed to in writing, software
00013 //  distributed under the License is distributed on an "AS IS" BASIS,
00014 //  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
00015 //  See the License for the specific language governing permissions and
00016 //  limitations under the License.
00017 //
00018 //-------------------------------------------------------------------
00019 
00020 #include <Util/Params.h>
00021 #include <Exchange/VoluMillExchange.h>
00022 #include <map>
00023 
00024 #pragma once
00025 
00026 struct SessionParams
00027 {
00028    SessionParams() : m_hostname ("www.celeritive.com"), m_port (80), m_uri ("/phputil/GetServers.php"),
00029       m_autoCalculateSlotParameters (true), m_lastJobId (-1), m_totalDepth (0.5),
00030       m_gcodeStartMacro (0), m_gcodeToolChangeMacro (0), m_gcodeEndMacro (0), m_cleanupMachining (false) {}
00031 
00032    friend class boost::serialization::access;
00033    template<class Archive>
00034    void serialize(Archive & ar, const unsigned int version)
00035    {
00036       ar & boost::serialization::make_nvp ("hostname", m_hostname);
00037       ar & boost::serialization::make_nvp ("port", m_port);
00038       ar & boost::serialization::make_nvp ("uri", m_uri);
00039       ar & boost::serialization::make_nvp ("username", m_username);
00040       ar & boost::serialization::make_nvp ("password", m_password);
00041       ar & boost::serialization::make_nvp ("partFilename", m_partFilename);
00042       ar & boost::serialization::make_nvp ("ncFilename", m_ncFilename);
00043       if (version < 2)
00044       {
00045          int pickCorners;
00046          ar & boost::serialization::make_nvp ("pickCorners", pickCorners);
00047       }
00048       ar & boost::serialization::make_nvp ("autoCalculateSlotParameters", m_autoCalculateSlotParameters);
00049       ar & boost::serialization::make_nvp ("lastJobId", m_lastJobId);
00050       ar & boost::serialization::make_nvp ("totalDepth", m_totalDepth);
00051       ar & boost::serialization::make_nvp ("gcodeStartMacro", m_gcodeStartMacro);
00052       ar & boost::serialization::make_nvp ("gcodeToolChangeMacro", m_gcodeToolChangeMacro);
00053       ar & boost::serialization::make_nvp ("gcodeEndMacro", m_gcodeEndMacro);
00054       ar & boost::serialization::make_nvp ("gcodeStartFilename", m_gcodeStartFilename);
00055       ar & boost::serialization::make_nvp ("gcodeToolChangeFilename", m_gcodeToolChangeFilename);
00056       ar & boost::serialization::make_nvp ("gcodeEndFilename", m_gcodeEndFilename);
00057       ar & boost::serialization::make_nvp ("cachedHostnames", m_cachedHostnames);
00058       ar & boost::serialization::make_nvp ("cachedPorts", m_cachedPorts);
00059       ar & boost::serialization::make_nvp ("variableMap", m_variableMap);
00060       ar & boost::serialization::make_nvp ("editorFilename", m_editorFilename);
00061       if (version > 0)
00062          ar & boost::serialization::make_nvp ("layers", m_layers);
00063       if (version > 1)
00064          ar & boost::serialization::make_nvp ("cleanupMachining", m_cleanupMachining);
00065    }
00066 
00067    std::string m_hostname;
00068    int m_port;
00069    std::string m_uri;
00070    std::string m_username;
00071    std::string m_password;
00072    std::string m_partFilename;
00073    std::string m_ncFilename;
00074    int m_autoCalculateSlotParameters;
00075    int m_lastJobId;
00076    double m_totalDepth;
00077    int m_gcodeStartMacro;
00078    int m_gcodeToolChangeMacro;
00079    int m_gcodeEndMacro;
00080    std::string m_gcodeStartFilename;
00081    std::string m_gcodeToolChangeFilename;
00082    std::string m_gcodeEndFilename;
00083    std::vector<std::string> m_cachedHostnames;
00084    std::vector<int> m_cachedPorts;
00085    std::map<std::string, std::string> m_variableMap;
00086    std::map<std::string, int> m_layers;
00087    std::string m_editorFilename;
00088    int m_cleanupMachining;
00089 };
00090 
00091 BOOST_CLASS_VERSION (SessionParams, 2);

Generated on Tue Jan 29 21:37:57 2008 for VoluMill Universal Client by  doxygen 1.4.6