1 /******************************************************************
3 * Copyright 2014 Samsung Electronics All Rights Reserved.
7 * Licensed under the Apache License, Version 2.0 (the "License");
8 * you may not use this file except in compliance with the License.
9 * You may obtain a copy of the License at
11 * http://www.apache.org/licenses/LICENSE-2.0
13 * Unless required by applicable law or agreed to in writing, software
14 * distributed under the License is distributed on an "AS IS" BASIS,
15 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 * See the License for the specific language governing permissions and
17 * limitations under the License.
19 ******************************************************************/
20 #include "ConditionedQueryResult.h"
22 SSMRESULT CConditionedQueryResult::finalConstruct()
24 SSMRESULT res = SSM_E_FAIL;
31 void CConditionedQueryResult::finalRelease()
33 for (std::vector<IConditionedModel *>::iterator itor = m_conditionedModels.begin();
34 itor != m_conditionedModels.end(); ++itor)
36 SAFE_RELEASE((*itor));
40 SSMRESULT CConditionedQueryResult::addConditionedModel(IConditionedModel *pConditionedModel)
42 pConditionedModel->addRef();
43 m_conditionedModels.push_back(pConditionedModel);
48 unsigned int CConditionedQueryResult::getConditionedModelCount()
50 return m_conditionedModels.size();
53 SSMRESULT CConditionedQueryResult::getConditionedContextModel(unsigned int conditionedModelIndex,
54 IConditionedModel **ppConditionedModel)
56 if (conditionedModelIndex > m_conditionedModels.size() - 1)
61 return m_conditionedModels[conditionedModelIndex]->queryInterface(OID_IConditionedModel,
62 (IBase **)ppConditionedModel);