UniSet  2.6.0
ORepHelpers.h
1 /*
2  * Copyright (c) 2015 Pavel Vainerman.
3  *
4  * This program is free software: you can redistribute it and/or modify
5  * it under the terms of the GNU Lesser General Public License as
6  * published by the Free Software Foundation, version 2.1.
7  *
8  * This program is distributed in the hope that it will be useful, but
9  * WITHOUT ANY WARRANTY; without even the implied warranty of
10  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11  * Lesser General Lesser Public License for more details.
12  *
13  * You should have received a copy of the GNU Lesser General Public License
14  * along with this program. If not, see <http://www.gnu.org/licenses/>.
15  */
16 // --------------------------------------------------------------------------
20 // --------------------------------------------------------------------------
21 #ifndef ORepHelpers_H_
22 #define ORepHelpers_H_
23 // --------------------------------------------------------------------------
24 #include <omniORB4/CORBA.h>
25 #include <omniORB4/Naming.hh>
26 #include <string>
27 #include "Exceptions.h"
28 // -----------------------------------------------------------------------------------------
29 namespace uniset
30 {
35  namespace ORepHelpers
36  {
38  CosNaming::NamingContext_ptr getRootNamingContext( const CORBA::ORB_ptr orb,
39  const std::string& nsName, int timeOutSec = 2);
40 
42  CosNaming::NamingContext_ptr getContext(const std::string& cname, int argc,
43  const char* const* argv, const std::string& nsName)
44  throw(uniset::ORepFailed);
45 
46  CosNaming::NamingContext_ptr getContext(const CORBA::ORB_ptr orb, const std::string& cname,
47  const std::string& nsName)
48  throw(uniset::ORepFailed);
49 
51  const std::string getSectionName(const std::string& fullName, const std::string& brk = "/");
52 
54  const std::string getShortName(const std::string& fullName, const std::string& brk = "/");
55 
56 
58  char checkBadSymbols(const std::string& str);
59 
61  std::string BadSymbolsToStr();
62 
63  }
64  // -------------------------------------------------------------------------
65 } // end of uniset namespace
66 // -----------------------------------------------------------------------------------------
67 #endif
68 // -----------------------------------------------------------------------------------------
Definition: CallbackTimer.h:29
Definition: Exceptions.h:78