GsmModule::GsmModule(QString path, QObject *parent) : AbstractSerialDevice(path, parent) { initMembers(); if (initSerial() < 0) emit occuredError(Serial_Open_Error); }
Favorite::Favorite(const class Favorite& aFav) { initMembers(); m_ID = aFav.m_ID; m_lat = aFav.m_lat; m_lon = aFav.m_lon; m_name = strdup_new(aFav.m_name); m_shortName = strdup_new(aFav.m_shortName); m_description = strdup_new(aFav.m_description); m_category = strdup_new(aFav.m_category); m_mapIconName = strdup_new(aFav.m_mapIconName); m_lmID = aFav.m_lmID; m_lmsID = strdup_new(aFav.m_lmsID); m_md5sum = new uint8[MAX_SIZE_MD5SUM]; if (aFav.m_md5sum != NULL) { memcpy(m_md5sum, aFav.m_md5sum, MAX_SIZE_MD5SUM); } else { memset(m_md5sum, '0', MAX_SIZE_MD5SUM); } m_synced = aFav.m_synced; m_infos.resize( aFav.m_infos.size() ); for ( uint32 i = 0 ; i < aFav.m_infos.size() ; ++i ) { m_infos[ i ] = new AdditionalInfo( *aFav.m_infos[ i ] ); } }
TcpSrvGui::TcpSrvGui(QWidget *parent) : QMainWindow(parent), sMSG("Message: "), sFILE("File: "), sSRV("srv: "), sCLI("cli: "), sBTS("Total bytes: "), pbListen(new QPushButton("Listen")), pbClose(new QPushButton("Close")), lbStatus(new QLabel("<status>")), lbMessage(new QLabel(sMSG)), lbFile(new QLabel(sFILE)), lbSrv(new QLabel(sSRV + "<addr>:<port>")), lbCli(new QLabel(sCLI + "<addr>:<port>")), lbBytes(new QLabel(sBTS + "0")), switcher(false), path("") { initMembers(); initForm(); initConnections(); }
GMSFerryItem::GMSFerryItem(GMSFerryItem* ferry) : OldFerryItem(), GMSItem(GMSItem::GDF) { initMembers(MAX_UINT32, false); m_node0 = NULL; m_node1 = NULL; copyAttributes(ferry); }
Cc3dMatrix4::Cc3dMatrix4(float a0,float a1,float a2,float a3,//col 1 float a4,float a5,float a6,float a7,//col2 float a8,float a9,float a10,float a11,//col3 float a12,float a13,float a14,float a15//col4 ){ initMembers(); init(a0,a1,a2,a3, a4,a5,a6,a7, a8,a9,a10,a11, a12,a13,a14,a15); }
GsmModuleController::GsmModuleController(QString devicePath, QString defaultTelNum, QObject *parent) : QObject(parent) { initMembers(&devicePath, &defaultTelNum); QObject::startTimer(10000); // The checking runs every 10 seconds, which is a bit long under normal // circumstances...Maybe should use different delay time depending on // different commands (CSQ is very quick, CMGS header is fine, and CMGS // message sending part might even take longer) }
bool LevelSelection::init() { if (!CCLayer::init()) { return false; } initMembers(); initBackground(); initMenu(); return true; }
void Coctree::destory(){ //销毁pIDtriExList中挂的各IDtriEx { int nIDtri=(int)m_pIDtriList.size(); for(int i=0;i<nIDtri;i++){ delete m_pIDtriList[i]; } } //销毁所有节点 destoryAllNode();//pRoot已置为NULL //清空pVisibleLeafList,pVisibleIDtriExList,pCollisionIDtriExList,pCollisionLeafList m_pVisibleLeafList.clear(); m_pVisibleIDtriList.clear(); //复位为默认初始值(必须放在最后,否则可能破坏其它的销毁工作) initMembers(); }
Favorite::Favorite( Buffer* buf, int convertToUTF8, int version ) : Serializable(buf) { initMembers(); m_synced = buf->readNext8bit(); m_ID = buf->readNextUnaligned32bit(); m_lat = buf->readNextUnaligned32bit(); m_lon = buf->readNextUnaligned32bit(); if (convertToUTF8) { m_name = UTF8Util::cleanUtf8(buf->getNextCharString()); m_shortName = UTF8Util::cleanUtf8(buf->getNextCharString()); m_description = UTF8Util::cleanUtf8(buf->getNextCharString()); m_category = UTF8Util::cleanUtf8(buf->getNextCharString()); m_mapIconName = UTF8Util::cleanUtf8(buf->getNextCharString()); } else { m_name = buf->getNextCharStringAlloc(); m_shortName = buf->getNextCharStringAlloc(); m_description = buf->getNextCharStringAlloc(); m_category = buf->getNextCharStringAlloc(); m_mapIconName = buf->getNextCharStringAlloc(); } if ( version >= 3 ) { uint32 nbrInfos = buf->readNextUnaligned32bit(); m_infos.resize( nbrInfos ); for ( uint32 i = 0 ; i < nbrInfos ; ++i ) { m_infos[ i ] = new AdditionalInfo( buf ); } } if (version >= 4) { m_lmID = buf->readNextUnaligned32bit(); m_lmsID = buf->getNextCharStringAlloc(); m_md5sum = new uint8[MAX_SIZE_MD5SUM]; buf->readNextByteArray(m_md5sum, MAX_SIZE_MD5SUM); } else { // Make favorite upgraded to version 4 m_md5sum = new uint8[MAX_SIZE_MD5SUM]; memset(m_md5sum, '0', MAX_SIZE_MD5SUM); } }
Favorite::Favorite(int32 lat, int32 lon, const char* name, const char* shortName, const char* description, const char* category, const char* mapIconName, bool synced, uint32 lmID, const char* imeiCrcHex, const char* lmsID, const uint8* md5sum) { initMembers(); m_lat = lat; m_lon = lon; m_name = strdup_new(name); m_shortName = strdup_new(shortName); m_description = strdup_new(description); m_category = strdup_new(category); m_mapIconName = strdup_new(mapIconName); m_lmID = lmID; if (imeiCrcHex && lmID != MAX_UINT32) { char tmpID[9]; sprintf(tmpID, "%x", lmID); char complete[17]; strcpy(complete, imeiCrcHex); strcat(complete, tmpID); AdditionalInfo* info = new AdditionalInfo("lmid", complete, GuiProtEnums::dont_show); addAdditionalInfo(info); } m_lmsID = strdup_new(lmsID); m_md5sum = new uint8[MAX_SIZE_MD5SUM]; if (md5sum != NULL) { memcpy(m_md5sum, md5sum, MAX_SIZE_MD5SUM); } else { memset(m_md5sum, '0', MAX_SIZE_MD5SUM); } m_synced = synced; }
//初期化 bool GameLayer::init(int level) { if (!Layer::init()) return false; // シングルタップイベントの取得 auto touchListener = EventListenerTouchOneByOne::create(); touchListener->setSwallowTouches(_swallowsTouches); touchListener->onTouchBegan = CC_CALLBACK_2(GameLayer::onTouchBegan, this); touchListener->onTouchMoved = CC_CALLBACK_2(GameLayer::onTouchMoved, this); touchListener->onTouchEnded = CC_CALLBACK_2(GameLayer::onTouchEnded, this); touchListener->onTouchCancelled = CC_CALLBACK_2(GameLayer::onTouchCancelled, this); _eventDispatcher->addEventListenerWithSceneGraphPriority(touchListener, this); _level = level; //レベルの保持 initBackground(); //背景の初期化 initBalls(); //ボールの初期表示 initEnemy(); //敵の表示 initMembers(); //メンバーの表示 initLevelLayer(); //レベル表示レイヤーの表示 return true; }
GMSRailwayItem::GMSRailwayItem(GMSItem::map_t mapType) : OldRailwayItem(), GMSItem(mapType) { initMembers(); }
GMSRailwayItem::GMSRailwayItem(uint32 id) : OldRailwayItem(id), GMSItem(GMSItem::GDF) { initMembers(); }
GMSRailwayItem::GMSRailwayItem() : OldRailwayItem(), GMSItem(GMSItem::GDF) { initMembers(); }
BDSensitive::BDSensitive() { initMembers(); }
CSliderMultiPos::CSliderMultiPos(QWidget * parent) : QSlider(parent){ initMembers(); }
GMSFerryItem::GMSFerryItem(uint32 id, bool createNodes) : OldFerryItem(id), GMSItem(GMSItem::GDF) { initMembers(id, createNodes); }
GMSAircraftRoadItem::GMSAircraftRoadItem(map_t mapType) : OldAircraftRoadItem(), GMSItem(mapType) { initMembers(); }
GMSAircraftRoadItem::GMSAircraftRoadItem() : OldAircraftRoadItem(), GMSItem(GMSItem::GDF) { initMembers(); }
GMSBuildingItem::GMSBuildingItem(map_t mapType) : OldBuildingItem(), GMSItem(mapType) { initMembers(); }
GMSBuildingItem::GMSBuildingItem(uint32 id) : OldBuildingItem(id), GMSItem(GMSItem::GDF) { initMembers(); }
GMSBuildingItem::GMSBuildingItem() : OldBuildingItem(), GMSItem(GMSItem::GDF) { initMembers(); }
CSliderMultiPos::CSliderMultiPos( Qt::Orientation orientation, QWidget * parent ) : QSlider(orientation,parent){ initMembers(); }
GMSCityPartItem::GMSCityPartItem() : OldCityPartItem(), GMSItem(GMSItem::INVALID) { initMembers(); }
GMSFerryItem::GMSFerryItem(bool createNodes) : OldFerryItem(), GMSItem(GMSItem::GDF) { initMembers(MAX_UINT32, createNodes); }
GMSCityPartItem::GMSCityPartItem(GMSItem::map_t mapType) : OldCityPartItem(), GMSItem(mapType) { initMembers(); }
GMSFerryItem::GMSFerryItem(GMSItem::map_t mapType, bool createNodes) : OldFerryItem(), GMSItem(mapType) { initMembers(MAX_UINT32, createNodes); }
BDSensitive::BDSensitive(const char *portName, const char* edgeType) { initMembers(); setPortName(portName); setSenseType(edgeType); }
GMSAircraftRoadItem::GMSAircraftRoadItem(uint32 id) : OldAircraftRoadItem(id), GMSItem(GMSItem::GDF) { initMembers(); }
Cc3dVector4::Cc3dVector4(const float array[4]){ initMembers(); init(array); }