[prev in list] [next in list] [prev in thread] [next in thread]
List: helix-client-cvs
Subject: [Client-cvs] encodesvc/common/tokenreplacer/pub
From: tburton () helixcommunity ! org
Date: 2010-01-30 7:03:43
Message-ID: 201001300705.o0U75SD3014221 () mailer ! progressive-comp ! com
[Download RAW message or body]
Update of /cvsroot/client/encodesvc/common/tokenreplacer/pub
In directory cvs01.internal.helixcommunity.org:/tmp/cvs-serv20204/pub
Added Files:
hxtelementtokenreplacer.h
Log Message:
Added hxtelementtokenreplacer to HEAD
--- NEW FILE: hxtelementtokenreplacer.h ---
/* ***** BEGIN LICENSE BLOCK *****
* Version: RCSL 1.0/RPSL 1.0
*
* Portions Copyright (c) 1995-2002 RealNetworks, Inc. All Rights Reserved.
*
* The contents of this file, and the files included with this file, are
* subject to the current version of the RealNetworks Public Source License
* Version 1.0 (the "RPSL") available at
* http://www.helixcommunity.org/content/rpsl unless you have licensed
* the file under the RealNetworks Community Source License Version 1.0
* (the "RCSL") available at http://www.helixcommunity.org/content/rcsl,
* in which case the RCSL will apply. You may also obtain the license terms
* directly from RealNetworks. You may not use this file except in
* compliance with the RPSL or, if you have a valid RCSL with RealNetworks
* applicable to this file, the RCSL. Please see the applicable RPSL or
* RCSL for the rights, obligations and limitations governing use of the
* contents of the file.
*
* This file is part of the Helix DNA Technology. RealNetworks is the
* developer of the Original Code and owns the copyrights in the portions
* it created.
*
* This file, and the files included with this file, is distributed and made
* available on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
* EXPRESS OR IMPLIED, AND REALNETWORKS HEREBY DISCLAIMS ALL SUCH WARRANTIES,
* INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, FITNESS
* FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
*
* Technology Compatibility Kit Test Suite(s) Location:
* http://www.helixcommunity.org/content/tck
*
* Contributor(s):
*
* ***** END LICENSE BLOCK ***** */
#ifndef __HXTELEMENTTOKENREPLACER__H
#define __HXTELEMENTTOKENREPLACER__H
#include "ihxttokenreplacer.h"
#include "hxttokenreplacerutils.h"
#include "hxtxmlparser.h"
class HXTElementTokenReplacer :
public IHXTTokenReplacer
{
public:
HXTElementTokenReplacer(const CHXTElement& elemEncodingJob, IHXCommonClassFactory* pFactory);
~HXTElementTokenReplacer();
/****************************************************************
* For each output filename and known metadata, this function
* will call GetReplacement(). GetReplacement() tokenizes the
* string for individual token substitutiton.
*****************************************************************/
STDMETHOD_(HX_RESULT, ReplaceTokens)();
/****************************************************************
* Helper function for ReplaceTokens(). Works on metadata.
*****************************************************************/
STDMETHOD_(HX_RESULT, ReplaceMetadataTokens)(/*in*/const CHXTElement& elemMetadata);
/****************************************************************
* Takes an input string, tokenizes it based on a token character,
* calls GetTokenValue on each token, then returns the replacement
* text
*****************************************************************/
STDMETHOD_(HX_RESULT, GetReplacement)(/*in*/REF(CHXString) sInput,
/*out*/REF(CHXString) sOutput);
/****************************************************************
* Accepts a single token from within a full replacement string
* and finds the replacement value.
* For example, "YYYY" sInputToken results in "2009" sOutputToken.
*
* Environment variables take priority over other replacements.
*****************************************************************/
STDMETHOD_(HX_RESULT, GetTokenValue)(/*in*/REF(CHXString) sInputToken,
/*out*/REF(CHXString) sOutputToken);
/****************************************************************
* Helper function for GetTokenValue.
* Takes in type of time substitution (i.e. kYearYYYY)
* and the output token.
*****************************************************************/
STDMETHOD_(HX_RESULT, GetTimeTokenValue)(/*in*/const char* szTimeType,
/*out*/REF(CHXString) sOutputToken);
/****************************************************************
* Gets the rounded value for a UINT given the job variable
* needing rounding.
*****************************************************************/
STDMETHOD_(HX_RESULT, GetRoundedUINT)(/*in*/CHXString sType,
/*out*/UINT32* uiValue);
/****************************************************************
* Strips unnecessary leading and trailing zeros off of the
* CHXString source.
*****************************************************************/
STDMETHOD_(HX_RESULT, StripUnnecessaryZeros)(/*out*/REF(CHXString) sValue);
private:
// Job object
const CHXTElement& m_elemEncodingJob;
// For values needed that are not available in the job
IHXValues* m_pValues;
// For environment variables
std::vector<CHXString> m_vEnvVars;
// For a mapping of time values (i.e. month token to month value).
mapTimeValues m_mapTimeValues;
// For utility functions
HXTTokenReplacerUtils m_AdvisorUtils;
// Factory
IHXCommonClassFactory* m_pFactory;
};
#endif
_______________________________________________
Client-cvs mailing list
Client-cvs@helixcommunity.org
http://lists.helixcommunity.org/mailman/listinfo/client-cvs
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic