22 #ifndef UniSetManager_H_
23 #define UniSetManager_H_
25 #include <omniORB4/CORBA.h>
27 #include "UniSetTypes.h"
28 #include "UniSetObject.h"
29 #include "UniSetManager_i.hh"
34 class UniSetActivator;
37 typedef std::list< std::shared_ptr<UniSetManager> > UniSetManagerList;
59 public POA_UniSetManager_i
63 UniSetManager(
const std::string& name,
const std::string& section );
73 virtual uniset::SimpleInfoSeq* getObjectsInfo( CORBA::Long MaxLength = 300,
const char* userparam = 0 )
override ;
76 virtual bool add(
const std::shared_ptr<UniSetObject>& obj );
77 virtual bool remove(
const std::shared_ptr<UniSetObject>& obj );
79 size_t objectsCount()
const;
82 PortableServer::POA_ptr getPOA();
83 PortableServer::POAManager_ptr getPOAManager();
84 std::shared_ptr<UniSetManager> get_mptr();
90 virtual bool addManager(
const std::shared_ptr<UniSetManager>& mngr );
91 virtual bool removeManager(
const std::shared_ptr<UniSetManager>& mngr );
92 virtual bool addObject(
const std::shared_ptr<UniSetObject>& obj );
93 virtual bool removeObject(
const std::shared_ptr<UniSetObject>& obj );
95 enum OManagerCommand { deactiv, activ, initial };
96 friend std::ostream& operator<<( std::ostream& os, uniset::UniSetManager::OManagerCommand& cmd );
99 void objects(OManagerCommand cmd);
103 void initPOA(
const std::weak_ptr<UniSetManager>& rmngr );
110 const std::shared_ptr<UniSetObject> findObject(
const std::string& name )
const;
111 const std::shared_ptr<UniSetManager> findManager(
const std::string& name )
const;
114 const std::shared_ptr<UniSetObject> deepFindObject(
const std::string& name )
const;
117 void getAllObjectsList(std::vector<std::shared_ptr<UniSetObject> >& vec,
size_t lim = 1000 );
119 typedef UniSetManagerList::iterator MListIterator;
121 int getObjectsInfo(
const std::shared_ptr<UniSetManager>& mngr, uniset::SimpleInfoSeq* seq,
122 int begin,
const long uplimit,
const char* userparam );
124 PortableServer::POA_var poa;
125 PortableServer::POAManager_var pman;
129 typedef std::function<void(
const std::shared_ptr<UniSetObject>&)> OFunction;
130 void apply_for_objects( OFunction f );
132 typedef std::function<void(
const std::shared_ptr<UniSetManager>&)> MFunction;
133 void apply_for_managers( MFunction f );
137 UniSetManagerList mlist;
Definition: UniSetManager.h:60
void managers(OManagerCommand cmd)
Definition: UniSetManager.cc:244
void objects(OManagerCommand cmd)
Definition: UniSetManager.cc:342
virtual bool deactivateObject() override
Definition: UniSetManager.cc:454
virtual bool activateObject() override
Definition: UniSetManager.cc:441
Definition: UniSetObject.h:80
Definition: CommonEventLoop.h:15
std::list< std::shared_ptr< UniSetObject > > ObjectsList
Definition: UniSetObject.h:54
string< SizeOfObjectType > ObjectType
Definition: UniSetTypes_i.idl:33
long ObjectId
Definition: UniSetTypes_i.idl:30
Definition: UniSetTypes_i.idl:45