Wondercoll
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros
Classes | Macros | Typedefs | Functions | Variables
cxpersistence.cpp File Reference
#include "_cxcore.h"
#include <ctype.h>

Classes

struct  CvGenericHash
 
struct  CvFileMapNode
 
struct  CvXMLStackRecord
 
struct  CvFileStorage
 

Macros

#define cv_isprint(c)   ((signed char)(c) >= (signed char)' ')
 
#define cv_isprint_or_tab(c)   ((signed char)(c) >= (signed char)' ' || (c) == '\t')
 
#define CV_XML_OPENING_TAG   1
 
#define CV_XML_CLOSING_TAG   2
 
#define CV_XML_EMPTY_TAG   3
 
#define CV_XML_HEADER_TAG   4
 
#define CV_XML_DIRECTIVE_TAG   5
 
#define CV_YML_INDENT   3
 
#define CV_XML_INDENT   2
 
#define CV_YML_INDENT_FLOW   1
 
#define CV_FS_MAX_LEN   4096
 
#define CV_FILE_STORAGE   ('Y' + ('A' << 8) + ('M' << 16) + ('L' << 24))
 
#define CV_IS_FILE_STORAGE(fs)   ((fs) != 0 && (fs)->flags == CV_FILE_STORAGE)
 
#define CV_CHECK_FILE_STORAGE(fs)
 
#define CV_CHECK_OUTPUT_FILE_STORAGE(fs)
 
#define CV_PARSE_ERROR(errmsg)
 
#define CV_HASHVAL_SCALE   33
 
#define CV_XML_INSIDE_COMMENT   1
 
#define CV_XML_INSIDE_TAG   2
 
#define CV_XML_INSIDE_DIRECTIVE   3
 
#define icvXMLFlush   icvFSFlush
 
#define CV_FS_MAX_FMT_PAIRS   128
 

Typedefs

typedef struct CvGenericHash CvGenericHash
 
typedef CvGenericHash CvStringHash
 
typedef struct CvFileMapNode CvFileMapNode
 
typedef struct CvXMLStackRecord CvXMLStackRecord
 
typedef void(* CvStartWriteStruct )(struct CvFileStorage *fs, const char *key, int struct_flags, const char *type_name)
 
typedef void(* CvEndWriteStruct )(struct CvFileStorage *fs)
 
typedef void(* CvWriteInt )(struct CvFileStorage *fs, const char *key, int value)
 
typedef void(* CvWriteReal )(struct CvFileStorage *fs, const char *key, double value)
 
typedef void(* CvWriteString )(struct CvFileStorage *fs, const char *key, const char *value, int quote)
 
typedef void(* CvWriteComment )(struct CvFileStorage *fs, const char *comment, int eol_comment)
 
typedef void(* CvStartNextStream )(struct CvFileStorage *fs)
 
typedef struct CvFileStorage CvFileStorage
 

Functions

CV_IMPL const char * cvAttrValue (const CvAttrList *attr, const char *attr_name)
 
char * icvFSResizeWriteBuffer (CvFileStorage *fs, char *ptr, int len)
 
CV_IMPL void cvReleaseFileStorage (CvFileStorage **p_fs)
 
CV_IMPL CvStringHashNodecvGetHashedKey (CvFileStorage *fs, const char *str, int len, int create_missing)
 
CV_IMPL CvFileNodecvGetFileNode (CvFileStorage *fs, CvFileNode *_map_node, const CvStringHashNode *key, int create_missing)
 
CV_IMPL CvFileNodecvGetFileNodeByName (const CvFileStorage *fs, const CvFileNode *_map_node, const char *str)
 
CV_IMPL CvFileNodecvGetRootFileNode (const CvFileStorage *fs, int stream_index)
 
CV_IMPL CvFileStoragecvOpenFileStorage (const char *filename, CvMemStorage *dststorage, int flags)
 
CV_IMPL void cvStartWriteStruct (CvFileStorage *fs, const char *key, int struct_flags, const char *type_name, CvAttrList)
 
CV_IMPL void cvEndWriteStruct (CvFileStorage *fs)
 
CV_IMPL void cvWriteInt (CvFileStorage *fs, const char *key, int value)
 
CV_IMPL void cvWriteReal (CvFileStorage *fs, const char *key, double value)
 
CV_IMPL void cvWriteString (CvFileStorage *fs, const char *key, const char *value, int quote)
 
CV_IMPL void cvWriteComment (CvFileStorage *fs, const char *comment, int eol_comment)
 
CV_IMPL void cvStartNextStream (CvFileStorage *fs)
 
CV_IMPL void cvWriteRawData (CvFileStorage *fs, const void *_data, int len, const char *dt)
 
CV_IMPL void cvStartReadRawData (const CvFileStorage *fs, const CvFileNode *src, CvSeqReader *reader)
 
CV_IMPL void cvReadRawDataSlice (const CvFileStorage *fs, CvSeqReader *reader, int len, void *_data, const char *dt)
 
CV_IMPL void cvReadRawData (const CvFileStorage *fs, const CvFileNode *src, void *data, const char *dt)
 
CV_IMPL void cvWriteFileNode (CvFileStorage *fs, const char *new_node_name, const CvFileNode *node, int embed)
 
CV_IMPL const char * cvGetFileNodeName (const CvFileNode *file_node)
 
CvType sparse_mat_type (CV_TYPE_NAME_SPARSE_MAT, icvIsSparseMat,(CvReleaseFunc) cvReleaseSparseMat, icvReadSparseMat, icvWriteSparseMat,(CvCloneFunc) cvCloneSparseMat)
 
CvType image_type (CV_TYPE_NAME_IMAGE, icvIsImage,(CvReleaseFunc) cvReleaseImage, icvReadImage, icvWriteImage,(CvCloneFunc) cvCloneImage)
 
CvType mat_type (CV_TYPE_NAME_MAT, icvIsMat,(CvReleaseFunc) cvReleaseMat, icvReadMat, icvWriteMat,(CvCloneFunc) cvCloneMat)
 
CvType matnd_type (CV_TYPE_NAME_MATND, icvIsMatND,(CvReleaseFunc) cvReleaseMatND, icvReadMatND, icvWriteMatND,(CvCloneFunc) cvCloneMatND)
 
CV_IMPL void cvRegisterType (const CvTypeInfo *_info)
 
CV_IMPL void cvUnregisterType (const char *type_name)
 
CV_IMPL CvTypeInfocvFirstType (void)
 
CV_IMPL CvTypeInfocvFindType (const char *type_name)
 
CV_IMPL CvTypeInfocvTypeOf (const void *struct_ptr)
 
CV_IMPL void cvRelease (void **struct_ptr)
 
void * cvClone (const void *struct_ptr)
 
CV_IMPL void * cvRead (CvFileStorage *fs, CvFileNode *node, CvAttrList *list)
 
CV_IMPL void cvWrite (CvFileStorage *fs, const char *name, const void *ptr, CvAttrList attributes)
 
CV_IMPL void cvSave (const char *filename, const void *struct_ptr, const char *_name, const char *comment, CvAttrList attributes)
 
CV_IMPL void * cvLoad (const char *filename, CvMemStorage *memstorage, const char *name, const char **_real_name)
 

Variables

CvType seq_type (CV_TYPE_NAME_SEQ, icvIsSeq, icvReleaseSeq, icvReadSeq, icvWriteSeqTree, icvCloneSeq)
 
CvType seq_tree_type (CV_TYPE_NAME_SEQ_TREE, icvIsSeq, icvReleaseSeq, icvReadSeqTree, icvWriteSeqTree, icvCloneSeq)
 
CvType seq_graph_type (CV_TYPE_NAME_GRAPH, icvIsGraph, icvReleaseGraph, icvReadGraph, icvWriteGraph, icvCloneGraph)
 

Macro Definition Documentation

