secureswitools/swisistools/source/sisxlibrary/siselseif.h
changeset 0 ba25891c3a9e
child 26 04d4a7bbc3e0
equal deleted inserted replaced
-1:000000000000 0:ba25891c3a9e
       
     1 /*
       
     2 * Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies).
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of the License "Eclipse Public License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description: 
       
    15 * As specified in SGL.GT0188.251
       
    16 *
       
    17 */
       
    18 
       
    19 
       
    20 /**
       
    21  @file 
       
    22  @publishedPartner
       
    23  @released
       
    24 */
       
    25 
       
    26 #ifndef __SISELSEIF_H__
       
    27 #define __SISELSEIF_H__
       
    28 
       
    29 
       
    30 #include "sisexpression.h"
       
    31 #include "sisinstallblock.h"
       
    32 
       
    33 
       
    34 class CSISElseIf : public CStructure <CSISFieldRoot::ESISElseIf>
       
    35 	{
       
    36 public:
       
    37 	/**
       
    38 	 * Default constructor.
       
    39 	 */
       
    40 	CSISElseIf ();
       
    41 	/**
       
    42 	 * Copy constructor
       
    43 	 */
       
    44 	CSISElseIf (const CSISElseIf& aInitialiser);
       
    45 		
       
    46 public:
       
    47 	/**
       
    48 	 * Class name
       
    49 	 */
       
    50 	virtual std::string Name () const;
       
    51 	/**
       
    52 	 * Expression correspons to this else-if block.
       
    53 	 */
       
    54 	inline const CSISExpression& Expression () const;
       
    55 	/**
       
    56 	 * Expression correspons to this else-if block.
       
    57 	 */
       
    58 	inline CSISExpression& Expression ();
       
    59 	/**
       
    60 	 * Install block correspons to this else-if block.
       
    61 	 */
       
    62 	inline const CSISInstallBlock& InstallBlock () const;
       
    63 	/**
       
    64 	 * Install block correspons to this else-if block.
       
    65 	 */
       
    66 	inline CSISInstallBlock& InstallBlock ();
       
    67 	/**
       
    68 	 * Make this else-if statement always true.
       
    69 	 */
       
    70 	inline void SetElse ();
       
    71 	/**
       
    72 	 * Retrieves the list of files present in this else-if block
       
    73 	 * @param aFileList The list will be filled by this function
       
    74 	 */
       
    75 	inline void GetFileList(TFileDescList& aFileList) const;
       
    76 	/**
       
    77 	 * Retrieves the list of embedded sis files present in this else-if block
       
    78 	 * @param aControllers The list will be filled by this function
       
    79 	 */
       
    80 	inline void GetEmbeddedControllers(TControllerMap& aControllers) const;
       
    81 	/**
       
    82 	 * Adds package entry related to this else-if block
       
    83 	 * @param aStream stream into which the package details need to be written.
       
    84 	 * @param aVerbose If this option is set then detail description of pkg
       
    85 	 * 			will be written into the stream.
       
    86 	 */
       
    87 	void AddPackageEntry(std::wostream& aStream, bool aVerbose) const;
       
    88 
       
    89 private:
       
    90 	void InsertMembers ();
       
    91 
       
    92 private:
       
    93 	CSISExpression		iExpression;
       
    94 	CSISInstallBlock	iInstallBlock;
       
    95 
       
    96 	};
       
    97 
       
    98 
       
    99 inline void CSISElseIf::InsertMembers ()
       
   100 	{
       
   101 	InsertMember (iExpression);
       
   102 	InsertMember (iInstallBlock);
       
   103 	}
       
   104 
       
   105 
       
   106 inline CSISElseIf::CSISElseIf ()
       
   107 	{ 
       
   108 	InsertMembers (); 
       
   109 	}
       
   110 
       
   111 
       
   112 inline CSISElseIf::CSISElseIf (const CSISElseIf& aInitialiser) :
       
   113 		CStructure <CSISFieldRoot::ESISElseIf> (aInitialiser),
       
   114 		iExpression (aInitialiser.iExpression),
       
   115 		iInstallBlock (aInitialiser.iInstallBlock)
       
   116 	{ 
       
   117 	InsertMembers (); 
       
   118 	}
       
   119 
       
   120 
       
   121 inline const CSISExpression& CSISElseIf::Expression () const
       
   122 	{ 
       
   123 	return iExpression; 
       
   124 	}
       
   125 
       
   126 
       
   127 inline CSISExpression& CSISElseIf::Expression ()
       
   128 	{ 
       
   129 	return iExpression;
       
   130 	 }
       
   131 
       
   132 
       
   133 inline const CSISInstallBlock& CSISElseIf::InstallBlock () const
       
   134 	{ 
       
   135 	return iInstallBlock;
       
   136 	 }
       
   137 
       
   138 
       
   139 inline CSISInstallBlock& CSISElseIf::InstallBlock ()
       
   140 	{ 
       
   141 	return iInstallBlock; 
       
   142 	}
       
   143 
       
   144 
       
   145 inline void CSISElseIf::SetElse ()
       
   146 	{ 
       
   147 	iExpression.SetAlwaysTrue (); 
       
   148 	}
       
   149 
       
   150 
       
   151 inline std::string CSISElseIf::Name () const
       
   152 	{
       
   153 	return "Else If";
       
   154 	}
       
   155 
       
   156 
       
   157 inline void CSISElseIf::GetFileList(TFileDescList& aFileList) const
       
   158 	{
       
   159 	iInstallBlock.GetFileList(aFileList);
       
   160 	}
       
   161 
       
   162 inline void CSISElseIf::GetEmbeddedControllers(TControllerMap& aControllers) const
       
   163 	{
       
   164 	iInstallBlock.GetEmbeddedControllers(aControllers);
       
   165 	}
       
   166 
       
   167 #endif // __SISELSEIF_H__
       
   168