1 /**************************************************************
2  *
3  * Licensed to the Apache Software Foundation (ASF) under one
4  * or more contributor license agreements.  See the NOTICE file
5  * distributed with this work for additional information
6  * regarding copyright ownership.  The ASF licenses this file
7  * to you under the Apache License, Version 2.0 (the
8  * "License"); you may not use this file except in compliance
9  * with the License.  You may obtain a copy of the License at
10  *
11  *   http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing,
14  * software distributed under the License is distributed on an
15  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16  * KIND, either express or implied.  See the License for the
17  * specific language governing permissions and limitations
18  * under the License.
19  *
20  *************************************************************/
21 
22 #include <precomp.h>
23 #include "cx_base.hxx"
24 
25 // NOT FULLY DECLARED SERVICES
26 #include <tokens/token.hxx>
27 #include "c_dealer.hxx"
28 
29 
30 
31 namespace cpp {
32 
33 
34 
Cx_Base(TkpContext * io_pFollowUpContext)35 Cx_Base::Cx_Base( TkpContext * io_pFollowUpContext )
36 	: 	pDealer(0),
37 		pFollowUpContext(io_pFollowUpContext)
38         // pNewToken
39 {
40 }
41 
42 bool
PassNewToken()43 Cx_Base::PassNewToken()
44 {
45 	if (pNewToken)
46 	{
47 		pNewToken.Release()->DealOut(Dealer());
48 		return true;
49 	}
50 	return false;
51 }
52 
53 TkpContext &
FollowUpContext()54 Cx_Base::FollowUpContext()
55 {
56 	csv_assert(pFollowUpContext != 0);
57 	return *pFollowUpContext;
58 }
59 
60 void
AssignDealer(Distributor & o_rDealer)61 Cx_Base::AssignDealer( Distributor &  o_rDealer )
62 {
63     pDealer = &o_rDealer;
64 }
65 
66 
67 }   // namespace cpp
68 
69 
70 
71 
72