Skip to content

Commit

Permalink
2010-06-21 Tatsuhiro Tsujikawa <[email protected]>
Browse files Browse the repository at this point in the history
	Changed naming standards for class member variable: now it looks
	like var_ instead of _var.
  • Loading branch information
tatsuhiro-t committed Jun 21, 2010
1 parent ae957ba commit ca49406
Show file tree
Hide file tree
Showing 550 changed files with 10,270 additions and 10,265 deletions.
5 changes: 5 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
2010-06-21 Tatsuhiro Tsujikawa <[email protected]>

Changed naming standards for class member variable: now it looks
like var_ instead of _var.

2010-06-20 Tatsuhiro Tsujikawa <[email protected]>

When wrong type DHT reply message is received for a transaction
Expand Down
4 changes: 2 additions & 2 deletions src/AbstractAuthResolver.cc
Original file line number Diff line number Diff line change
Expand Up @@ -43,12 +43,12 @@ AbstractAuthResolver::~AbstractAuthResolver() {}

void AbstractAuthResolver::setUserDefinedAuthConfig(const AuthConfigHandle& authConfig)
{
_userDefinedAuthConfig = authConfig;
userDefinedAuthConfig_ = authConfig;
}

void AbstractAuthResolver::setDefaultAuthConfig(const AuthConfigHandle& authConfig)
{
_defaultAuthConfig = authConfig;
defaultAuthConfig_ = authConfig;
}

} // namespace aria2
8 changes: 4 additions & 4 deletions src/AbstractAuthResolver.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,9 @@ namespace aria2 {

class AbstractAuthResolver : public AuthResolver {
private:
SharedHandle<AuthConfig> _userDefinedAuthConfig;
SharedHandle<AuthConfig> userDefinedAuthConfig_;

SharedHandle<AuthConfig> _defaultAuthConfig;
SharedHandle<AuthConfig> defaultAuthConfig_;
public:
AbstractAuthResolver();

Expand All @@ -53,14 +53,14 @@ class AbstractAuthResolver : public AuthResolver {

const SharedHandle<AuthConfig>& getUserDefinedAuthConfig() const
{
return _userDefinedAuthConfig;
return userDefinedAuthConfig_;
}

void setDefaultAuthConfig(const SharedHandle<AuthConfig>& authConfig);

const SharedHandle<AuthConfig>& getDefaultAuthConfig() const
{
return _defaultAuthConfig;
return defaultAuthConfig_;
}

};
Expand Down
32 changes: 16 additions & 16 deletions src/AbstractBtMessage.cc
Original file line number Diff line number Diff line change
Expand Up @@ -43,59 +43,59 @@ namespace aria2 {

AbstractBtMessage::AbstractBtMessage(uint8_t id, const std::string& name):
BtMessage(id),
_sendingInProgress(false),
_invalidate(false),
_uploading(false),
_cuid(0),
_name(name),
_metadataGetMode(false),
_logger(LogFactory::getInstance())
sendingInProgress_(false),
invalidate_(false),
uploading_(false),
cuid_(0),
name_(name),
metadataGetMode_(false),
logger_(LogFactory::getInstance())
{}

AbstractBtMessage::~AbstractBtMessage() {}

void AbstractBtMessage::setPeer(const SharedHandle<Peer>& peer)
{
_peer = peer;
peer_ = peer;
}

void AbstractBtMessage::validate()
{
if(!_validator.isNull()) {
_validator->validate();
if(!validator_.isNull()) {
validator_->validate();
}
}

void
AbstractBtMessage::setBtMessageValidator(const SharedHandle<BtMessageValidator>& validator) {
_validator = validator;
validator_ = validator;
}

void AbstractBtMessage::setPieceStorage
(const SharedHandle<PieceStorage>& pieceStorage)
{
_pieceStorage = pieceStorage;
pieceStorage_ = pieceStorage;
}

void AbstractBtMessage::setBtMessageDispatcher
(const WeakHandle<BtMessageDispatcher>& dispatcher)
{
_dispatcher = dispatcher;
dispatcher_ = dispatcher;
}

void AbstractBtMessage::setPeerConnection(const WeakHandle<PeerConnection>& peerConnection)
{
_peerConnection = peerConnection;
peerConnection_ = peerConnection;
}

void AbstractBtMessage::setBtMessageFactory(const WeakHandle<BtMessageFactory>& factory)
{
_messageFactory = factory;
messageFactory_ = factory;
}

void AbstractBtMessage::setBtRequestFactory(const WeakHandle<BtRequestFactory>& factory)
{
_requestFactory = factory;
requestFactory_ = factory;
}

} // namespace aria2
64 changes: 32 additions & 32 deletions src/AbstractBtMessage.h
Original file line number Diff line number Diff line change
Expand Up @@ -51,105 +51,105 @@ class Logger;

class AbstractBtMessage : public BtMessage {
private:
bool _sendingInProgress;
bool _invalidate;
bool _uploading;
cuid_t _cuid;
bool sendingInProgress_;
bool invalidate_;
bool uploading_;
cuid_t cuid_;

std::string _name;
std::string name_;

SharedHandle<PieceStorage> _pieceStorage;
SharedHandle<PieceStorage> pieceStorage_;

SharedHandle<Peer> _peer;
SharedHandle<Peer> peer_;

WeakHandle<BtMessageDispatcher> _dispatcher;
WeakHandle<BtMessageDispatcher> dispatcher_;

WeakHandle<BtMessageFactory> _messageFactory;
WeakHandle<BtMessageFactory> messageFactory_;

WeakHandle<BtRequestFactory> _requestFactory;
WeakHandle<BtRequestFactory> requestFactory_;

WeakHandle<PeerConnection> _peerConnection;
WeakHandle<PeerConnection> peerConnection_;

SharedHandle<BtMessageValidator> _validator;
SharedHandle<BtMessageValidator> validator_;

bool _metadataGetMode;
bool metadataGetMode_;

Logger* _logger;
Logger* logger_;
protected:
Logger* getLogger() const
{
return _logger;
return logger_;
}

const SharedHandle<PieceStorage>& getPieceStorage() const
{
return _pieceStorage;
return pieceStorage_;
}

const WeakHandle<PeerConnection>& getPeerConnection() const
{
return _peerConnection;
return peerConnection_;
}

const WeakHandle<BtMessageDispatcher>& getBtMessageDispatcher() const
{
return _dispatcher;
return dispatcher_;
}

const WeakHandle<BtRequestFactory>& getBtRequestFactory() const
{
return _requestFactory;
return requestFactory_;
}

const WeakHandle<BtMessageFactory>& getBtMessageFactory() const
{
return _messageFactory;
return messageFactory_;
}

bool isMetadataGetMode() const
{
return _metadataGetMode;
return metadataGetMode_;
}
public:
AbstractBtMessage(uint8_t id, const std::string& name);

virtual ~AbstractBtMessage();

virtual bool isSendingInProgress() {
return _sendingInProgress;
return sendingInProgress_;
}

void setSendingInProgress(bool sendingInProgress) {
_sendingInProgress = sendingInProgress;
sendingInProgress_ = sendingInProgress;
}

virtual bool isInvalidate() {
return _invalidate;
return invalidate_;
}

void setInvalidate(bool invalidate) {
_invalidate = invalidate;
invalidate_ = invalidate;
}

virtual bool isUploading() {
return _uploading;
return uploading_;
}

void setUploading(bool uploading) {
_uploading = uploading;
uploading_ = uploading;
}

cuid_t getCuid() const {
return _cuid;
return cuid_;
}

void setCuid(cuid_t cuid) {
_cuid = cuid;
cuid_ = cuid;
}

const SharedHandle<Peer>& getPeer() const
{
return _peer;
return peer_;
}

void setPeer(const SharedHandle<Peer>& peer);
Expand Down Expand Up @@ -183,12 +183,12 @@ class AbstractBtMessage : public BtMessage {

const std::string& getName() const
{
return _name;
return name_;
}

void enableMetadataGetMode()
{
_metadataGetMode = true;
metadataGetMode_ = true;
}
};

Expand Down
Loading

0 comments on commit ca49406

Please sign in to comment.