xorp

token.hh

00001 // -*- c-basic-offset: 4; tab-width: 8; indent-tabs-mode: t -*-
00002 // vim:set sts=4 ts=8:
00003 
00004 // Copyright (c) 2001-2011 XORP, Inc and Others
00005 //
00006 // This program is free software; you can redistribute it and/or modify
00007 // it under the terms of the GNU Lesser General Public License, Version
00008 // 2.1, June 1999 as published by the Free Software Foundation.
00009 // Redistribution and/or modification of this program under the terms of
00010 // any other version of the GNU Lesser General Public License is not
00011 // permitted.
00012 // 
00013 // This program is distributed in the hope that it will be useful, but
00014 // WITHOUT ANY WARRANTY; without even the implied warranty of
00015 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For more details,
00016 // see the GNU Lesser General Public License, Version 2.1, a copy of
00017 // which can be found in the XORP LICENSE.lgpl file.
00018 // 
00019 // XORP, Inc, 2953 Bunker Hill Lane, Suite 204, Santa Clara, CA 95054, USA;
00020 // http://xorp.net
00021 
00022 // $XORP: xorp/libxorp/token.hh,v 1.11 2008/10/02 21:57:36 bms Exp $
00023 
00024 
00025 #ifndef __LIBXORP_TOKEN_HH__
00026 #define __LIBXORP_TOKEN_HH__
00027 
00028 
00029 //
00030 // Token related definitions.
00031 //
00032 
00033 
00034 
00035 
00036 
00037 
00038 #include "xorp.h"
00039 
00040 
00041 //
00042 // Constants definitions
00043 //
00044 
00045 //
00046 // Structures/classes, typedefs and macros
00047 //
00048 
00049 //
00050 // Global variables
00051 //
00052 
00053 //
00054 // Global functions prototypes
00055 //
00056 
00066 string  copy_token(const string& token_org);
00067 
00075 string  pop_token(string& token_line);
00076 
00086 bool    is_token_separator(const char c);
00087 
00094 bool    has_more_tokens(const string& token_line);
00095 
00102 vector<string> token_line2vector(const string& token_line);
00103 
00110 list<string> token_line2list(const string& token_line);
00111 
00119 string token_vector2line(const vector<string>& token_vector);
00120 
00128 string token_list2line(const list<string>& token_list);
00129 
00130 #endif // __LIBXORP_TOKEN_HH__
 All Classes Namespaces Functions Variables Typedefs Enumerations