#define CV_CHECK_FILE_STORAGE (   fs)
Value:
{ \
if( !CV_IS_FILE_STORAGE(fs) ) \
CV_ERROR( (fs) ? CV_StsBadArg : CV_StsNullPtr, \
"Invalid pointer to file storage" ); \
}
#define CV_CHECK_OUTPUT_FILE_STORAGE (   fs)
Value:
{ \
CV_CHECK_FILE_STORAGE(fs); \
if( !fs->write_mode ) \
CV_ERROR( CV_StsError, "The file storage is opened for reading" ); \
}
#define CV_FILE_STORAGE   ('Y' + ('A' << 8) + ('M' << 16) + ('L' << 24))
#define CV_FS_MAX_FMT_PAIRS   128
#define CV_FS_MAX_LEN   4096
#define CV_HASHVAL_SCALE   33
#define CV_IS_FILE_STORAGE (   fs)    ((fs) != 0 && (fs)->flags == CV_FILE_STORAGE)
#define cv_isprint (   c)    ((signed char)(c) >= (signed char)' ')
#define cv_isprint_or_tab (   c)    ((signed char)(c) >= (signed char)' ' || (c) == '\t')
#define CV_PARSE_ERROR (   errmsg)
Value:
{ \
icvParseError( fs, cvFuncName, (errmsg), __FILE__, __LINE__ ); \
EXIT; \
}
#define CV_XML_CLOSING_TAG   2
#define CV_XML_DIRECTIVE_TAG   5
#define CV_XML_EMPTY_TAG   3
#define CV_XML_HEADER_TAG   4
#define CV_XML_INDENT   2
#define CV_XML_INSIDE_COMMENT   1
#define CV_XML_INSIDE_DIRECTIVE   3
#define CV_XML_INSIDE_TAG   2
#define CV_XML_OPENING_TAG   1
#define CV_YML_INDENT   3
#define CV_YML_INDENT_FLOW   1
#define icvXMLFlush   icvFSFlush

Typedef Documentation

typedef void(* CvEndWriteStruct)(struct CvFileStorage *fs)
typedef struct CvFileMapNode CvFileMapNode
typedef struct CvFileStorage CvFileStorage
typedef struct CvGenericHash CvGenericHash
typedef void(* CvStartNextStream)(struct CvFileStorage *fs)
typedef void(* CvStartWriteStruct)(struct CvFileStorage *fs, const char *key, int struct_flags, const char *type_name)
typedef void(* CvWriteComment)(struct CvFileStorage *fs, const char *comment, int eol_comment)
typedef void(* CvWriteInt)(struct CvFileStorage *fs, const char *key, int value)
typedef void(* CvWriteReal)(struct CvFileStorage *fs, const char *key, double value)
typedef void(* CvWriteString)(struct CvFileStorage *fs, const char *key, const char *value, int quote)

Function Documentation

