# FederateLevelList.hh

Go to the documentation of this file.

    00001 // ----------------------------------------------------------------------------
    00002 // CERTI - HLA RunTime Infrastructure
    00003 // Copyright (C) 2002-2005  ONERA
    00004 //
    00005 // This program is free software ; you can redistribute it and/or
    00006 // modify it under the terms of the GNU Lesser General Public License
    00007 // as published by the Free Software Foundation ; either version 2 of
    00008 // the License, or (at your option) any later version.
    00009 //
    00010 // This program is distributed in the hope that it will be useful, but
    00011 // WITHOUT ANY WARRANTY ; without even the implied warranty of
    00012 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
    00013 // Lesser General Public License for more details.
    00014 //
    00015 // You should have received a copy of the GNU Lesser General Public
    00016 // License along with this program ; if not, write to the Free Software
    00017 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
    00018 // USA
    00019 //
    00020 // $Id: FederateLevelList.hh,v 3.10 2005/04/05 19:28:22 breholee Exp $
    00021 // ----------------------------------------------------------------------------
    00022
    00023 #ifndef CERTI_FEDERATE_LEVEL_LIST_HH
    00024 #define CERTI_FEDERATE_LEVEL_LIST_HH
    00025
    00026 #include "SecurityLevel.hh"
    00027
    00028 #include <map>
    00029 #include <string>
    00030
    00031 namespace certi {
    00032
    00033 class FederateLevelList
    00034 {
    00035 public:
    00036     FederateLevelList();
    00037     ~FederateLevelList();
    00038
    00039     void addFederate(const std::string &the_name,
    00040              SecurityLevelID the_level_id);
    00041
    00042     // Try to find the given principal name in the database, and return
    00043     // its associated level. If not found, return PublicLevelID.
    00044     SecurityLevelID getLevel(const std::string &theName) const ;
    00045
    00046 protected:
    00047     std::map<std::string, SecurityLevelID> tuple ;
    00048 };
    00049
    00050 } // namespace certi
    00051
    00052 #endif // CERTI_FEDERATE_LEVEL_LIST_HH
    00053
    00054 // $Id: FederateLevelList.hh,v 3.10 2005/04/05 19:28:22 breholee Exp $