Select Git revision
GFaceCompound.cpp
Forked from
gmsh / gmsh
Source project has a limited visibility.
onelab.h 40.60 KiB
// ONELAB - Copyright (C) 2011-2016 ULg-UCL
//
// Permission is hereby granted, free of charge, to any person
// obtaining a copy of this software and associated documentation
// files (the "Software"), to deal in the Software without
// restriction, including without limitation the rights to use, copy,
// modify, merge, publish, distribute, and/or sell copies of the
// Software, and to permit persons to whom the Software is furnished
// to do so, provided that the above copyright notice(s) and this
// permission notice appear in all copies of the Software and that
// both the above copyright notice(s) and this permission notice
// appear in supporting documentation.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE
// COPYRIGHT HOLDER OR HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR
// ANY CLAIM, OR ANY SPECIAL INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY
// DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
// WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
// ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
// OF THIS SOFTWARE.
//
// Please report all bugs and problems to the public mailing list
// <gmsh@onelab.info>.
#ifndef _ONELAB_H_
#define _ONELAB_H_
#include <time.h>
#include <stdio.h>
#include <string>
#include <vector>
#include <set>
#include <map>
#include <iostream>
#include <sstream>
#include "GmshSocket.h"
namespace onelab{
// The base parameter class.
class parameter {
private:
// the name of the parameter, including its '/'-separated path in the
// parameter hierarchy. Parameters or subpaths can start with numbers to
// force their relative ordering (such numbers are automatically hidden in
// the interface). All strings in onelab are supposed to be UTF8-encoded.
std::string _name;
// the parameter label: if provided it serves as a better way to display the
// parameter in the interface
std::string _label;
// a help string
std::string _help;
// map of clients that use this parameter, associated with a "changed" flag
// (set to false if the client has already been run with the current value of
// the parameter)
std::map<std::string, bool> _clients;
// flag indicating that the "changed" flags of this parameter will always be
// reset to false when the parameter is updated
bool _neverChanged;
// should the parameter be visible in the interface?
bool _visible;
// sould the paramete be "read-only" (not settable by the user)
bool _readOnly;
protected:
// optional additional attributes
std::map<std::string, std::string> _attributes;
public: