Home | History | Annotate | Download | only in fruit
      1 /*
      2  * Copyright 2014 Google Inc. All rights reserved.
      3  *
      4  * Licensed under the Apache License, Version 2.0 (the "License");
      5  * you may not use this file except in compliance with the License.
      6  * You may obtain a copy of the License at
      7  *
      8  *     http://www.apache.org/licenses/LICENSE-2.0
      9  *
     10  * Unless required by applicable law or agreed to in writing, software
     11  * distributed under the License is distributed on an "AS IS" BASIS,
     12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     13  * See the License for the specific language governing permissions and
     14  * limitations under the License.
     15  */
     16 
     17 #ifndef FRUIT_FRUIT_FORWARD_DECLS_H
     18 #define FRUIT_FRUIT_FORWARD_DECLS_H
     19 
     20 // This header contains forward declarations of all types in the `fruit' namespace.
     21 // Avoid writing forward declarations yourself; use this header instead.
     22 
     23 namespace fruit {
     24 
     25 /**
     26  * This is used to group the requirements of Component. See Component for details.
     27  * Note: this type is declared but not defined; that's by design since instances of this type are not meaningful.
     28  */
     29 template <typename... Types>
     30 struct Required;
     31 
     32 /**
     33  * This is used to "annotate" T as a type that uses assisted injection. See PartialComponent for details.
     34  * Note: this type is declared but not defined; that's by design since instances of this type are not meaningful.
     35  */
     36 template <typename T>
     37 struct Assisted;
     38 
     39 /**
     40  * This is used to annotate T as a type that will be user-supplied instead of being injected.
     41  * See PartialComponent::registerFactory for details.
     42  */
     43 template <typename Annotation, typename T>
     44 struct Annotated {};
     45 
     46 template <typename... Types>
     47 class Component;
     48 
     49 class EmptyPartialComponent;
     50 
     51 template <typename... Bindings>
     52 class PartialComponent;
     53 
     54 template <typename... Types>
     55 class NormalizedComponent;
     56 
     57 template <typename C>
     58 class Provider;
     59 
     60 template <typename... P>
     61 class Injector;
     62 
     63 template <typename ComponentType, typename... ComponentFunctionArgs>
     64 class ComponentFunction;
     65 
     66 } // namespace fruit
     67 
     68 #endif // FRUIT_FRUIT_FORWARD_DECLS_H
     69