当前位置: 首页>>代码示例>>C++>>正文


C++ Object::Add方法代码示例

本文整理汇总了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;
}
开发者ID:anandsoft,项目名称:odatalite,代码行数:26,代码来源:FrogProvider.cpp

示例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;
}
开发者ID:anandsoft,项目名称:odatalite,代码行数:26,代码来源:FrogProvider.cpp

示例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;
}
开发者ID:anandsoft,项目名称:odatalite,代码行数:36,代码来源:FrogProvider.cpp

示例4: Add

 inline void Add(Object &o, TLorentzVector&v, float c){o.Add(v,c);}
开发者ID:amarini,项目名称:ChargedHiggs,代码行数:1,代码来源:Corrector.hpp


注:本文中的Object::Add方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。