| 1 |
/* |
| 2 |
* -------------------------------------------------------------------------- |
| 3 |
* XooNiPs Xoops modules for Neuroinformatics Platforms |
| 4 |
* Copyright (C) 2005 RIKEN, Japan. All rights reserved. |
| 5 |
* http://sourceforge.jp/projects/xoonips/ |
| 6 |
* -------------------------------------------------------------------------- |
| 7 |
* This program is free software; you can redistribute it and/or |
| 8 |
* modify it under the terms of the GNU General Public License |
| 9 |
* as published by the Free Software Foundation; either version 2 |
| 10 |
* of the License, or (at your option) any later version. |
| 11 |
* |
| 12 |
* This program is distributed in the hope that it will be useful, |
| 13 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 14 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 15 |
* GNU General Public License for more details. |
| 16 |
* |
| 17 |
* You should have received a copy of the GNU General Public License |
| 18 |
* along with this program; if not, write to the Free Software |
| 19 |
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
| 20 |
* -------------------------------------------------------------------------- |
| 21 |
* |
| 22 |
* |
| 23 |
* 鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申 |
| 24 |
* |
| 25 |
* $Revision: 1.5 $ |
| 26 |
*/ |
| 27 |
|
| 28 |
#if !defined( INDEX_H ) |
| 29 |
#define INDEX_H |
| 30 |
|
| 31 |
#include "common.h" |
| 32 |
#include "item.h" |
| 33 |
|
| 34 |
typedef unsigned int indexid_t; |
| 35 |
typedef unsigned int openlevel_t; |
| 36 |
typedef unsigned int certify_t; |
| 37 |
typedef unsigned int indexop_t; |
| 38 |
|
| 39 |
class index : public item{ |
| 40 |
private: |
| 41 |
indexid_t parentXID; |
| 42 |
unsigned int ownerUID; |
| 43 |
unsigned int ownerGID; |
| 44 |
openlevel_t openLevel; |
| 45 |
unsigned int sortNumber; |
| 46 |
public: |
| 47 |
const static openlevel_t OL_PUBLIC = 1; |
| 48 |
const static openlevel_t OL_GROUP_ONLY = 2; |
| 49 |
const static openlevel_t OL_PRIVATE = 3; |
| 50 |
|
| 51 |
const static certify_t NOT_CERTIFIED = 0; |
| 52 |
const static certify_t CERTIFY_REQUIRED = 1; |
| 53 |
const static certify_t CERTIFIED = 2; |
| 54 |
|
| 55 |
//IDs of index operation |
| 56 |
const static indexop_t OP_REGISTER = 1; |
| 57 |
const static indexop_t OP_UNREGISTER = 2; |
| 58 |
|
| 59 |
index(); |
| 60 |
~index(); |
| 61 |
|
| 62 |
indexid_t getIndexID() const; |
| 63 |
indexid_t getParentIndexID() const; |
| 64 |
unsigned int getOwnerUID() const; |
| 65 |
unsigned int getOwnerGID() const; |
| 66 |
openlevel_t getOpenLevel() const; |
| 67 |
unsigned int getSortNumber() const; |
| 68 |
|
| 69 |
void setIndexID(indexid_t); |
| 70 |
void setParentIndexID(indexid_t); |
| 71 |
void setOwnerUID(unsigned int); |
| 72 |
void setOwnerGID(unsigned int); |
| 73 |
void setOpenLevel(openlevel_t); |
| 74 |
void setSortNumber(unsigned int); |
| 75 |
|
| 76 |
bool isPublic() const; |
| 77 |
bool isGroupOnly() const; |
| 78 |
bool isPrivate() const; |
| 79 |
|
| 80 |
}; |
| 81 |
|
| 82 |
typedef class index index_t; // "index"鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申 |
| 83 |
|
| 84 |
#endif |