本文整理汇总了C++中SetId函数的典型用法代码示例。如果您正苦于以下问题:C++ SetId函数的具体用法?C++ SetId怎么用?C++ SetId使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了SetId函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: Index
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;
}
示例2: SetObjectCount
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);
}
示例3: SetEventType
wxWebViewLoadEvent::wxWebViewLoadEvent(wxWindow* win)
{
SetEventType( wxEVT_WEBVIEW_LOAD);
SetEventObject( win );
if (win)
SetId(win->GetId());
}
示例4: IComando
LinkHistoryCommand::LinkHistoryCommand(LinkHistoryCommandParams* pParams) : IComando(pParams)
{
GTRACE(">> ComandoCarga::ComandoCarga(): " << this);
m_pLinkParams = pParams;
SetId(IDC_INCLUIR);
GTRACE("<< ComandoCarga::ComandoCarga(): " << this);
}
示例5: strcpy
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.";
}
示例6: SetName
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("?");
}
示例7: create
static void create() {
base_dummy::create();
bed::create();
SetKeyName("bench");
SetId("bench", "pew");
SetAdjectives( ({ "hard","uncomfortable", "wooden", "worn" }) );
示例8: atoi
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;
}
示例9: SetFName
Client::Client (const string& fName, const string& lName, const string& id, double balance)
{
SetFName (fName);
SetLName (lName);
SetId (id);
SetBalance (balance);
}
示例10: SetId
void MPppRecvr::Reregister(TUint aPppId, TPppPhase aPhase)
{
if (aPppId!=KPppIdAsIs)
SetId(aPppId);
SetPhase(aPhase);
iPppLcp->ReregisterRecvr(this);
}
示例11: _id
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);
}
示例12: wxPanel
//
// 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);
}
示例13: SetName
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);
}
示例14: SetDataL
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
}
示例15: setw
/***************************************************************************
* 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');
}