BDE 4.14.0 Production release
Loading...
Searching...
No Matches
balb::FileCleanerConfiguration Class Reference

#include <balb_filecleanerconfiguration.h>

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 ()=default
 
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
 Return the maximum file age attribute of this object.
 
int minNumFiles () const
 Return the minimum number of files to keep attribute of this object.
 
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:

  • supports a complete set of value-semantic operations
    • except for bdex serialization
  • is exception-neutral (agnostic)
  • is alias-safe
  • is const thread-safe For terminology see bsldoc_glossary .

See balb_filecleanerconfiguration

Constructor & Destructor Documentation

◆ FileCleanerConfiguration() [1/3]

balb::FileCleanerConfiguration::FileCleanerConfiguration ( bslma::Allocator basicAllocator = 0)
inlineexplicit

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.

◆ FileCleanerConfiguration() [2/3]

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

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.

◆ FileCleanerConfiguration() [3/3]

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

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.

◆ ~FileCleanerConfiguration()

balb::FileCleanerConfiguration::~FileCleanerConfiguration ( )
default

Member Function Documentation

◆ BSLMF_NESTED_TRAIT_DECLARATION()

balb::FileCleanerConfiguration::BSLMF_NESTED_TRAIT_DECLARATION ( FileCleanerConfiguration  ,
bslma::UsesBslmaAllocator   
)

◆ filePattern()

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

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

◆ maxFileAge()

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

◆ minNumFiles()

int balb::FileCleanerConfiguration::minNumFiles ( ) const
inline

◆ operator=()

FileCleanerConfiguration & balb::FileCleanerConfiguration::operator= ( const FileCleanerConfiguration rhs)
inline

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.

◆ print()

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.

◆ setFilePattern()

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

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

◆ setMaxFileAge()

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

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

◆ setMinNumFiles()

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

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

Friends And Related Symbol Documentation

◆ operator==

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: