(file) Return to CIMName.h CVS log (file) (dir) Up to [Pegasus] / pegasus / src / Pegasus / Common

 1 mike  1.11 //%/////////////////////////////////////////////////////////////////////////////
 2            //
 3 kumpf 1.13 // Copyright (c) 2000, 2001, 2002 BMC Software, Hewlett-Packard Company, IBM,
 4            // The Open Group, Tivoli Systems
 5 mike  1.11 //
 6            // Permission is hereby granted, free of charge, to any person obtaining a copy
 7 kumpf 1.13 // of this software and associated documentation files (the "Software"), to
 8            // deal in the Software without restriction, including without limitation the
 9            // rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
10 mike  1.11 // sell copies of the Software, and to permit persons to whom the Software is
11            // furnished to do so, subject to the following conditions:
12            // 
13 kumpf 1.13 // THE ABOVE COPYRIGHT NOTICE AND THIS PERMISSION NOTICE SHALL BE INCLUDED IN
14 mike  1.11 // ALL COPIES OR SUBSTANTIAL PORTIONS OF THE SOFTWARE. THE SOFTWARE IS PROVIDED
15            // "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
16 kumpf 1.13 // LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
17            // PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
18            // HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
19 mike  1.11 // ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20            // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
21            //
22            //==============================================================================
23            //
24            // Author: Mike Brasher (mbrasher@bmc.com)
25            //
26            // Modified By:
27            //
28            //%/////////////////////////////////////////////////////////////////////////////
29            
30            #ifndef Pegasus_Name_h
31            #define Pegasus_Name_h
32            
33            #include <Pegasus/Common/Config.h>
34            #include <Pegasus/Common/String.h>
35            
36            PEGASUS_NAMESPACE_BEGIN
37            
38            /**
39                The name class defines static methods for handling CIM names.
40 kumpf 1.14     There is no public constructor, and no instances can be created.
41                <p>
42 mike  1.11     The names of classes, properties, qualifiers, and methods are all
43                CIM names. A CIM name must match the following regular
44                expression:
45                <PRE>
46            
47            	[A-Z-a-z_][A-Za-z_0-9]*
48                </PRE>
49            
50                Notice that the definition of a name is the same as C, C++,
51                and Java.
52            
53                This class cannot be instantiated (since its only constructor is
54                private).
55            */
56            class PEGASUS_COMMON_LINKAGE CIMName
57            {
58            public:
59            
60 kumpf 1.14     //  ATTN: Define what is legal
61 mike  1.11     /** legal - Determine if the name string input is legal as
62            	defnined in the CIMName class definition
63            	@param - String to test
64 kumpf 1.14 	@return Returns true if the given name is legal.
65            	@exception Throws
66 mike  1.11 	NullPointer exception if name argument is null.
67                */
68 kumpf 1.12     static Boolean legal(const Char16* name) throw();
69 mike  1.11 
70                /** legal - Determine if the name string input is legal as
71            	defnined in the CIMName class definition
72            	@param - String to test
73            	@return Returns true if the given name is legal. Throws
74            	NullPointer exception if name argument is null.
75                */
76 kumpf 1.12     static Boolean legal(const String& name) throw();
77 mike  1.11 
78                /** equal - Compares two names.
79            	@return Return true if the two names are equal. CIM names are
80            	case insensitive and so it this method.
81                */
82 kumpf 1.12     static Boolean equal(const String& name1, const String& name2) throw();
83 mike  1.11 
84            private:
85            
86                CIMName() { }
87            };
88            
89            PEGASUS_NAMESPACE_END
90            
91            #endif /* Pegasus_Name_h */

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2