Author: sh-sh-sh
Date: Wed Nov 7 13:45:22 2007
New Revision: 41839
URL: http://svn.opensuse.org/viewcvs/yast?rev=41839&view=rev
Log:
coding style
Modified:
branches/tmp/sh/mod-ui/core/libyui/src/Y2UINamespace.h
Modified: branches/tmp/sh/mod-ui/core/libyui/src/Y2UINamespace.h
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/mod-ui/core/libyui/src/Y2UINamespace.h?rev=41839&r1=41838&r2=41839&view=diff
==============================================================================
--- branches/tmp/sh/mod-ui/core/libyui/src/Y2UINamespace.h (original)
+++ branches/tmp/sh/mod-ui/core/libyui/src/Y2UINamespace.h Wed Nov 7 13:45:22 2007
@@ -13,6 +13,7 @@
File: Y2UINamespace.h
Authors: Stanislav Visnovsky
+ Martin Vidner
Maintainer: Stefan Hundhammer
@@ -37,11 +38,11 @@
class Y2UINamespace;
/**
- * A call of a UI:: function
- */
+ * One function call of the UI:: namespace
+ **/
class Y2UIFunction: public Y2Function
{
- protected:
+protected:
unsigned int m_position;
Y2UINamespace* m_instance;
@@ -52,259 +53,260 @@
YCPValue m_param3;
YCPValue m_param4;
YCPValue m_param5;
- public:
+public:
Y2UIFunction (Y2UINamespace* instance, YUIComponent* comp, unsigned int pos, bool play_macro_blocks);
bool attachParameter (const YCPValue& arg, const int position);
constTypePtr wantedParameterType () const;
bool appendParameter (const YCPValue& arg);
- bool finishParameters ();
- YCPValue evaluateCall ();
- YCPValue evaluateCall_int ();
- bool reset ();
+ bool finishParameters();
+ YCPValue evaluateCall();
+ YCPValue evaluateCall_int();
+ bool reset();
string name () const;
};
+
/**
- * A call of a UI:: function where we don't know the signature beforehand
- */
+ * One function call of the UI:: namespace:
+ * A function where the signature is not known beforehand
+ **/
class Y2UIOverloadedFunction: public Y2UIFunction
{
- /** A range of SymbolEntries with a matching name.
- * We will eventually find the right one
- */
+ /**
+ * A range of SymbolEntries with a matching name.
+ **/
vector<SymbolEntryPtr>::iterator m_candidates_b;
vector<SymbolEntryPtr>::iterator m_candidates_e;
- public:
- Y2UIOverloadedFunction (
- Y2UINamespace* instance, YUIComponent* comp,
- unsigned pos_offset,
- vector<SymbolEntryPtr>::iterator candidates_b,
- vector<SymbolEntryPtr>::iterator candidates_e,
- bool play_macro_blocks);
+public:
+ Y2UIOverloadedFunction( Y2UINamespace * instance,
+ YUIComponent * comp,
+ unsigned pos_offset,
+ vector<SymbolEntryPtr>::iterator candidates_b,
+ vector<SymbolEntryPtr>::iterator candidates_e,
+ bool play_macro_blocks );
// attachParameter, appendParameter, reset from parent: fine
// wantedParameterType from parent: kind of fine
- //! the main job
- bool finishParameters ();
+ bool finishParameters();
};
+
class Y2UINamespace: public Y2Namespace
{
- private:
- void registerFunctions ();
+private:
+ void registerFunctions();
- vector<string> _registered_functions;
+ vector<string> _registered_functions;
- YUIComponent* m_comp;
+ YUIComponent* m_comp;
+
+public:
+ /**
+ * Constructor.
+ */
+ Y2UINamespace (YUIComponent* comp);
+
+ /**
+ * Destructor.
+ */
+ virtual ~Y2UINamespace();
- public:
- /**
- * Constructor.
- */
- Y2UINamespace (YUIComponent* comp);
+ virtual const string name() const
+ { return "UI"; }
- /**
- * Destructor.
- */
- virtual ~Y2UINamespace ();
+ virtual const string filename() const
+ { return "UI"; }
- virtual const string name () const
- {
- return "UI";
- }
+ virtual string toString() const
+ { return "// can't convert to string with toString"; }
- virtual const string filename () const
- {
- return "UI";
- }
+ virtual YCPValue evaluate( bool cse = false )
+ {
+ if ( cse )
+ return YCPNull();
+ else
+ return YCPVoid();
+ }
- virtual string toString () const
- {
- return "// not possible toString";
- }
+ virtual Y2Function* createFunctionCall (const string name, constFunctionTypePtr type);
- virtual YCPValue evaluate (bool cse = false )
- {
- if (cse) return YCPNull ();
- else return YCPVoid ();
- }
- virtual Y2Function* createFunctionCall (const string name, constFunctionTypePtr type);
- /* TYPEINFO: void (string) */
- YCPValue SetLanguage ( const YCPString & language );
+
+ /* TYPEINFO: void (string) */
+ YCPValue SetLanguage ( const YCPString & language );
- /* TYPEINFO: void (string, string) */
- YCPValue SetLanguage ( const YCPString & language, const YCPString & encoding );
+ /* TYPEINFO: void (string, string) */
+ YCPValue SetLanguage ( const YCPString & language, const YCPString & encoding );
- /* TYPEINFO: string () */
- YCPValue GetProductName ();
+ /* TYPEINFO: string () */
+ YCPValue GetProductName();
- /* TYPEINFO: void (string) */
- YCPValue SetProductName ( const YCPString & name );
+ /* TYPEINFO: void (string) */
+ YCPValue SetProductName ( const YCPString & name );
- /* TYPEINFO: void (string, string, string, string, string) */
- YCPValue SetConsoleFont ( const YCPString & console_magic, const YCPString & font, const YCPString & screen_map, const YCPString & unicode_map, const YCPString & encoding );
+ /* TYPEINFO: void (string, string, string, string, string) */
+ YCPValue SetConsoleFont ( const YCPString & console_magic, const YCPString & font, const YCPString & screen_map, const YCPString & unicode_map, const YCPString & encoding );
- /* TYPEINFO: void () */
- YCPValue SetKeyboard ();
+ /* TYPEINFO: void () */
+ YCPValue SetKeyboard();
- /* TYPEINFO: string (boolean) */
- YCPValue GetLanguage ( const YCPBoolean & strip );
+ /* TYPEINFO: string (boolean) */
+ YCPValue GetLanguage ( const YCPBoolean & strip );
- /* TYPEINFO: any() */
- YCPValue UserInput();
+ /* TYPEINFO: any() */
+ YCPValue UserInput();
- /* TYPEINFO: any () */
- YCPValue PollInput ();
+ /* TYPEINFO: any () */
+ YCPValue PollInput();
- /* TYPEINFO: any (integer) */
- YCPValue TimeoutUserInput ( const YCPInteger& timeout );
+ /* TYPEINFO: any (integer) */
+ YCPValue TimeoutUserInput ( const YCPInteger& timeout );
- /* TYPEINFO: map () */
- YCPValue WaitForEvent ();
+ /* TYPEINFO: map () */
+ YCPValue WaitForEvent();
- /* TYPEINFO: map (integer) */
- YCPValue WaitForEvent( const YCPInteger & timeout );
+ /* TYPEINFO: map (integer) */
+ YCPValue WaitForEvent( const YCPInteger & timeout );
- /* TYPEINFO: void(term) */
- YCPValue OpenDialog( const YCPTerm & dialog_term );
+ /* TYPEINFO: void(term) */
+ YCPValue OpenDialog( const YCPTerm & dialog_term );
- /* TYPEINFO: void(term,term) */
- YCPValue OpenDialog( const YCPTerm & opts, const YCPTerm & dialog_term );
+ /* TYPEINFO: void(term,term) */
+ YCPValue OpenDialog( const YCPTerm & opts, const YCPTerm & dialog_term );
- /* TYPEINFO: boolean() */
- YCPValue CloseDialog();
+ /* TYPEINFO: boolean() */
+ YCPValue CloseDialog();
- // TODO DECL_NIL?
- /* TYPEINFO: boolean (symbol, symbol, any) */
- YCPValue ChangeWidget ( const YCPSymbol & widget_id, const YCPSymbol & property, const YCPValue & new_value );
+ // TODO DECL_NIL?
+ /* TYPEINFO: boolean (symbol, symbol, any) */
+ YCPValue ChangeWidget ( const YCPSymbol & widget_id, const YCPSymbol & property, const YCPValue & new_value );
- // TODO DECL_NIL?
- /* TYPEINFO: boolean (term, symbol, any) */
- YCPValue ChangeWidget ( const YCPTerm & widget_id, const YCPSymbol & property, const YCPValue & new_value );
+ // TODO DECL_NIL?
+ /* TYPEINFO: boolean (term, symbol, any) */
+ YCPValue ChangeWidget ( const YCPTerm & widget_id, const YCPSymbol & property, const YCPValue & new_value );
- // TODO DECL_NIL?
- /* TYPEINFO: boolean (term, term, any) */
- YCPValue ChangeWidget ( const YCPTerm & widget_id, const YCPTerm & property, const YCPValue & new_value );
+ // TODO DECL_NIL?
+ /* TYPEINFO: boolean (term, term, any) */
+ YCPValue ChangeWidget ( const YCPTerm & widget_id, const YCPTerm & property, const YCPValue & new_value );
- /* TYPEINFO: any (symbol, symbol) */
- YCPValue QueryWidget ( const YCPSymbol & widget_id, const YCPSymbol & property );
+ /* TYPEINFO: any (symbol, symbol) */
+ YCPValue QueryWidget ( const YCPSymbol & widget_id, const YCPSymbol & property );
- /* TYPEINFO: any (symbol, term) */
- YCPValue QueryWidget ( const YCPSymbol & widget_id, const YCPTerm & property );
+ /* TYPEINFO: any (symbol, term) */
+ YCPValue QueryWidget ( const YCPSymbol & widget_id, const YCPTerm & property );
- /* TYPEINFO: any (term, symbol) */
- YCPValue QueryWidget ( const YCPTerm & widget_id, const YCPSymbol & property );
+ /* TYPEINFO: any (term, symbol) */
+ YCPValue QueryWidget ( const YCPTerm & widget_id, const YCPSymbol & property );
- /* TYPEINFO: any (term, term) */
- YCPValue QueryWidget ( const YCPTerm & widget_id, const YCPTerm & property );
+ /* TYPEINFO: any (term, term) */
+ YCPValue QueryWidget ( const YCPTerm & widget_id, const YCPTerm & property );
- /* TYPEINFO: boolean (symbol, term) */
- YCPValue ReplaceWidget ( const YCPSymbol & widget_id, const YCPTerm & new_widget );
+ /* TYPEINFO: boolean (symbol, term) */
+ YCPValue ReplaceWidget ( const YCPSymbol & widget_id, const YCPTerm & new_widget );
- /* TYPEINFO: boolean (term, term) */
- YCPValue ReplaceWidget ( const YCPTerm & widget_id, const YCPTerm & new_widget );
+ /* TYPEINFO: boolean (term, term) */
+ YCPValue ReplaceWidget ( const YCPTerm & widget_id, const YCPTerm & new_widget );
- /* TYPEINFO: boolean (symbol) */
- YCPValue SetFocus ( const YCPSymbol & widget_id );
+ /* TYPEINFO: boolean (symbol) */
+ YCPValue SetFocus ( const YCPSymbol & widget_id );
- /* TYPEINFO: boolean (term) */
- YCPValue SetFocus ( const YCPTerm & widget_id );
+ /* TYPEINFO: boolean (term) */
+ YCPValue SetFocus ( const YCPTerm & widget_id );
- /* TYPEINFO: integer (string) */
- YCPValue RunInTerminal ( const YCPString & command );
+ /* TYPEINFO: integer (string) */
+ YCPValue RunInTerminal ( const YCPString & command );
- /* TYPEINFO: void () */
- YCPValue BusyCursor ();
+ /* TYPEINFO: void () */
+ YCPValue BusyCursor();
- /* TYPEINFO: void () */
- YCPValue RedrawScreen ();
+ /* TYPEINFO: void () */
+ YCPValue RedrawScreen();
- /* TYPEINFO: void () */
- YCPValue NormalCursor ();
+ /* TYPEINFO: void () */
+ YCPValue NormalCursor();
- /* TYPEINFO: void (string) */
- YCPValue MakeScreenShot ( const YCPString & filename );
+ /* TYPEINFO: void (string) */
+ YCPValue MakeScreenShot ( const YCPString & filename );
- /* TYPEINFO: void () */
- YCPValue MakeScreenShot ();
+ /* TYPEINFO: void () */
+ YCPValue MakeScreenShot();
- /* TYPEINFO: void () */
- YCPValue DumpWidgetTree ();
+ /* TYPEINFO: void () */
+ YCPValue DumpWidgetTree();
- /* TYPEINFO: void () */
- YCPValue Beep ();
+ /* TYPEINFO: void () */
+ YCPValue Beep();
- /* TYPEINFO: void (string) */
- YCPValue RecordMacro ( const YCPString & filename );
+ /* TYPEINFO: void (string) */
+ YCPValue RecordMacro ( const YCPString & filename );
- /* TYPEINFO: void () */
- YCPValue StopRecordMacro ();
+ /* TYPEINFO: void () */
+ YCPValue StopRecordMacro();
- /* TYPEINFO: void (string) */
- YCPValue PlayMacro ( const YCPString & filename );
+ /* TYPEINFO: void (string) */
+ YCPValue PlayMacro ( const YCPString & filename );
- /* TYPEINFO: void () */
- YCPValue FakeUserInput ();
+ /* TYPEINFO: void () */
+ YCPValue FakeUserInput();
- /* TYPEINFO: void (any) */
- YCPValue FakeUserInput ( const YCPValue & next_input );
+ /* TYPEINFO: void (any) */
+ YCPValue FakeUserInput ( const YCPValue & next_input );
- /* TYPEINFO: string (symbol) */
- YCPValue Glyph ( const YCPSymbol & glyphSym );
+ /* TYPEINFO: string (symbol) */
+ YCPValue Glyph ( const YCPSymbol & glyphSym );
- /* TYPEINFO: map () */
- YCPValue GetDisplayInfo ();
+ /* TYPEINFO: map () */
+ YCPValue GetDisplayInfo();
- /* TYPEINFO: void () */
- YCPValue RecalcLayout ();
+ /* TYPEINFO: void () */
+ YCPValue RecalcLayout();
- /* TYPEINFO: void () */
- YCPValue PostponeShortcutCheck ();
+ /* TYPEINFO: void () */
+ YCPValue PostponeShortcutCheck();
- /* TYPEINFO: void () */
- YCPValue CheckShortcuts ();
+ /* TYPEINFO: void () */
+ YCPValue CheckShortcuts();
- /* TYPEINFO: boolean (symbol) */
- YCPValue WidgetExists ( const YCPSymbol & widget_id );
+ /* TYPEINFO: boolean (symbol) */
+ YCPValue WidgetExists ( const YCPSymbol & widget_id );
- /* TYPEINFO: boolean (term) */
- YCPValue WidgetExists ( const YCPTerm & widget_id );
+ /* TYPEINFO: boolean (term) */
+ YCPValue WidgetExists ( const YCPTerm & widget_id );
- /* TYPEINFO: any (term) */
- YCPValue RunPkgSelection ( const YCPValue & widget_id );
+ /* TYPEINFO: any (term) */
+ YCPValue RunPkgSelection ( const YCPValue & widget_id );
- /* TYPEINFO: string (string, string) */
- YCPValue AskForExistingDirectory ( const YCPString & startDir, const YCPString & headline );
+ /* TYPEINFO: string (string, string) */
+ YCPValue AskForExistingDirectory ( const YCPString & startDir, const YCPString & headline );
- /* TYPEINFO: string (string, string, string) */
- YCPValue AskForExistingFile ( const YCPString & startWith, const YCPString & filter, const YCPString & headline );
+ /* TYPEINFO: string (string, string, string) */
+ YCPValue AskForExistingFile ( const YCPString & startWith, const YCPString & filter, const YCPString & headline );
- /* TYPEINFO: string (string, string, string) */
- YCPValue AskForSaveFileName ( const YCPString & startWith, const YCPString & filter, const YCPString & headline );
+ /* TYPEINFO: string (string, string, string) */
+ YCPValue AskForSaveFileName ( const YCPString & startWith, const YCPString & filter, const YCPString & headline );
- /* TYPEINFO: void (map) */
- YCPValue SetFunctionKeys ( const YCPMap & new_fkeys );
+ /* TYPEINFO: void (map) */
+ YCPValue SetFunctionKeys ( const YCPMap & new_fkeys );
- /* TYPEINFO: any (string, string, string) */
- YCPValue Recode ( const YCPString & from, const YCPString & to, const YCPString & text );
+ /* TYPEINFO: any (string, string, string) */
+ YCPValue Recode ( const YCPString & from, const YCPString & to, const YCPString & text );
- /* TYPEINFO: void (string) */
- YCPValue SetModulename ( const YCPString & name );
+ /* TYPEINFO: void (string) */
+ YCPValue SetModulename ( const YCPString & name );
- /* TYPEINFO: boolean (symbol) */
- YCPValue HasSpecialWidget ( const YCPSymbol & widget );
+ /* TYPEINFO: boolean (symbol) */
+ YCPValue HasSpecialWidget ( const YCPSymbol & widget );
- /* TYPEINFO: boolean (term) */
- YCPValue WizardCommand ( const YCPTerm & command );
+ /* TYPEINFO: boolean (term) */
+ YCPValue WizardCommand ( const YCPTerm & command );
-YCPValue
-CallHandler( void * ptr, int argc, YCPValue argv[] );
+ YCPValue
+ CallHandler( void * ptr, int argc, YCPValue argv[] );
};
--
To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org
For additional commands, e-mail: yast-commit+help@opensuse.org