CV_IMPL const char* cvAttrValue ( const CvAttrList attr,
const char *  attr_name 
)
void* cvClone ( const void *  struct_ptr)
CV_IMPL void cvEndWriteStruct ( CvFileStorage fs)
CV_IMPL CvTypeInfo* cvFindType ( const char *  type_name)
CV_IMPL CvTypeInfo* cvFirstType ( void  )
CV_IMPL CvFileNode* cvGetFileNode ( CvFileStorage fs,
CvFileNode _map_node,
const CvStringHashNode key,
int  create_missing 
)
CV_IMPL CvFileNode* cvGetFileNodeByName ( const CvFileStorage fs,
const CvFileNode _map_node,
const char *  str 
)
CV_IMPL const char* cvGetFileNodeName ( const CvFileNode file_node)
CV_IMPL CvStringHashNode* cvGetHashedKey ( CvFileStorage fs,
const char *  str,
int  len,
int  create_missing 
)
CV_IMPL CvFileNode* cvGetRootFileNode ( const CvFileStorage fs,
int  stream_index 
)
CV_IMPL void* cvLoad ( const char *  filename,
CvMemStorage memstorage,
const char *  name,
const char **  _real_name 
)
CV_IMPL CvFileStorage* cvOpenFileStorage ( const char *  filename,
CvMemStorage dststorage,
int  flags 
)
CV_IMPL void* cvRead ( CvFileStorage fs,
CvFileNode node,
CvAttrList list 
)
CV_IMPL void cvReadRawData ( const CvFileStorage fs,
const CvFileNode src,
void *  data,
const char *  dt 
)
CV_IMPL void cvReadRawDataSlice ( const CvFileStorage fs,
CvSeqReader reader,
int  len,
void *  _data,
const char *  dt 
)
CV_IMPL void cvRegisterType ( const CvTypeInfo _info)
CV_IMPL void cvRelease ( void **  struct_ptr)
CV_IMPL void cvReleaseFileStorage ( CvFileStorage **  p_fs)
CV_IMPL void cvSave ( const char *  filename,
const void *  struct_ptr,
const char *  _name,
const char *  comment,
CvAttrList  attributes 
)
CV_IMPL void cvStartNextStream ( CvFileStorage fs)
CV_IMPL void cvStartReadRawData ( const CvFileStorage fs,
const CvFileNode src,
CvSeqReader reader 
)
CV_IMPL void cvStartWriteStruct ( CvFileStorage fs,
const char *  key,
int  struct_flags,
const char *  type_name,
CvAttrList   
)
CV_IMPL CvTypeInfo* cvTypeOf ( const void *  struct_ptr)
CV_IMPL void cvUnregisterType ( const char *  type_name)
CV_IMPL void cvWrite ( CvFileStorage fs,
const char *  name,
const void *  ptr,
CvAttrList  attributes 
)
CV_IMPL void cvWriteComment ( CvFileStorage fs,
const char *  comment,
int  eol_comment 
)
CV_IMPL void cvWriteFileNode ( CvFileStorage fs,
const char *  new_node_name,
const CvFileNode node,
int  embed 
)
CV_IMPL void cvWriteInt ( CvFileStorage fs,
const char *  key,
int  value 
)
CV_IMPL void cvWriteRawData ( CvFileStorage fs,
const void *  _data,
int  len,
const char *  dt 
)
CV_IMPL void cvWriteReal ( CvFileStorage fs,
const char *  key,
double  value 
)
CV_IMPL void cvWriteString ( CvFileStorage fs,
const char *  key,
const char *  value,
int  quote 
)
char* icvFSResizeWriteBuffer ( CvFileStorage fs,
char *  ptr,
int  len 
)
CvType image_type ( CV_TYPE_NAME_IMAGE  ,
icvIsImage  ,
(CvReleaseFunc cvReleaseImage,
icvReadImage  ,
icvWriteImage  ,
(CvCloneFunc cvCloneImage 
)
CvType mat_type ( CV_TYPE_NAME_MAT  ,
icvIsMat  ,
(CvReleaseFunc cvReleaseMat,
icvReadMat  ,
icvWriteMat  ,
(CvCloneFunc cvCloneMat 
)
CvType matnd_type ( CV_TYPE_NAME_MATND  ,
icvIsMatND  ,
(CvReleaseFunc cvReleaseMatND,
icvReadMatND  ,
icvWriteMatND  ,
(CvCloneFunc cvCloneMatND 
)
CvType sparse_mat_type ( CV_TYPE_NAME_SPARSE_MAT  ,
icvIsSparseMat  ,
(CvReleaseFunc cvReleaseSparseMat,
icvReadSparseMat  ,
icvWriteSparseMat  ,
(CvCloneFunc cvCloneSparseMat 
)

Variable Documentation

CvType seq_graph_type(CV_TYPE_NAME_GRAPH, icvIsGraph, icvReleaseGraph, icvReadGraph, icvWriteGraph, icvCloneGraph)
CvType seq_tree_type(CV_TYPE_NAME_SEQ_TREE, icvIsSeq, icvReleaseSeq, icvReadSeqTree, icvWriteSeqTree, icvCloneSeq)
CvType seq_type(CV_TYPE_NAME_SEQ, icvIsSeq, icvReleaseSeq, icvReadSeq, icvWriteSeqTree, icvCloneSeq)