3 //=============================================================================
5 * @file UpdateableServerInfo.h
8 //=============================================================================
10 #ifndef UPDATEABLE_SERVER_INFO_H
11 #define UPDATEABLE_SERVER_INFO_H
13 #include "Server_Info.h"
14 #include "ImR_LocatorC.h"
16 class Locator_Repository
;
17 typedef ACE_Strong_Bound_Ptr
<Locator_Repository
, ACE_Null_Mutex
> Repository_Ptr
;
20 * @class UpdateableServerInfo
22 * @brief Class for managing changes to ServerInfo memory to ensure
25 class UpdateableServerInfo
29 /// @param repo the repo to report updates to
30 /// @param name the name of the server to retrieve
31 /// @param pid an optional process id to further discriminate the server
32 UpdateableServerInfo(const Repository_Ptr
& repo
,
33 const ACE_CString
& name
,
37 /// @param repo the repo to report updates to
38 /// @param si an already retrieved Server_Info_Ptr
39 /// @param reset_start_count controls the reset of the start count value
40 UpdateableServerInfo(const Repository_Ptr
& repo
,
41 const Server_Info_Ptr
& si
,
42 bool reset_start_count
= false);
44 UpdateableServerInfo(UpdateableServerInfo
& other
);
46 /// Destructor (updates repo if needed)
47 ~UpdateableServerInfo(void);
49 /// Explicitly update repo if needed
50 void update_repo(void);
52 /// Update remote access state
53 void notify_remote_access (ImplementationRepository::AAM_Status state
);
55 /// Assign a server info
56 void server_info (const Server_Info_Ptr
& si
);
58 /// const Server_Info access
59 const Server_Info
* operator->() const;
61 /// const Server_Info& access
62 const Server_Info
& operator*() const;
64 /// Retrieve smart pointer to non-const Server_Info
65 /// and indicate repo update required
66 const Server_Info_Ptr
& edit(bool active
= true);
68 /// Indicate it Server_Info_Ptr is null
69 bool null(void) const;
72 const UpdateableServerInfo
& operator=(const UpdateableServerInfo
& );
77 /// The retrieved, passed, or non-stored server info
80 /// The server info has changes and needs to be updated to the repo
84 #endif /* UPDATEABLE_SERVER_INFO_H */