34 for(
unsigned idx = 0; idx <
m_tbTexts.GetCount(); idx++ )
45 aFormatter->
Print(
"(title_block" );
59 for(
int ii = 0; ii < 9; ii++ )
63 aFormatter->
Print(
"(comment %d %s)",
69 aFormatter->
Print(
")" );
77 aVars->push_back( wxT(
"ISSUE_DATE" ) );
78 aVars->push_back( wxT(
"CURRENT_DATE" ) );
79 aVars->push_back( wxT(
"REVISION" ) );
80 aVars->push_back( wxT(
"TITLE" ) );
81 aVars->push_back( wxT(
"COMPANY" ) );
82 aVars->push_back( wxT(
"COMMENT1" ) );
83 aVars->push_back( wxT(
"COMMENT2" ) );
84 aVars->push_back( wxT(
"COMMENT3" ) );
85 aVars->push_back( wxT(
"COMMENT4" ) );
86 aVars->push_back( wxT(
"COMMENT5" ) );
87 aVars->push_back( wxT(
"COMMENT6" ) );
88 aVars->push_back( wxT(
"COMMENT7" ) );
89 aVars->push_back( wxT(
"COMMENT8" ) );
90 aVars->push_back( wxT(
"COMMENT9" ) );
97 bool tokenUpdated =
false;
98 wxString originalToken = *aToken;
100 auto getCurrentDate =
109 return wxDateTime::Now().FormatISODate();
112 if( aToken->IsSameAs( wxT(
"ISSUE_DATE" ) ) )
117 else if( aToken->IsSameAs( wxT(
"CURRENT_DATE" ) ) )
119 *aToken = getCurrentDate();
122 else if( aToken->IsSameAs( wxT(
"REVISION" ) ) )
127 else if( aToken->IsSameAs( wxT(
"TITLE" ) ) )
132 else if( aToken->IsSameAs( wxT(
"COMPANY" ) ) )
137 else if( aToken->Left( aToken->Len() - 1 ).IsSameAs( wxT(
"COMMENT" ) ) )
139 wxChar c = aToken->Last();
159 if( aToken->IsSameAs( wxT(
"CURRENT_DATE" ) ) )
160 *aToken = getCurrentDate();
165 if( *aToken == wxT(
"${" ) + originalToken + wxT(
"}" ) )
Container for project specific data.
const wxString & GetCompany() const
const wxString & GetRevision() const
bool TextVarResolver(wxString *aToken, const PROJECT *aProject, int aFlags=0) const
const wxString & GetDate() const
const wxString & GetComment(int aIdx) const
const wxString & GetTitle() const
virtual void Format(OUTPUTFORMATTER *aFormatter) const
Output the object to aFormatter in s-expression form.
static void GetContextualTextVars(wxArrayString *aVars)
wxString ExpandTextVars(const wxString &aSource, const PROJECT *aProject, int aFlags)
bool contains(const _Container &__container, _Value __value)
Returns true if the container contains the given value.