// IOTF_Client constructors and methods //IOTP_Client::IOTP_Client(Properties& prop, Watson_IOTP::IOTP_DeviceInfo* deviceInfo, IOTP_Client::IOTP_Client(Properties& prop, iotp_device_action_handler_ptr& actionHandler, iotp_device_firmware_handler_ptr& firmwareHandler, std::string logPropertiesFile): mServerURI(""),mClientID("") { log4cpp::PropertyConfigurator::configure(logPropertiesFile); std::string methodName = __PRETTY_FUNCTION__; logger.debug(methodName+" Entry: "); InitializeProperties(prop); mActionHandler = actionHandler; mFirmwareHandler = firmwareHandler; //Dump properties to log file dumpProperties(); logger.debug(methodName+" Exit: "); }
void GraphicsLayer::dumpLayer(TextStream& ts, int indent, LayerTreeAsTextBehavior behavior) const { writeIndent(ts, indent); ts << "(" << "GraphicsLayer"; if (behavior & LayerTreeAsTextDebug) { ts << " " << static_cast<void*>(const_cast<GraphicsLayer*>(this)); ts << " \"" << m_name << "\""; } ts << "\n"; dumpProperties(ts, indent, behavior); writeIndent(ts, indent); ts << ")\n"; }
void ScrollingStateNode::dump(TextStream& ts, int indent, ScrollingStateTreeAsTextBehavior behavior) const { writeIndent(ts, indent); dumpProperties(ts, indent, behavior); if (m_children) { writeIndent(ts, indent + 1); ts << "(children " << children()->size() << "\n"; for (auto& child : *m_children) child->dump(ts, indent + 2, behavior); writeIndent(ts, indent + 1); ts << ")\n"; } writeIndent(ts, indent); ts << ")\n"; }
void ScrollingStateNode::dump(TextStream& ts, int indent) const { writeIndent(ts, indent); dumpProperties(ts, indent); if (m_children) { writeIndent(ts, indent + 1); size_t size = children()->size(); ts << "(children " << size << "\n"; for (size_t i = 0; i < size; i++) m_children->at(i)->dump(ts, indent + 2); writeIndent(ts, indent + 1); ts << ")\n"; } writeIndent(ts, indent); ts << ")\n"; }
// IOTP_Client constructor using a properties file IOTP_Client::IOTP_Client(const std::string& filePath, std::string logPropertiesFile): mServerURI(""),mClientID("") { log4cpp::PropertyConfigurator::configure(logPropertiesFile); std::string methodName = __PRETTY_FUNCTION__; logger.debug(methodName+" Entry: "); if(InitializePropertiesFromFile(filePath,mProperties)) { mExit = false; mReqCounter = 0; mActionHandler = nullptr; mFirmwareHandler = nullptr; mResponseHandler = std::make_shared<IOTP_ResponseHandler> (); mReplyThread = std::thread(&IOTP_Client::_send_reply, this); mKeepAliveInterval = 60; //Dump properties to log file dumpProperties(); } else { console.error("Failed parsing configuration values from file: "+filePath); } logger.debug(methodName+" Exit: "); }