Beispiel #1
0
ConcurrentMap::Ptr ConcurrentMap::create() {
    return Ptr(new detail::ConcurrentMap<ConcurrentMap>());
}
Beispiel #2
0
		_pFuncInfo->Append(pColumn);
		for (sword i = 0; i < nArgs; ++i)
		{
			CSqLite3Column::TDataType vDataType = Cast(CSqLite3Column::TDataType, va_arg(argList, int));
			CConstPointer vName = va_arg(argList, CConstPointer);
			Ptr(CSqLite3Column) pColumn = OK_NEW_OPERATOR CSqLite3Column(vName, vDataType);

			_pFuncInfo->Append(pColumn);
		}
		va_end(argList);

		_lpImpl->create_function(_pFuncInfo);
	}
}

CSqLite3Connection::create_function_infoclass::create_function_infoclass(Ptr(CSqLite3Connection) pConn, CConstPointer name, create_function_type funcbody, sword nArgs) :
_pConn(pConn), _name(__FILE__LINE__ name), _func(funcbody), _nArgs(nArgs), _args(__FILE__LINE__ 16, 16, CSqLite3ColumnsDeleteFunc)
{}

CSqLite3Connection::create_function_infoclass::create_function_infoclass(Ptr(CSqLite3Connection) pConn, ConstRef(CStringBuffer) name, create_function_type funcbody, sword nArgs) :
_pConn(pConn), _name(name), _func(funcbody), _nArgs(nArgs), _args(__FILE__LINE__ 16, 16, CSqLite3ColumnsDeleteFunc)
{}

CSqLite3Connection::create_function_infoclass::~create_function_infoclass() {}

void CSqLite3Connection::create_function_infoclass::Append(Ptr(CSqLite3Column) pArg)
{
	_args.Append(pArg);
}

CSqLite3Statement::CSqLite3Statement(CSqLite3Environment* lpEnv, CSqLite3StatementImpl* lpStmtImpl) :
RoadSection::RoadSection(const RoadBase::Ptr& patch)
    : m_patch(patch)
{
    m_port_number = m_patch->getEndPoseContainer().size() + 1;
    m_sections.resize(m_port_number, Ptr());
}
Beispiel #4
0
MWWorld::Ptr MWWorld::Cells::getPtr (const std::string& name, Ptr::CellStore& cell)
{
    if (cell.mState==Ptr::CellStore::State_Unloaded)
        cell.preload (mStore, mReader);

    if (cell.mState==Ptr::CellStore::State_Preloaded)
    {
        std::string lowerCase;

        std::transform (name.begin(), name.end(), std::back_inserter (lowerCase),
            (int(*)(int)) std::tolower);

        if (std::binary_search (cell.mIds.begin(), cell.mIds.end(), lowerCase))
        {
            cell.load (mStore, mReader);
            fillContainers (cell);
        }
        else
            return Ptr();
    }

    if (MWWorld::LiveCellRef<ESM::Activator> *ref = cell.activators.find (name))
        return Ptr (ref, &cell);

    if (MWWorld::LiveCellRef<ESM::Potion> *ref = cell.potions.find (name))
        return Ptr (ref, &cell);

    if (MWWorld::LiveCellRef<ESM::Apparatus> *ref = cell.appas.find (name))
        return Ptr (ref, &cell);

    if (MWWorld::LiveCellRef<ESM::Armor> *ref = cell.armors.find (name))
        return Ptr (ref, &cell);

    if (MWWorld::LiveCellRef<ESM::Book> *ref = cell.books.find (name))
        return Ptr (ref, &cell);

    if (MWWorld::LiveCellRef<ESM::Clothing> *ref = cell.clothes.find (name))
        return Ptr (ref, &cell);

    if (MWWorld::LiveCellRef<ESM::Container> *ref = cell.containers.find (name))
        return Ptr (ref, &cell);

    if (MWWorld::LiveCellRef<ESM::Creature> *ref = cell.creatures.find (name))
        return Ptr (ref, &cell);

    if (MWWorld::LiveCellRef<ESM::Door> *ref = cell.doors.find (name))
        return Ptr (ref, &cell);

    if (MWWorld::LiveCellRef<ESM::Ingredient> *ref = cell.ingreds.find (name))
        return Ptr (ref, &cell);

    if (MWWorld::LiveCellRef<ESM::CreatureLevList> *ref = cell.creatureLists.find (name))
        return Ptr (ref, &cell);

    if (MWWorld::LiveCellRef<ESM::ItemLevList> *ref = cell.itemLists.find (name))
        return Ptr (ref, &cell);

    if (MWWorld::LiveCellRef<ESM::Light> *ref = cell.lights.find (name))
        return Ptr (ref, &cell);

    if (MWWorld::LiveCellRef<ESM::Tool> *ref = cell.lockpicks.find (name))
        return Ptr (ref, &cell);

    if (MWWorld::LiveCellRef<ESM::Miscellaneous> *ref = cell.miscItems.find (name))
        return Ptr (ref, &cell);

    if (MWWorld::LiveCellRef<ESM::NPC> *ref = cell.npcs.find (name))
        return Ptr (ref, &cell);

    if (MWWorld::LiveCellRef<ESM::Probe> *ref = cell.probes.find (name))
        return Ptr (ref, &cell);

    if (MWWorld::LiveCellRef<ESM::Repair> *ref = cell.repairs.find (name))
        return Ptr (ref, &cell);

    if (MWWorld::LiveCellRef<ESM::Static> *ref = cell.statics.find (name))
        return Ptr (ref, &cell);

    if (MWWorld::LiveCellRef<ESM::Weapon> *ref = cell.weapons.find (name))
        return Ptr (ref, &cell);

    return Ptr();
}
OpenProjectCommandPtr OpenProjectCommand::create(void)
{
	return Ptr(new OpenProjectCommand());
}
NewSceneCommandPtr NewSceneCommand::create(void)
{
	return Ptr(new NewSceneCommand());
}
Beispiel #7
0
NonLegacyRenderer::Ptr NonLegacyRenderer::Create() {
	return Ptr( new NonLegacyRenderer );
}
Beispiel #8
0
BulletObject::MotionState::Ptr BulletObject::MotionState::clone(BulletObject &newObj) {
    btTransform t; getWorldTransform(t);
    return Ptr(new MotionState(newObj, t));
}
Beispiel #9
0
MWWorld::Ptr MWWorld::ContainerStore::search (const std::string& id)
{
    {
        Ptr ptr = searchId (potions, id, this);
        if (!ptr.isEmpty())
            return ptr;
    }

    {
        Ptr ptr = searchId (appas, id, this);
        if (!ptr.isEmpty())
            return ptr;
    }

    {
        Ptr ptr = searchId (armors, id, this);
        if (!ptr.isEmpty())
            return ptr;
    }

    {
        Ptr ptr = searchId (books, id, this);
        if (!ptr.isEmpty())
            return ptr;
    }

    {
        Ptr ptr = searchId (clothes, id, this);
        if (!ptr.isEmpty())
            return ptr;
    }

    {
        Ptr ptr = searchId (ingreds, id, this);
        if (!ptr.isEmpty())
            return ptr;
    }

    {
        Ptr ptr = searchId (lights, id, this);
        if (!ptr.isEmpty())
            return ptr;
    }

    {
        Ptr ptr = searchId (lockpicks, id, this);
        if (!ptr.isEmpty())
            return ptr;
    }

    {
        Ptr ptr = searchId (miscItems, id, this);
        if (!ptr.isEmpty())
            return ptr;
    }

    {
        Ptr ptr = searchId (probes, id, this);
        if (!ptr.isEmpty())
            return ptr;
    }

    {
        Ptr ptr = searchId (repairs, id, this);
        if (!ptr.isEmpty())
            return ptr;
    }

    {
        Ptr ptr = searchId (weapons, id, this);
        if (!ptr.isEmpty())
            return ptr;
    }

    return Ptr();
}
CloseProjectCommandPtr CloseProjectCommand::create(ApplicationBuilderPtr TheApplicationBuilder)
{
	return Ptr(new CloseProjectCommand(TheApplicationBuilder));
}
void PhysicsLocator::provide(const sf::Vector2f& gravity, const sf::Vector2f& ppp)
{
    PhysicsLocator::provide(Ptr(new b2World(b2Vec2(gravity.x, gravity.y))), ppp);
}
Beispiel #12
0
Image::Ptr Image::Create( const sf::Image& image ) {
	return Ptr( new Image( image ) );
}
Beispiel #13
0
Scrollbar::Ptr Scrollbar::Create( Adjustment::Ptr adjustment, Orientation orientation ) {
	return Ptr( new Scrollbar( adjustment, orientation ) );
}
 BinaryMathOperator::Ptr BinaryMathOperator::create(Operation op) {
   return Ptr(new BinaryMathOperator(op));
 }
