Quick Links:

bal | bbl | bdl | bsl

Public Member Functions | Friends

balb::FileCleanerConfiguration Class Reference

#include <balb_filecleanerconfiguration.h>

List of all members.

Public Member Functions

 BSLMF_NESTED_TRAIT_DECLARATION (FileCleanerConfiguration, bslma::UsesBslmaAllocator)
 FileCleanerConfiguration (bslma::Allocator *basicAllocator=0)
 FileCleanerConfiguration (const bsl::string_view &filePattern, const bsls::TimeInterval &maxAge, int minNumber, bslma::Allocator *basicAllocator=0)
 FileCleanerConfiguration (const FileCleanerConfiguration &original, bslma::Allocator *basicAllocator=0)
 ~FileCleanerConfiguration ()
FileCleanerConfigurationoperator= (const FileCleanerConfiguration &rhs)
void setFilePattern (const bsl::string_view &filePattern)
void setMaxFileAge (const bsls::TimeInterval &maxAge)
void setMinNumFiles (int minNumber)
const bsl::stringfilePattern () const
bsls::TimeInterval maxFileAge () const
int minNumFiles () const
bsl::ostream & print (bsl::ostream &stream, int level=0, int spacesPerLevel=4) const

Friends

bool operator== (const FileCleanerConfiguration &, const FileCleanerConfiguration &)

Detailed Description

This simply constrained (value-semantic) attribute class characterizes configuration parameters for a file cleaner. See the Attributes section under @DESCRIPTION in the component-level documentation for information on the class attributes. Note that the class invariants are identically the constraints on the individual attributes.

This class:

For terminology see bsldoc_glossary.

See Component balb_filecleanerconfiguration


Constructor & Destructor Documentation

balb::FileCleanerConfiguration::FileCleanerConfiguration ( bslma::Allocator basicAllocator = 0  )  [explicit]

Create a file cleaner configuration object having default values for all attributes. Optionally specify a basicAllocator used to supply memory. If basicAllocator is 0, the currently installed default allocator is used.

balb::FileCleanerConfiguration::FileCleanerConfiguration ( const bsl::string_view &  filePattern,
const bsls::TimeInterval maxAge,
int  minNumber,
bslma::Allocator basicAllocator = 0 
)

Create a file cleaner configuration object having the specified filePattern, maxAge, and minNumber attribute values. Optionally specify a basicAllocator used to supply memory. If basicAllocator is 0, the currently installed default allocator is used.

balb::FileCleanerConfiguration::FileCleanerConfiguration ( const FileCleanerConfiguration original,
bslma::Allocator basicAllocator = 0 
)

Create a file cleaner configuration object having the in-core value of the specified original object. Optionally specify a basicAllocator used to supply memory. If basicAllocator is 0, the currently installed default allocator is used.

balb::FileCleanerConfiguration::~FileCleanerConfiguration (  ) 

Destroy this object.


Member Function Documentation

balb::FileCleanerConfiguration::BSLMF_NESTED_TRAIT_DECLARATION ( FileCleanerConfiguration  ,
bslma::UsesBslmaAllocator   
)
FileCleanerConfiguration& balb::FileCleanerConfiguration::operator= ( const FileCleanerConfiguration rhs  ) 

Assign to this file cleaner configuration object the in-core value of the specified rhs object, and return a reference providing modifiable access to this object.

void balb::FileCleanerConfiguration::setFilePattern ( const bsl::string_view &  filePattern  ) 

Set the file pattern attribute of this object to the specified filePattern.

void balb::FileCleanerConfiguration::setMaxFileAge ( const bsls::TimeInterval maxAge  ) 

Set the maximum file age attribute of this object to the specified maxAge.

void balb::FileCleanerConfiguration::setMinNumFiles ( int  minNumber  ) 

Set the minimum number of files to keep attribute of this object to the specified minNumber.

const bsl::string& balb::FileCleanerConfiguration::filePattern (  )  const

Return a const reference to the file pattern attribute of this object.

bsls::TimeInterval balb::FileCleanerConfiguration::maxFileAge (  )  const

Return the maximum file age attribute of this object.

int balb::FileCleanerConfiguration::minNumFiles (  )  const

Return the minimum number of files to keep attribute of this object.

bsl::ostream& balb::FileCleanerConfiguration::print ( bsl::ostream &  stream,
int  level = 0,
int  spacesPerLevel = 4 
) const

Format a reasonable representation of this object to the specified output stream at the (absolute value of) the optionally specified indentation level and return a reference to stream. If level is specified, optionally specify spacesPerLevel, the number of spaces per indentation level for this and all of its nested objects. If level is negative, suppress indentation of the first line. If spacesPerLevel is negative, suppress all indentation AND format the entire output on one line. If stream is not valid on entry, this operation has no effect.


Friends And Related Function Documentation

bool operator== ( const FileCleanerConfiguration ,
const FileCleanerConfiguration  
) [friend]

Return true if the specified lhs and rhs attribute objects have the same (in-core) value, and false otherwise. Two attribute objects have the same in-core value if each respective attribute has the same in-core value.


The documentation for this class was generated from the following file: