Skip to content

Commit 2824c8a

Browse files
committed
CXX-376 Strip MONGO_CLIENT_(FUNC|API) macros from non-exported headers
1 parent f7ec61b commit 2824c8a

File tree

7 files changed

+19
-19
lines changed

7 files changed

+19
-19
lines changed

src/mongo/base/initializer.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ namespace mongo {
3434
* edges to the graph. Then, one executes the process, causing each initialization operation to
3535
* execute in an order that respects the programmer-established prerequistes.
3636
*/
37-
class MONGO_CLIENT_API Initializer {
37+
class Initializer {
3838
MONGO_DISALLOW_COPYING(Initializer);
3939
public:
4040
Initializer();
@@ -68,18 +68,18 @@ namespace mongo {
6868
* This means that the few initializers that might want to terminate the program by failing
6969
* should probably arrange to terminate the process themselves.
7070
*/
71-
MONGO_CLIENT_API Status MONGO_CLIENT_FUNC runGlobalInitializers(
71+
Status runGlobalInitializers(
7272
const InitializerContext::ArgumentVector& args,
7373
const InitializerContext::EnvironmentMap& env);
7474

75-
MONGO_CLIENT_API Status MONGO_CLIENT_FUNC runGlobalInitializers(
75+
Status runGlobalInitializers(
7676
int argc, const char* const* argv, const char* const* envp);
7777

7878
/**
7979
* Same as runGlobalInitializers(), except prints a brief message to std::cerr
8080
* and terminates the process on failure.
8181
*/
82-
MONGO_CLIENT_API void MONGO_CLIENT_FUNC runGlobalInitializersOrDie(
82+
void runGlobalInitializersOrDie(
8383
int argc, const char* const* argv, const char* const* envp);
8484

8585
} // namespace mongo

src/mongo/client/cyrus_sasl_client_session.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ namespace mongo {
2323
* Implementation of the client side of a SASL authentication conversation.
2424
* using the Cyrus SASL library.
2525
*/
26-
class MONGO_CLIENT_API CyrusSaslClientSession : public SaslClientSession {
26+
class CyrusSaslClientSession : public SaslClientSession {
2727
MONGO_DISALLOW_COPYING(CyrusSaslClientSession);
2828
public:
2929

src/mongo/client/dbclientmockcursor.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222

2323
namespace mongo {
2424

25-
class MONGO_CLIENT_API DBClientMockCursor : public DBClientCursorInterface {
25+
class DBClientMockCursor : public DBClientCursorInterface {
2626
public:
2727
DBClientMockCursor( const BSONArray& mockCollection ) : _iter( mockCollection ) {}
2828
virtual ~DBClientMockCursor() {}

src/mongo/client/native_sasl_client_session.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ namespace mongo {
2525
* Implementation of the client side of a SASL authentication conversation using the
2626
* native SASL implementation.
2727
*/
28-
class MONGO_CLIENT_API NativeSaslClientSession : public SaslClientSession {
28+
class NativeSaslClientSession : public SaslClientSession {
2929
MONGO_DISALLOW_COPYING(NativeSaslClientSession);
3030
public:
3131

src/mongo/client/replica_set_monitor.h

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ namespace mongo {
3535
* Holds state about a replica set and provides a means to refresh the local view.
3636
* All methods perform the required synchronization to allow callers from multiple threads.
3737
*/
38-
class MONGO_CLIENT_API ReplicaSetMonitor {
38+
class ReplicaSetMonitor {
3939
MONGO_DISALLOW_COPYING(ReplicaSetMonitor);
4040
public:
4141
class Refresher;
@@ -126,26 +126,26 @@ namespace mongo {
126126
/**
127127
* Creates a new ReplicaSetMonitor, if it doesn't already exist.
128128
*/
129-
static void MONGO_CLIENT_FUNC createIfNeeded(const std::string& name , const std::set<HostAndPort>& servers);
129+
static void createIfNeeded(const std::string& name , const std::set<HostAndPort>& servers);
130130

131131
/**
132132
* gets a cached Monitor per name. If the monitor is not found and createFromSeed is false,
133133
* it will return none. If createFromSeed is true, it will try to look up the last known
134134
* servers list for this set and will create a new monitor using that as the seed list.
135135
*/
136-
static ReplicaSetMonitorPtr MONGO_CLIENT_FUNC get(const std::string& name, bool createFromSeed = false);
136+
static ReplicaSetMonitorPtr get(const std::string& name, bool createFromSeed = false);
137137

138138
/**
139139
* Returns all the currently tracked replica set names.
140140
*/
141-
static std::set<std::string> MONGO_CLIENT_FUNC getAllTrackedSets();
141+
static std::set<std::string> getAllTrackedSets();
142142

143143
/**
144144
* Removes the ReplicaSetMonitor for the given set name from _sets, which will delete it.
145145
* If clearSeedCache is true, then the cached seed string for this Replica Set will be
146146
* removed from _seedServers.
147147
*/
148-
static void MONGO_CLIENT_FUNC remove(const std::string& name, bool clearSeedCache = false);
148+
static void remove(const std::string& name, bool clearSeedCache = false);
149149

150150
/**
151151
* Sets the hook to be called whenever the config of any replica set changes.
@@ -156,15 +156,15 @@ namespace mongo {
156156
*
157157
* The hook must not be changed while the program has multiple threads.
158158
*/
159-
static void MONGO_CLIENT_FUNC setConfigChangeHook(ConfigChangeHook hook);
159+
static void setConfigChangeHook(ConfigChangeHook hook);
160160

161161
/**
162162
* Starts the ReplicaSetMonitorWatcher. You shouldn't have to call this in production code
163163
* as it is called in init.cpp. However, it may be useful to pair calls to initalize
164164
* and cleanup in tests. The behavior of other methods in this class is undefined if initialize()
165165
* has not been called.
166166
*/
167-
static Status MONGO_CLIENT_FUNC initialize();
167+
static Status initialize();
168168

169169
/**
170170
* Permanently stops all monitoring on replica sets and clears all cached information
@@ -176,7 +176,7 @@ namespace mongo {
176176
* of 0 (the default) indicates no timeout. If a nonzero timeout is specified, a return value
177177
* of Status::OK() indicates that shutdown completed successfully in the allotted time.
178178
*/
179-
static Status MONGO_CLIENT_FUNC shutdown(int gracePeriodMillis = 0);
179+
static Status shutdown(int gracePeriodMillis = 0);
180180

181181
/**
182182
* If a ReplicaSetMonitor has been refreshed more than this many times in a row without
@@ -228,7 +228,7 @@ namespace mongo {
228228
* All logic related to choosing the hosts to contact and updating the SetState based on replies
229229
* lives in this class.
230230
*/
231-
class MONGO_CLIENT_API ReplicaSetMonitor::Refresher {
231+
class ReplicaSetMonitor::Refresher {
232232
public:
233233
/**
234234
* Contact hosts in the set to refresh our view, but stop once a host matches criteria.
@@ -303,7 +303,7 @@ namespace mongo {
303303
/**
304304
* Starts a new scan over the hosts in set.
305305
*/
306-
static ScanStatePtr MONGO_CLIENT_FUNC startNewScan(const SetState* set);
306+
static ScanStatePtr startNewScan(const SetState* set);
307307

308308
private:
309309
/**

src/mongo/client/sasl_client_session.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ namespace mongo {
3939
* parameters must be UTF-8 encoded strings with no embedded NUL characters. The
4040
* parameterPassword parameter is not constrained.
4141
*/
42-
class MONGO_CLIENT_API SaslClientSession {
42+
class SaslClientSession {
4343
MONGO_DISALLOW_COPYING(SaslClientSession);
4444
public:
4545
typedef stdx::function<SaslClientSession* (const std::string&)> SaslClientSessionFactoryFn;

src/mongo/util/timer.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ namespace mongo {
3232
* 2.5 years will be supported. Since a typical tick duration will be under 10 per nanosecond,
3333
* if not below 1 per nanosecond, this should not be an issue.
3434
*/
35-
class MONGO_CLIENT_API Timer /*copyable*/ {
35+
class Timer /*copyable*/ {
3636
public:
3737
static const long long millisPerSecond = 1000;
3838
static const long long microsPerSecond = 1000 * millisPerSecond;

0 commit comments

Comments
 (0)