1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130
|
/***************************** LICENSE START ***********************************
Copyright 2012 ECMWF and INPE. This software is distributed under the terms
of the Apache License version 2.0. In applying this license, ECMWF does not
waive the privileges and immunities granted to it by virtue of its status as
an Intergovernmental Organization or submit itself to any jurisdiction.
***************************** LICENSE END *************************************/
// File ObjectList
// Gilberto Camara - ECMWF Sep 97
//
// .NAME:
// ObjectList
//
// .AUTHOR:
// Gilberto Camara and Fernando Ii
//
// .SUMMARY:
// A class for handling methods associated
// with the ObjectList
//
// .CLIENTS:
// Most modules in PlotMod
//
//
// .RESPONSABILITIES:
// Provide configuration information for
// other modules in PlotMod, by use of static methods
//
//
// .COLLABORATORS:
//
//
//
// .BASE CLASS:
//
//
// .DERIVED CLASSES:
//
//
// .REFERENCES:
//
//
#ifndef ObjectList_H
#define ObjectList_H
#include <MvRequest.h>
#include "MvIconDataBase.h"
class ObjectList {
public:
static MvRequest& Instance();
static MvRequest Find ( const Cached&, const Cached& );
static MvRequest FindPlusChildren ( const char*, const char*);
static int FindAll ( const Cached& name, MvRequest& out);
static int FindAll ( const Cached& name, const Cached& classe, MvRequest& out);
static Cached Find ( const Cached&, const Cached&, const Cached& );
static string FindPlusChildren ( const string&, const string&, const string& );
static Cached FindMainRequestValue ( const Cached& requestVerb,
const Cached& parameter );
static Cached FindGraphicsEngine ( const MvRequest& reqst );
static Cached FindView ( const MvRequest& reqst );
static MvRequest FindReqService(const char* classe, const char* action);
static string FindService(const char* classe, const char* action);
static Cached DefaultVisDefClass ( const char* dataUnitVerb );
static bool CheckValidVisDef ( const char*, const char*, const char* );
static bool CheckValidVisDef ( const char*, const char*, int = 0);
static bool CheckValidVisDefList ( const char*, MvIconList&, const char* = 0 );
static void VisDefNDimFlags ( int, vector<string>& );
static MvRequest UserPreferencesRequest ( const char* );
static MvRequest UserDefaultRequest ( const char*, bool expand = false );
static MvRequest ExpandRequest ( const MvRequest&, long );
// Create a request in case there isn't one.
// expandFlag = 0 means use the expand flag value from the ObjectList.
static MvRequest CreateDefaultRequest( const char*, int expandFlag = 0, const char* path = 0 );
// Check objects
static bool IsDataUnit ( const Cached& );
static bool IsImage ( const char* );
static bool IsService ( const char*, const char* action=0, bool context=false );
static bool IsDefaultValue ( MvRequest&, const char * );
static bool IsWindow ( const Cached& );
static bool IsView ( const Cached& );
static bool IsGeographicalView ( const string& );
static bool IsVisDef ( const Cached& );
static bool IsVisDefContour ( const char* );
static bool IsVisDefIsotachs ( const MvRequest& );
static bool IsVisDefCoastlines ( const Cached& );
static bool IsVisDefText ( const char* );
static bool IsVisDefTextTitle ( const MvRequest& );
static bool IsVisDefTextAnnotation ( const MvRequest& );
static bool IsVisDefLegend ( const char* );
static bool IsVisDefImport ( const char* );
static bool IsVisDefAxis ( const Cached& );
static bool IsVisDefGraph ( const Cached& );
static bool IsLayer ( const char* );
static bool AreCompanions ( const string&, const string& );
static bool CalledFromMacro ( const MvRequest& );
static bool IsThermoView( const char* );
static bool IsThermoGrid( const char* );
static bool IsTaylorGrid( const char* );
static Cached MacroName ( const Cached& iconClass );
static void GetCompanion ( const string&, string&, string&, bool& );
private:
// Contructor
ObjectList();
// Destructor
~ObjectList();
};
#endif
|