WizOpStyle Class Reference

A WizOpStyle is a style solely for the purpose of naming WizOps. More...

#include <styles.h>

Inheritance diagram for WizOpStyle:

Style List of all members.

Public Member Functions

 WizOpStyle (const StringBase &Name, const StringBase &Question, const WizOp &WizOpRef, const StringBase &Param)
virtual StyleCreateCopy (const StringBase &NewName) const
virtual BOOL operator== (const Style &OtherStyle) const
 Compares two Style's.
const StringBaseGetQuestion () const
BOOL SetQuestion (const StringBase &NewQuestion)
const WizOpGetWizOp () const
const StringBaseGetParam () const

Protected Member Functions

BOOL SetParam (const StringBase &NewParam)

Private Attributes

String_256 m_Question
const WizOpm_WizOp
String_256 m_Param

Detailed Description

A WizOpStyle is a style solely for the purpose of naming WizOps.

Author:
Colin_Barfoot (Xara Group Ltd) <camelotdev@xara.com>
Date:
15/07/96

Definition at line 268 of file styles.h.


Constructor & Destructor Documentation

WizOpStyle::WizOpStyle const StringBase Name,
const StringBase Question,
const WizOp WizOpRef,
const StringBase Param
 

Definition at line 992 of file styles.cpp.

00993                                                                         :
00994     Style(Name),
00995     m_WizOp(WizOpRef)
00996 {
00997     SetQuestion(Question);
00998 
00999     SetParam(Param);
01000 }


Member Function Documentation

Style * WizOpStyle::CreateCopy const StringBase NewName  )  const [virtual]
 

Implements Style.

Definition at line 1004 of file styles.cpp.

01005 {
01006     return new WizOpStyle(NewName, GetQuestion(), GetWizOp(), GetParam());
01007 }

const StringBase & WizOpStyle::GetParam  )  const
 

Definition at line 1059 of file styles.cpp.

01060 {
01061     return m_Param;
01062 }

const StringBase & WizOpStyle::GetQuestion  )  const
 

Definition at line 1049 of file styles.cpp.

01050 {
01051     return m_Question;
01052 }

const WizOp & WizOpStyle::GetWizOp  )  const
 

Definition at line 1054 of file styles.cpp.

01055 {
01056     return m_WizOp;
01057 }

BOOL WizOpStyle::operator== const Style OtherStyle  )  const [virtual]
 

Compares two Style's.

Author:
Colin_Barfoot (Xara Group Ltd) <camelotdev@xara.com>
Date:
11/07/97
Returns:
TRUE if the names are the same, FALSe if not

Reimplemented from Style.

Definition at line 1010 of file styles.cpp.

01011 {
01012     ERROR3IF(!OtherStyle.IsKindOf(CC_RUNTIME_CLASS(WizOpStyle)), "OtherStyle isn't a WizOpStyle");
01013 
01014     const WizOpStyle& OtherWizOpStyle = (const WizOpStyle&)OtherStyle;
01015 
01016     return (Style::operator==(OtherStyle) &&
01017             m_Question  == OtherWizOpStyle.m_Question &&
01018             &m_WizOp    == &(OtherWizOpStyle.m_WizOp) &&
01019             m_Param     == OtherWizOpStyle.m_Param);
01020 }

BOOL WizOpStyle::SetParam const StringBase NewParam  )  [protected]
 

Definition at line 1034 of file styles.cpp.

01035 {
01036     BOOL AllCopied = TRUE;
01037 
01038     if (NewParam.Length() > m_Param.MaxLength())
01039     {
01040         TRACE( _T("WizOpStyle::SetParam - That param's too long!\n"));
01041         AllCopied = FALSE;
01042     }
01043     NewParam.Left(&m_Param, m_Param.MaxLength());
01044 
01045     return AllCopied;
01046 }

BOOL WizOpStyle::SetQuestion const StringBase NewQuestion  ) 
 

Definition at line 1023 of file styles.cpp.

01024 {
01025     if (NewQuestion.Length() > m_Question.MaxLength())
01026     {
01027         TRACE( _T("WizOpStyle::SetQuestion - Couldn't you ask a shorter question?\n"));
01028     }
01029     NewQuestion.Left(&m_Question, m_Question.MaxLength());
01030 
01031     return TRUE;
01032 }


Member Data Documentation

String_256 WizOpStyle::m_Param [private]
 

Definition at line 290 of file styles.h.

String_256 WizOpStyle::m_Question [private]
 

Definition at line 288 of file styles.h.

const WizOp& WizOpStyle::m_WizOp [private]
 

Definition at line 289 of file styles.h.


The documentation for this class was generated from the following files:
Generated on Sat Nov 10 04:03:10 2007 for Camelot by  doxygen 1.4.4