proxygen
NoDiskPoller Class Reference
Inheritance diagram for NoDiskPoller:
wangle::FilePoller

Public Member Functions

 NoDiskPoller (TestFile &testFile)
 
- Public Member Functions inherited from wangle::FilePoller
 FilePoller (std::chrono::milliseconds pollInterval=kDefaultPollInterval)
 
virtual ~FilePoller ()
 
 FilePoller (const FilePoller &other)=delete
 
FilePolleroperator= (const FilePoller &other)=delete
 
 FilePoller (FilePoller &&other)=delete
 
FilePoller && operator= (FilePoller &&other)=delete
 
void addFileToTrack (const std::string &fileName, Cob yCob, Cob nCob=nullptr, Condition condition=fileTouchedCondInternal)
 
void removeFileToTrack (const std::string &fileName)
 
void stop ()
 

Protected Member Functions

FilePoller::FileModificationData getFileModData (const std::string &path) noexceptoverride
 

Private Attributes

TestFiletestFile_
 

Additional Inherited Members

- Public Types inherited from wangle::FilePoller
using Cob = std::function< void()>
 
using Condition = std::function< bool(const FileModificationData &, const FileModificationData &)>
 
- Static Public Member Functions inherited from wangle::FilePoller
static Condition fileTouchedWithinCond (std::chrono::seconds expireTime)
 
static Condition doAlwaysCond ()
 
static Condition fileTouchedCond ()
 

Detailed Description

Definition at line 157 of file FilePollerTest.cpp.

Constructor & Destructor Documentation

NoDiskPoller::NoDiskPoller ( TestFile testFile)
inlineexplicit

Definition at line 159 of file FilePollerTest.cpp.

160  : FilePoller(std::chrono::milliseconds(10)), testFile_(testFile) {}
FilePoller(std::chrono::milliseconds pollInterval=kDefaultPollInterval)
Definition: FilePoller.cpp:65
TestFile & testFile_

Member Function Documentation

FilePoller::FileModificationData NoDiskPoller::getFileModData ( const std::string path)
inlineoverrideprotectedvirtualnoexcept

Reimplemented from wangle::FilePoller.

Definition at line 164 of file FilePollerTest.cpp.

References EXPECT_EQ.

164  {
165  EXPECT_EQ(path, testFile_.name);
166  return testFile_.toFileModData();
167  }
#define EXPECT_EQ(val1, val2)
Definition: gtest.h:1922
const std::string name
TestFile & testFile_
FilePoller::FileModificationData toFileModData()

Member Data Documentation

TestFile& NoDiskPoller::testFile_
private

Definition at line 170 of file FilePollerTest.cpp.


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