bool ON_Group::Internal_ReadV5( ON_BinaryArchive& file // restore definition from binary archive ) { *this = ON_Group::Unset; int major_version = 0; int minor_version = 0; bool rc = file.Read3dmChunkVersion(&major_version,&minor_version); if ( major_version == 1 ) { int group_index = Index(); if (rc) rc = file.ReadInt( &group_index ); if (rc) SetIndex(group_index); ON_wString group_name; if (rc) rc = file.ReadString( group_name ); if (rc) SetName(group_name); if ( minor_version >= 1 ) { ON_UUID group_id = ON_nil_uuid; if (rc) rc = file.ReadUuid( group_id ); if (rc) SetId(group_id); } if (rc && IdIsNil() ) { // modern times require unique ids. SetId(); } } else rc = false; return rc; }
MathStudent::MathStudent() { SetObjectCount(count); address = new char[5]; strcpy(address, "add"); city = new char[5]; strcpy(city, "cit"); state = new char[5]; strcpy(state, "sta"); zipCode = 0; SetName(" "); SetStanding(" "); SetNumber(" "); SetId(0); SetAge(0); SetGpa(0.0); SetGender('X'); SetAllDate(0,0,0); }
wxWebViewLoadEvent::wxWebViewLoadEvent(wxWindow* win) { SetEventType( wxEVT_WEBVIEW_LOAD); SetEventObject( win ); if (win) SetId(win->GetId()); }
wxWebViewReceivedTitleEvent::wxWebViewReceivedTitleEvent(wxWindow* win) { SetEventType(wxEVT_WEBVIEW_RECEIVED_TITLE); SetEventObject(win); if (win) SetId(win->GetId()); }
wxWebViewConsoleMessageEvent::wxWebViewConsoleMessageEvent(wxWindow* win) { SetEventType(wxEVT_WEBVIEW_CONSOLE_MESSAGE); SetEventObject(win); if (win) SetId(win->GetId()); }
wxWebViewRightClickEvent::wxWebViewRightClickEvent(wxWindow* win) { SetEventType(wxEVT_WEBVIEW_RIGHT_CLICK); SetEventObject(win); if (win) SetId(win->GetId()); }
LinkHistoryCommand::LinkHistoryCommand(LinkHistoryCommandParams* pParams) : IComando(pParams) { GTRACE(">> ComandoCarga::ComandoCarga(): " << this); m_pLinkParams = pParams; SetId(IDC_INCLUIR); GTRACE("<< ComandoCarga::ComandoCarga(): " << this); }
MathStudent::MathStudent(const MathStudent& otherStudent) { address = new char[strlen(otherStudent.GetAddress())+1]; strcpy(address, otherStudent.GetAddress()); city = new char[strlen(otherStudent.GetCity())+1]; strcpy(city, otherStudent.GetCity()); state = new char[strlen(otherStudent.GetState())+1]; strcpy(state, otherStudent.GetState()); zipCode = otherStudent.GetZipCode(); SetName(otherStudent.GetName()); SetStanding(otherStudent.GetStanding()); SetNumber(otherStudent.GetNumber()); SetId(otherStudent.GetId()); SetAge(otherStudent.GetAge()); SetGpa(otherStudent.GetGpa()); SetGender(otherStudent.GetGender()); SetAllDate(otherStudent.GetMonth(), otherStudent.GetDay(),otherStudent.GetYear()); SetObjectCount(otherStudent.GetObjectCount()); cout << "\nCopy constructor has been called."; }
void PluginManagerAttributes::SetFromNode(DataNode *parentNode) { if(parentNode == 0) return; DataNode *searchNode = parentNode->GetNode("PluginManagerAttributes"); if(searchNode == 0) return; DataNode *node; if((node = searchNode->GetNode("name")) != 0) SetName(node->AsStringVector()); if((node = searchNode->GetNode("type")) != 0) SetType(node->AsStringVector()); if((node = searchNode->GetNode("version")) != 0) SetVersion(node->AsStringVector()); if((node = searchNode->GetNode("id")) != 0) SetId(node->AsStringVector()); if((node = searchNode->GetNode("category")) != 0) SetCategory(node->AsStringVector()); if((node = searchNode->GetNode("enabled")) != 0) SetEnabled(node->AsIntVector()); // Ensure that the category vector will be at least as long as the id vector. // This is import for supporting legacy config files. while(category.size() < id.size()) category.push_back("?"); }
static void create() { base_dummy::create(); bed::create(); SetKeyName("bench"); SetId("bench", "pew"); SetAdjectives( ({ "hard","uncomfortable", "wooden", "worn" }) );
void CGameServerPlayer::ProcessInitialHandshake(unsigned int clientId, const PacketData& subPacket) { if(m_sentInitialHandshake) return; const char* characterIdString = reinterpret_cast<const char*>(subPacket.data() + 0x14); uint32 characterId = atoi(characterIdString); CLog::GetInstance().LogDebug(LOG_NAME, "Initial handshake for clientId = %d and characterId = 0x%0.8X", clientId, characterId); if(clientId == 1) { //Put player in instance { auto playerActor = std::make_unique<CPlayerActor>(characterId); playerActor->SetId(PLAYER_ID); playerActor->RawPacketReady.connect([&] (const PacketData& packet) { m_currentComposite.AddPacket(packet); }); playerActor->LocalPacketReady.connect([&] (CActor* actor, const PacketPtr& packet) { QueueToCurrentComposite(actor, packet); }); playerActor->GlobalPacketReady.connect([&] (CActor* actor, const PacketPtr& packet) { QueueToCurrentComposite(actor, packet); }); m_instance.AddActor(std::move(playerActor)); } PrepareInitialPackets(); } else if(clientId == 2) { QueuePacket(PacketData(std::begin(g_client1_login1), std::end(g_client1_login1))); QueuePacket(PacketData(std::begin(g_client1_login2), std::end(g_client1_login2))); } m_sentInitialHandshake = true; }
Client::Client (const string& fName, const string& lName, const string& id, double balance) { SetFName (fName); SetLName (lName); SetId (id); SetBalance (balance); }
void MPppRecvr::Reregister(TUint aPppId, TPppPhase aPhase) { if (aPppId!=KPppIdAsIs) SetId(aPppId); SetPhase(aPhase); iPppLcp->ReregisterRecvr(this); }
Tool::ButtonBand::ButtonBand (Win::Dow::Handle parentWin, unsigned buttonsBitmapId, unsigned buttonWidth, Cmd::Vector const & cmdVector, Tool::Item const * buttonItems, Tool::BandItem const * bandItem) : _id (bandItem->bandId), _toolBar (parentWin, bandItem->bandId, buttonsBitmapId, buttonWidth, cmdVector, buttonItems, Win::Style (Tool::Style::NoResize | Tool::Style::NoParentAlign | Tool::Style::NoDivider | Tool::Style::Flat | Tool::Style::Tips)) { _toolBar.SetLayout (bandItem->buttonLayout); _toolBar.AutoSize (); _defaultToolTipDelay = _toolBar.GetToolTipDelay (); AddChildWin (_toolBar); SetId (bandItem->bandId); unsigned barWidth = 0; unsigned barHeight = 0; _toolBar.GetMaxSize (barWidth, barHeight); // Set the height to the default bar height, so other // controls placed on the tool bar will fit nicely InitBandSizes (barWidth + bandItem->extraSpace, Tool::DefaultBarHeight); }
// // Constructor // ToolBar::ToolBar( int type, const wxString &label, const wxString §ion, bool resizable ) : wxPanel() { // Save parameters mType = type; mLabel = label; mSection = section; mResizable = resizable; // Initialize everything mParent = NULL; mHSizer = NULL; mSpacer = NULL; mDock = NULL; mVisible = false; mPositioned = false; mGrabber = NULL; mResizer = NULL; SetId(mType); }
void MathStudent::SetAllMath(string newName, string newStanding, string newNumber, long newId, unsigned short newAge, double newGpa, char newGender, int newMonth, int newDay, int newYear, char * newAddress, char * newCity, char * newState, long newZipCode) { SetName(newName); SetStanding(newStanding); SetNumber(newNumber); SetId(newId); SetAge(newAge); SetGpa(newGpa); SetGender(newGender); SetAllDate(newMonth, newDay, newYear); SetAddress(newAddress); SetCity(newCity); SetState(newState); SetZipCode(newZipCode); }
wxWebViewNewWindowEvent::wxWebViewNewWindowEvent(wxWindow* win) { SetEventType(wxEVT_WEBVIEW_NEW_WINDOW); SetEventObject(win); if (win) SetId(win->GetId()); }
EXPORT_C void CLogEvent::CopyL(const CLogEvent& aEvent) /** Makes a copy of the specified log event. @param aEvent The log event to be copied. */ { // Set data first as this is the only function that can leave // If this function fails nothing will be changed SetDataL(aEvent.Data()); SetId(aEvent.Id()); SetEventType(aEvent.EventType()); SetTime(aEvent.Time()); SetDurationType(aEvent.DurationType()); SetDuration(aEvent.Duration()); SetContact(aEvent.Contact()); SetLink(aEvent.Link()); SetDescription(aEvent.Description()); SetRemoteParty(aEvent.RemoteParty()); SetDirection(aEvent.Direction()); SetStatus(aEvent.Status()); SetSubject(aEvent.Subject()); SetNumber(aEvent.Number()); ClearFlags(KLogFlagsMask); SetFlags(aEvent.Flags()); #ifdef SYMBIAN_ENABLE_EVENTLOGGER_DUALSIM SetSimId(aEvent.SimId()); #endif }
void MathStudent::CopyFrom(MathStudent otherStudent) { delete [] address; delete [] city; delete [] state; address = new char[strlen(otherStudent.GetAddress())+1]; strcpy(address, otherStudent.GetAddress()); city = new char[strlen(otherStudent.GetCity())+1]; strcpy(city, otherStudent.GetCity()); state = new char[strlen(otherStudent.GetState())+1]; strcpy(state, otherStudent.GetState()); zipCode = otherStudent.GetZipCode(); SetName(otherStudent.GetName()); SetStanding(otherStudent.GetStanding()); SetNumber(otherStudent.GetNumber()); SetId(otherStudent.GetId()); SetAge(otherStudent.GetAge()); SetGpa(otherStudent.GetGpa()); SetGender(otherStudent.GetGender()); SetAllDate(otherStudent.GetMonth(), otherStudent.GetDay(), otherStudent.GetYear()); }
/*************************************************************************** * PromptUserForInput * ------------------------------------------------------------------------- * This method will prompt the user for each input * * Returns: ***************************************************************************/ void Student::PropagateStudent() { const int WIDTH = 21; string newName; long newId; string newNumber; unsigned short newAge; char newGender; string newStanding; double newGpa; int month, day, year; cout << "\nEnter the proper information to continue.\n"; cout << setw(WIDTH) << "Enter Name: " ; getline(cin, newName); SetName(newName); cout << setw(WIDTH) << "Enter ID: "; cin >> newId; SetId(newId); cin.ignore(numeric_limits<streamsize>::max(), '\n'); cout << setw(WIDTH) << "Enter phone number: "; getline(cin, newNumber); SetNumber(newNumber); cout << setw(WIDTH) << "Enter age: "; cin >> newAge; cin.ignore(numeric_limits<streamsize>::max(), '\n'); SetAge(newAge); cout << setw(WIDTH) << "Enter Gender: "; cin.get(newGender); cin.ignore(numeric_limits<streamsize>::max(), '\n'); SetGender(newGender); cout << setw(WIDTH) << "Enter Class Standing: "; getline(cin, newStanding); SetStanding(newStanding); cout << setw(WIDTH) << "Enter GPA: "; cin >> newGpa; cin.ignore(numeric_limits<streamsize>::max(), '\n'); SetGpa(newGpa); cout << "Enter year of month, day, and year of graduation: "; cin >> month >> day >> year; SetAllDate(month, day, year); cin.ignore(numeric_limits<streamsize>::max(), '\n'); }
WorkerEvent(void* pSender) { SetId(-1); SetEventType(wxEVT_WORKER); m_sender = pSender; m_exit = false; m_workerFailed = false; }
Student::Student (string name, string surname, int grade): name(name), surname(surname), grade(0) { if (!SetName(name) || !SetSurname(surname) || !SetGrade(grade)) { cout << "Error create object student, data not valid" << endl; } else { SetId(); this->count++; } }
static void create() { germ::create(); SetId("cold"); SetType("cold"); SetCommunicable(40); SetCure(20); SetLifeSpan(60); }
static void create() { door::create(); SetId("north", "door"); SetShort("north", "a door made from fine oak"); SetLong("north", "It is a magnificent door marking the entrance to " "the fighter class hall."); SetLockable("north", 1); SetKeys("north", "special_key_id"); SetId("south", "door"); SetShort("south", "a door made from fine oak"); SetLong("south", "It is a magnificent door leading out to the recruitment " "area."); SetLockable("south", 1); SetKeys("south", "special_key_id"); SetClosed(1); SetLocked(0); }
WorkerEvent(void* pSender, evt_type type) { SetId(-1); SetEventType(wxEVT_WORKER); m_sender = pSender; m_eventType = type; m_isFailed = false; }
void BaseNode::OnCreate() { if (_nId == 0xFFFFFFFF && _pContainer) { SetId(_pContainer->GetCurrentId()); _pContainer->IncrementId(); } }
bool XMLMsg::SetId(const std::string& strId) { if(strId.empty()){ return false; } return SetId(std::atoi(strId.c_str())); }
static void create() { dummy::create(); SetKeyName("lamp"); SetId("lamp on a post","post","lamp post","lamppost"); SetShort("a lamp on a post"); SetLong("This is a lamp on a post which is lit at night so townsfolk " "can find their way around."); }
wxWebViewBeforeLoadEvent::wxWebViewBeforeLoadEvent(wxWindow* win) { m_cancelled = false; SetEventType(wxEVT_WEBVIEW_BEFORE_LOAD); SetEventObject(win); if (win) SetId(win->GetId()); }
bool wxTopLevelWindowPalm::Create(wxWindow *parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style, const wxString& name) { // this is a check for limitation mentioned before FrameFormHandleEvent() code if(wxTopLevelWindows.GetCount()>0) return false; ActiveParentFrame=NULL; wxTopLevelWindows.Append(this); if ( parent ) parent->AddChild(this); SetId( id == wxID_ANY ? NewControlId() : id ); WinConstraintsType constraints; memset(&constraints, 0, sizeof(WinConstraintsType)); // position constraints.x_pos = ( pos.x == wxDefaultCoord ) ? winUndefConstraint : pos.x; constraints.y_pos = ( pos.y == wxDefaultCoord ) ? winUndefConstraint : pos.y; // size constraints.x_min = winUndefConstraint; constraints.x_max = winMaxConstraint; constraints.x_pref = ( size.x == wxDefaultCoord ) ? winUndefConstraint : size.x; constraints.y_min = winUndefConstraint; constraints.y_max = winMaxConstraint; constraints.y_pref = ( size.y == wxDefaultCoord ) ? winUndefConstraint : size.y; FrameForm = FrmNewFormWithConstraints( GetId(), title.c_str(), winFlagBackBuffer, &constraints, 0, NULL, 0, NULL, 0 ); if(FrameForm==NULL) return false; FrmSetEventHandler(FrameForm,FrameFormHandleEvent); FrmSetActiveForm(FrameForm); ActiveParentFrame=this; return true; }