本文整理汇总了C++中Object::Add方法的典型用法代码示例。如果您正苦于以下问题:C++ Object::Add方法的具体用法?C++ Object::Add怎么用?C++ Object::Add使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Object
的用法示例。
在下文中一共展示了Object::Add方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: MakeWillie
Object FrogProvider::MakeWillie(Scope& scope)
{
#if defined(USE_CACHE)
if (m_willie)
return *m_willie;
#endif
Object frog = scope.NewObject();
frog.SetFlags(OL_FLAG_STATIC_NAME|OL_FLAG_LENGTH_NAME|OL_FLAG_STATIC_VALUE|
OL_FLAG_ALLOW_DUPLICATES);
frog.Add(Frog_Id, OL_GuidValue(
0X7C1D0F49, 0X0DF2, 0X4EB9, 0X8566, 0X7DFD, 0XB4283E46));
frog.AddString(Frog_UserName, "willie");
frog.AddString(Frog_First, "William");
frog.AddString(Frog_Last, "Frog");
frog.AddString(Frog_Color, "Red");
frog.AddDate(Frog_Birthdate, Date(2006, 3, 1));
#if defined(USE_CACHE)
m_willie = new Object(frog);
#endif
return frog;
}
示例2: MakeFreddy
Object FrogProvider::MakeFreddy(Scope& scope)
{
#if defined(USE_CACHE)
if (m_freddy)
return *m_freddy;
#endif
Object frog = scope.NewObject();
frog.SetFlags(OL_FLAG_STATIC_NAME|OL_FLAG_LENGTH_NAME|OL_FLAG_STATIC_VALUE|
OL_FLAG_ALLOW_DUPLICATES);
frog.Add(Frog_Id, OL_GuidValue(
0x430BAEEB, 0x3192, 0x46E9, 0xA244, 0x79F3, 0xD68CA03A));
frog.AddString(Frog_UserName, "freddy");
frog.AddString(Frog_First, "Frederick");
frog.AddString(Frog_Last, "Frog");
frog.AddString(Frog_Color, "Blue");
frog.AddDate(Frog_Birthdate, Date(1991, 8, 3));
#if defined(USE_CACHE)
m_freddy = new Object(frog);
#endif
return frog;
}
示例3: MakeKermit
Object FrogProvider::MakeKermit(Scope& scope)
{
#if defined(USE_CACHE)
if (m_kermit)
return *m_kermit;
#endif
Object frog = scope.NewObject();
frog.SetFlags(OL_FLAG_STATIC_NAME|OL_FLAG_LENGTH_NAME|OL_FLAG_STATIC_VALUE|
OL_FLAG_ALLOW_DUPLICATES);
frog.Add(Frog_Id, OL_GuidValue(
0x1C6D09D2, 0xF1B6, 0x43F1, 0xB30B, 0xF774, 0x7822A29B));
frog.AddString(Frog_UserName, "kermit");
frog.AddString(Frog_First, "Kermit");
frog.AddString(Frog_Last, "Frog");
frog.AddString(Frog_Color, "Green");
frog.AddDate(Frog_Birthdate, Date(1955, 12, 3));
frog.AddNavigationLink(Frog_Friend, "Frogs('willie')");
{
Array arr = scope.NewArray();
arr.AppendDate(Date(2015, 12, 31));
arr.AppendDate(Date(2015, 12, 24));
arr.AppendDate(Date(2015, 12, 25));
frog.AddArray(Frog_Holidays, arr);
}
#if defined(USE_CACHE)
m_kermit = new Object(frog);
#endif
return frog;
}
示例4: Add
inline void Add(Object &o, TLorentzVector&v, float c){o.Add(v,c);}