1*08421ca6SAndrew Rist /************************************************************** 2cdf0e10cSrcweir * 3*08421ca6SAndrew Rist * Licensed to the Apache Software Foundation (ASF) under one 4*08421ca6SAndrew Rist * or more contributor license agreements. See the NOTICE file 5*08421ca6SAndrew Rist * distributed with this work for additional information 6*08421ca6SAndrew Rist * regarding copyright ownership. The ASF licenses this file 7*08421ca6SAndrew Rist * to you under the Apache License, Version 2.0 (the 8*08421ca6SAndrew Rist * "License"); you may not use this file except in compliance 9*08421ca6SAndrew Rist * with the License. You may obtain a copy of the License at 10cdf0e10cSrcweir * 11*08421ca6SAndrew Rist * http://www.apache.org/licenses/LICENSE-2.0 12cdf0e10cSrcweir * 13*08421ca6SAndrew Rist * Unless required by applicable law or agreed to in writing, 14*08421ca6SAndrew Rist * software distributed under the License is distributed on an 15*08421ca6SAndrew Rist * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16*08421ca6SAndrew Rist * KIND, either express or implied. See the License for the 17*08421ca6SAndrew Rist * specific language governing permissions and limitations 18*08421ca6SAndrew Rist * under the License. 19cdf0e10cSrcweir * 20*08421ca6SAndrew Rist *************************************************************/ 21*08421ca6SAndrew Rist 22*08421ca6SAndrew Rist 23cdf0e10cSrcweir 24cdf0e10cSrcweir #include <sal/types.h> 25cdf0e10cSrcweir #include <osl/diagnose.h> 26cdf0e10cSrcweir 27cdf0e10cSrcweir class TargetStateControl_Impl 28cdf0e10cSrcweir { 29cdf0e10cSrcweir sal_Int32& m_nTargetStateVariable; 30cdf0e10cSrcweir public: TargetStateControl_Impl(sal_Int32 & nVariable,sal_Int32 nValue)31cdf0e10cSrcweir TargetStateControl_Impl( sal_Int32& nVariable, sal_Int32 nValue ) 32cdf0e10cSrcweir : m_nTargetStateVariable( nVariable ) 33cdf0e10cSrcweir { 34cdf0e10cSrcweir OSL_ENSURE( m_nTargetStateVariable == -1, "The target state variable is not initialized properly!\n" ); 35cdf0e10cSrcweir m_nTargetStateVariable = nValue; 36cdf0e10cSrcweir } 37cdf0e10cSrcweir ~TargetStateControl_Impl()38cdf0e10cSrcweir ~TargetStateControl_Impl() 39cdf0e10cSrcweir { 40cdf0e10cSrcweir m_nTargetStateVariable = -1; 41cdf0e10cSrcweir } 42cdf0e10cSrcweir }; 43cdf0e10cSrcweir 44cdf0e10cSrcweir 45