Beispiel #15
0
const Scope::Ptr Scope::doGetScope(const Variant &/*key*/) const
{
    return Ptr();
}
 inline Ptr null_ptr() { return Ptr(); }
Beispiel #17
0
 ptr_stringable(Ptr const& p=Ptr()) : p(p) {}
Beispiel #18
0
 f32 BcString::ToFloat() const
     {
         return atof(Ptr());
     }
AboutKabalaEngineCommandPtr AboutKabalaEngineCommand::create(void)
{
	return Ptr(new AboutKabalaEngineCommand());
}
Beispiel #20
0
 f64 BcString::ToDouble() const
     {
         return strtod(Ptr(),0);
     }
Beispiel #21
0
//--------------------------------------------------------------------------
TimingManager::Ptr TimingManager::Create()
{
    return Ptr(new TimingManager());
}
Beispiel #22
0
 i32 BcString::ToInt() const
     {
         return atoi(Ptr());
     }
Beispiel #23
0
 static Ptr create() {
     return Ptr(new GTestJsFunctionAddx2());
 }
Beispiel #24
0
 BcString::operator char *()
     {
         return Ptr();
     }
Beispiel #25
0
LinkedList::Ptr LinkedList::create() {
    return Ptr(new detail::LinkedList<LinkedList>());
}
Beispiel #26
0
 BcString::operator const char *() const
     {
         return Ptr();
     }
Beispiel #27
0
static void __stdcall CSqLite3ColumnsDeleteFunc(ConstPointer data, Pointer context)
{
	Ptr(CSqLite3Column) column = CastAnyPtr(CSqLite3Column, CastMutable(Pointer, data));

	column->release();
}
Beispiel #28
0
SpherePrimitive::Ptr SpherePrimitive::create()
{
  return Ptr(new SpherePrimitive);
}
Beispiel #29
0
SshConnection::Ptr SshConnection::create(const SshConnectionParameters &serverInfo)
{
    doStaticInitializationsIfNecessary();
    return Ptr(new SshConnection(serverInfo));
}
Beispiel #30
0
ComboBox::Ptr ComboBox::Create() {
	return Ptr( new ComboBox );
}