LibreOffice Module desktop (master) 1
Public Member Functions | Private Attributes | List of all members
desktop::CallbackFlushHandler::CallbackData Struct Reference

Public Member Functions

 CallbackData (OString payload)
 
 CallbackData (OString payload, int viewId)
 
 CallbackData (const tools::Rectangle *pRect, int viewId)
 
 CallbackData (const tools::Rectangle *pRect, int part, int mode)
 
const OString & getPayload () const
 
void updateRectangleAndPart (const RectangleAndPart &rRectAndPart)
 Update a RectangleAndPart object and update PayloadString if necessary. More...
 
const RectangleAndPartgetRectangleAndPart () const
 Return the parsed RectangleAndPart instance. More...
 
boost::property_tree::ptree & setJson (const std::string &payload)
 Parse and set the JSON object and return it. Clobbers PayloadString. More...
 
void setJson (const boost::property_tree::ptree &rTree)
 Set a Json object and update PayloadString. More...
 
const boost::property_tree::ptree & getJson () const
 Return the parsed JSON instance. More...
 
int getViewId () const
 
bool isEmpty () const
 
void clear ()
 
bool validate () const
 Validate that the payload and parsed object match. More...
 
bool isCached () const
 Returns true iff there is cached data. More...
 

Private Attributes

OString PayloadString
 
boost::variant< boost::blank, RectangleAndPart, boost::property_tree::ptree, intPayloadObject
 The parsed payload cache. Update validate() when changing this. More...
 

Detailed Description

Definition at line 129 of file init.hxx.

Constructor & Destructor Documentation

◆ CallbackData() [1/4]

desktop::CallbackFlushHandler::CallbackData::CallbackData ( OString  payload)
inline

Definition at line 131 of file init.hxx.

◆ CallbackData() [2/4]

desktop::CallbackFlushHandler::CallbackData::CallbackData ( OString  payload,
int  viewId 
)
inline

Definition at line 136 of file init.hxx.

◆ CallbackData() [3/4]

desktop::CallbackFlushHandler::CallbackData::CallbackData ( const tools::Rectangle pRect,
int  viewId 
)
inline

Definition at line 142 of file init.hxx.

◆ CallbackData() [4/4]

desktop::CallbackFlushHandler::CallbackData::CallbackData ( const tools::Rectangle pRect,
int  part,
int  mode 
)
inline

Definition at line 147 of file init.hxx.

References mode.

Member Function Documentation

◆ clear()

void desktop::CallbackFlushHandler::CallbackData::clear ( )
inline

Definition at line 170 of file init.hxx.

◆ getJson()

const boost::property_tree::ptree & desktop::CallbackFlushHandler::CallbackData::getJson ( ) const

Return the parsed JSON instance.

Definition at line 667 of file init.cxx.

Referenced by desktop::CallbackFlushHandler::processWindowEvent().

◆ getPayload()

const OString & desktop::CallbackFlushHandler::CallbackData::getPayload ( ) const

◆ getRectangleAndPart()

const RectangleAndPart & desktop::CallbackFlushHandler::CallbackData::getRectangleAndPart ( ) const

Return the parsed RectangleAndPart instance.

Definition at line 635 of file init.cxx.

References desktop::RectangleAndPart::Create().

Referenced by getPayload(), and desktop::CallbackFlushHandler::processInvalidateTilesEvent().

◆ getViewId()

int desktop::CallbackFlushHandler::CallbackData::getViewId ( ) const

Definition at line 673 of file init.cxx.

References lcl_getViewId().

Referenced by desktop::CallbackFlushHandler::queue().

◆ isCached()

bool desktop::CallbackFlushHandler::CallbackData::isCached ( ) const
inline

Returns true iff there is cached data.

Definition at line 180 of file init.hxx.

◆ isEmpty()

bool desktop::CallbackFlushHandler::CallbackData::isEmpty ( ) const
inline

Definition at line 166 of file init.hxx.

Referenced by desktop::CallbackFlushHandler::queue().

◆ setJson() [1/2]

void desktop::CallbackFlushHandler::CallbackData::setJson ( const boost::property_tree::ptree &  rTree)

Set a Json object and update PayloadString.

Definition at line 657 of file init.cxx.

References o3tl::trim().

◆ setJson() [2/2]

boost::property_tree::ptree & desktop::CallbackFlushHandler::CallbackData::setJson ( const std::string &  payload)

Parse and set the JSON object and return it. Clobbers PayloadString.

Definition at line 644 of file init.cxx.

Referenced by desktop::CallbackFlushHandler::processWindowEvent().

◆ updateRectangleAndPart()

void desktop::CallbackFlushHandler::CallbackData::updateRectangleAndPart ( const RectangleAndPart rRectAndPart)

Update a RectangleAndPart object and update PayloadString if necessary.

Definition at line 629 of file init.cxx.

◆ validate()

bool desktop::CallbackFlushHandler::CallbackData::validate ( ) const

Validate that the payload and parsed object match.

Definition at line 683 of file init.cxx.

References lcl_getViewId().

Referenced by desktop::CallbackFlushHandler::processWindowEvent(), and desktop::CallbackFlushHandler::queue().

Member Data Documentation

◆ PayloadObject

boost::variant<boost::blank, RectangleAndPart, boost::property_tree::ptree, int> desktop::CallbackFlushHandler::CallbackData::PayloadObject
mutableprivate

The parsed payload cache. Update validate() when changing this.

Definition at line 186 of file init.hxx.

Referenced by getPayload().

◆ PayloadString

OString desktop::CallbackFlushHandler::CallbackData::PayloadString
mutableprivate

Definition at line 183 of file init.hxx.

Referenced by getPayload().


The documentation for this struct was generated from the following files: